Sha256: 9a50ed9b27052bef73c22997240c2e79da3b8945a8671779255dcceced5285cc

Contents?: true

Size: 1.52 KB

Versions: 15

Compression:

Stored size: 1.52 KB

Contents

= render "layouts/manage/page_title", title: "Trackable Events"

= bs_horizontal_simple_form_for :trackable_event, method: 'get' do |f|
  .form-row
    .col-auto
      = f.input :band_id, as: :string, required: false, input_html: { value: @params['band_id'] }, placeholder: '(show all)'
    .col-auto
      = f.input :trackable_tag_id, collection: TrackableTag.all, label_method: :name, value_method: :id, include_blank: '(show all)', required: false, selected: @params['trackable_tag_id']
    .col-auto
      = f.input :user_id, collection: User.where.not(role: :user), label_method: :email, value_method: :id, include_blank: '(show all)', required: false, selected: @params['user_id']
    .col-auto
      = f.button :submit, 'Filter', class: 'btn btn-primary'

%table.table.table-striped
  %thead
    %tr
      %th Band
      %th Trackable tag
      %th User
      %th
      %th
      %th

  %tbody
    - @trackable_events.each do |trackable_event|
      %tr
        %td= trackable_event.band_id
        %td= trackable_event.trackable_tag.name
        %td= trackable_event.user.email
        %td= link_to 'Show', manage_trackable_event_path(trackable_event)
        - if current_user.admin? || current_user == trackable_event.user
          %td= link_to 'Edit', edit_manage_trackable_event_path(trackable_event)
          %td= link_to 'Destroy', manage_trackable_event_path(trackable_event), method: :delete, data: { confirm: 'Are you sure?' }
        - else
          %td
          %td

%br

= link_to 'New Trackable event', new_manage_trackable_event_path

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hackathon_manager-0.14.1 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.14.0 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.12 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.11 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.10 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.9 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.8 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.7 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.6 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.5 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.4 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.3 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.2 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.1 app/views/manage/trackable_events/index.html.haml
hackathon_manager-0.13.0 app/views/manage/trackable_events/index.html.haml