<commit_before>= content_for :session do
  #session
    = render :partial => 'shared/session'
= content_for :title do
  = "Edit #{@sequence.title}"
= content_for :nav do
  .breadcrumbs
    %ul
      %li= link_to 'All Sequences', sequences_path
      %li
        != "/ #{@sequence.title}"


%h1 Editing sequence

#leftcol
  = render 'form'

  = link_to 'Show', @sequence
  |
  = link_to 'Back', sequences_path

#rightcol
  #menu
    #activities
      %h2 Activities in sequence
      %ul#sort-activities.ui-sortable
        - @sequence.lightweight_activities_sequences.each do |las|
          - activity = las.lightweight_activity
          %li{ :id => dom_id_for(las, :item), :class => 'item' }
            = truncate(activity.name, :length => 20, :omission => "…")
            %ul.menu
              %li.edit= link_to "Edit", edit_activity_path(activity)
              %li.run= link_to "Run", activity_path(activity)
              %li.delete
                = form_tag remove_activity_sequence_path(@sequence) do
                  = hidden_field_tag :activity_id, activity.id
                  = submit_tag "Remove"
              %li.drag_handle
                &nbsp;
      - if @activities
        = form_tag add_activity_sequence_path(@sequence) do
          = select_tag :activity_id, options_from_collection_for_select(@activities, :id, :name)
          = submit_tag "Add"

<commit_msg>Don't show edit links to users who can't follow<commit_after>= content_for :session do
  #session
    = render :partial => 'shared/session'
= content_for :title do
  = "Edit #{@sequence.title}"
= content_for :nav do
  .breadcrumbs
    %ul
      %li= link_to 'All Sequences', sequences_path
      %li
        != "/ #{@sequence.title}"


%h1 Editing sequence

#leftcol
  = render 'form'

  = link_to 'Show', @sequence
  |
  = link_to 'Back', sequences_path

#rightcol
  #menu
    #activities
      %h2 Activities in sequence
      %ul#sort-activities.ui-sortable
        - @sequence.lightweight_activities_sequences.each do |las|
          - activity = las.lightweight_activity
          %li{ :id => dom_id_for(las, :item), :class => 'item' }
            = truncate(activity.name, :length => 20, :omission => "…")
            %ul.menu
              %li.edit= link_to "Edit", edit_activity_path(activity) if can? :update, activity
              %li.run= link_to "Run", activity_path(activity)
              %li.delete
                = form_tag remove_activity_sequence_path(@sequence) do
                  = hidden_field_tag :activity_id, activity.id
                  = submit_tag "Remove"
              %li.drag_handle
                &nbsp;
      - if @activities
        = form_tag add_activity_sequence_path(@sequence) do
          = select_tag :activity_id, options_from_collection_for_select(@activities, :id, :name)
          = submit_tag "Add"


{'fraction_non_alphanumeric': 0.1149789029535865, 'fraction_numerical': 0.0028129395218002813, 'mean_word_length': 2.358913813459268, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4918769', 'n_tokens_mistral': 898, 'n_tokens_neox': 876, 'n_words': 198}