<commit_before>- event ||= @event

.documents{ :"data-url" => "#{event_documents_path(event)}.js", :"data-refreshable" => true}

  - if event.document_attachments.any?
    / %p
    /   = link_to t(:download_attachments_as_zipfile), event_url(event, :format => :zip), :class => "download"

    %section.holder
      %h2
        = t :attachments
        - if admin?
          = link_to t(:add_document), droom.new_event_document_url(event), :class => "add minimal admin", :remote => true, :data => {:action => "append_form", :type => "html", :affected => ".documents"}
      
      = render :partial => "droom/events/attachment_list", :object => event.document_attachments.unfiled, :locals => {:limit => 100}
      
    - attachments = event.attachments_by_category
    - attachments.each_pair do |cat_name, category_attachments|
      - if admin? || category_attachments.any?
        - unless cat_name == "uncategorised"
          %section.holder
            %h3
              = cat_name
              - if admin?
                = link_to t(:add_document), droom.new_event_document_url(event, :category_name => cat_name), :class => "add minimal admin", :remote => true, :data => {:action => "append_form", :type => "html", :affected => ".documents"}

            = render :partial => "droom/events/attachment_list", :object => category_attachments, :locals => {:limit => 100}
<commit_msg>add document even if no documents. d'oh<commit_after>- event ||= @event

.documents{ :"data-url" => "#{event_documents_path(event)}.js", :"data-refreshable" => true}

  - if event.document_attachments.any?
    / %p
    /   = link_to t(:download_attachments_as_zipfile), event_url(event, :format => :zip), :class => "download"

    %section.holder
      %h2
        = t :attachments
        - if admin?
          = link_to t(:add_document), droom.new_event_document_url(event), :class => "add minimal admin", :remote => true, :data => {:action => "append_form", :type => "html", :affected => ".documents"}
      
      = render :partial => "droom/events/attachment_list", :object => event.document_attachments.unfiled, :locals => {:limit => 100}
      
    - attachments = event.attachments_by_category
    - attachments.each_pair do |cat_name, category_attachments|
      - if admin? || category_attachments.any?
        - unless cat_name == "uncategorised"
          %section.holder
            %h3
              = cat_name
              - if admin?
                = link_to t(:add_document), droom.new_event_document_url(event, :category_name => cat_name), :class => "add minimal admin", :remote => true, :data => {:action => "append_form", :type => "html", :affected => ".documents"}

            = render :partial => "droom/events/attachment_list", :object => category_attachments, :locals => {:limit => 100}

  - else
    - if admin?
      .holder
        = link_to t(:add_document), droom.new_event_document_url(event), :class => "add admin", :remote => true, :data => {:action => "append_form", :type => "html", :affected => ".documents"}
{'fraction_non_alphanumeric': 0.16150296638101516, 'fraction_numerical': 0.005273566249176005, 'mean_word_length': 3.1069012178619757, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6954841', 'n_tokens_mistral': 978, 'n_tokens_neox': 922, 'n_words': 207}