<commit_before>= content_for :title do 
  Activities
= content_for :nav do
  .breadcrumbs
    %ul
      %li
        All Activities

.action_menu#activity-actions
  .action_menu_header
    .action_menu_header_left
    .action_menu_header_right.index
      %ul#new-menu
        - if can? :create, LightweightActivity
          %li#add= link_to 'create new activity', new_activity_path
        %li#desc-toggle= toggle_all 'activity descriptions'


%h1.title
  Lightweight Activities

.item_collection
  %ul.quiet_list
    - @activities.each do |activity|
      %li{ :id => dom_id_for(activity, :item), :class => 'item' }
        %div.action_menu
          %div.action_menu_header_left
            = link_to activity.name, activity_path(activity), :class => 'container_link', :title => 'Preview Activity'
          %div.action_menu_header_right
            %ul.menu
              %li.edit= link_to "Edit", edit_activity_path(activity) unless cannot? :edit, activity
              %li.delete= link_to 'Delete', activity_path(activity), method: :delete, data: { confirm: 'Are you sure?' } unless cannot? :destroy, activity
              %li.run= link_to "Run", activity_path(activity), :target => 'new'

        %div{:id => dom_id_for(activity, :details), :class => 'tiny'}
          - if activity.user && activity.user.email.present?
            %p.author
              = "by #{activity.user.email}"
          %p.updated
            = "last updated at #{activity.updated_at.to_formatted_s(:long)}"
            - if activity.changed_by.present?
              = "by #{activity.changed_by.email}"
          != activity.description<commit_msg>Only show who changed the activity if the user is an author<commit_after>= content_for :title do 
  Activities
= content_for :nav do
  .breadcrumbs
    %ul
      %li
        All Activities

.action_menu#activity-actions
  .action_menu_header
    .action_menu_header_left
    .action_menu_header_right.index
      %ul#new-menu
        - if can? :create, LightweightActivity
          %li#add= link_to 'create new activity', new_activity_path
        %li#desc-toggle= toggle_all 'activity descriptions'


%h1.title
  Lightweight Activities

.item_collection
  %ul.quiet_list
    - @activities.each do |activity|
      %li{ :id => dom_id_for(activity, :item), :class => 'item' }
        %div.action_menu
          %div.action_menu_header_left
            = link_to activity.name, activity_path(activity), :class => 'container_link', :title => 'Preview Activity'
          %div.action_menu_header_right
            %ul.menu
              %li.edit= link_to "Edit", edit_activity_path(activity) unless cannot? :edit, activity
              %li.delete= link_to 'Delete', activity_path(activity), method: :delete, data: { confirm: 'Are you sure?' } unless cannot? :destroy, activity
              %li.run= link_to "Run", activity_path(activity), :target => 'new'

        %div{:id => dom_id_for(activity, :details), :class => 'tiny'}
          - if activity.user && activity.user.email.present?
            %p.author
              = "by #{activity.user.email}"
          %p.updated
            = "last updated at #{activity.updated_at.to_formatted_s(:long)}"
            - if (can? :create, LightweightActivity) && activity.changed_by.present?
              = "by #{activity.changed_by.email}"
          != activity.description
{'fraction_non_alphanumeric': 0.11899791231732777, 'fraction_numerical': 0.0005964807634953773, 'mean_word_length': 2.6776315789473686, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '1880768', 'n_tokens_mistral': 1013, 'n_tokens_neox': 1002, 'n_words': 233}