mconf/mconf-web

View on GitHub
app/views/attachments/index.html.haml

Summary

Maintainability
Test Coverage
- page_title t('spaces.sidebar.repository'), in: @space.name
- spaces_menu_at :repository
= render 'spaces/sidebar', space: @space, full: false

#space-attachments-tabs
  -# note: this links have to start enabled, otherwise the click won't work (the links are set via js)
  = link_to t('.download_multiple'), '#', :id => "attachments-download", :class => "btn btn-default", :'data-base-url' => space_attachments_path(@space)
  = link_to t('.remove_multiple'), '#', :rel => 'nofollow', :id => "attachments-delete", :'data-confirm' => t(".remove_multiple_confirmation"), :class => "btn btn-default", :'data-base-url' => space_attachments_path(@space)
  %span{ :id => "space-attachments-selected" }

  #space-attachments-create
    - if can?(:create, Attachment.new(:space => @space))
      = link_to t('.new_file'), new_space_attachment_path(@space), :id => "new-file", :class => "btn btn-primary open-modal"

#space-attachments
  - if @attachments.empty?
    = t('.no_attachments')
  - else
    %table.table.table-hover
      %thead
        %tr.attachment-row
          %th
          %th= t('.file')
          %th= t('.author')
          %th= t('.uploaded')
          %th
      - @attachments.each do |attachment|
        = render 'single_attachment', :attachment => attachment