Sha256: 8d12e5626604b976d9e24f9b15596f744ccd309f889f6f084c44c354ea200aab

Contents?: true

Size: 1.44 KB

Versions: 4

Compression:

Stored size: 1.44 KB

Contents

- event ||= @event
- documents = event.documents.visible_to(@current_person)

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

  %section.holder

    - if documents.any?
      %h2
        = t :attachments
        - if admin?
          = link_to t(:add_document), droom.new_event_document_url(event), :class => "add minimal admin", :remote => true, :data => {:action => "popup", :type => "html", :affected => ".documents"}
      
      = render :partial => "droom/events/attachment_list", :object => event.document_attachments.unfiled, :locals => {:limit => 100}

    - elsif admin?
      .holder
        = link_to t(:add_document), droom.new_event_document_url(event), :class => "add admin", :remote => true, :data => {:action => "popup", :type => "html", :affected => ".documents"}
      
  - 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 => "popup", :type => "html", :affected => ".documents"}

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
droom-0.4.3 app/views/droom/documents/_documents_list.html.haml
droom-0.4.2 app/views/droom/documents/_documents_list.html.haml
droom-0.4.1 app/views/droom/documents/_documents_list.html.haml
droom-0.2.1 app/views/droom/documents/_documents_list.html.haml