tnantoka/wizu

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

Summary

Maintainability
Test Coverage
= render 'pages/breadcrumb', page: @wiki
table.table
  thead.thead-default
    tr
      th #
      th= t('.file_name')
      th= t('.pages')
      th= t('.action')
  tbody
    - @attachments.each do |attachment|
      tr
        th= attachment.id
        td= link_to attachment.data_file_name, attachment
        td
          ul.list-inline.m-b-0
            - attachment.pages.each do |page|
              li= link_to page.title, page
        td
          = link_to icon('trash'), attachment, method: :delete, class: 'text-danger',
            data: { confirm: t('global.are_you_sure'), disable_with: t('global.delete') }

= paginate @attachments