app/views/tickets/index.html.haml
- content_for :title, 'Admin'
- content_for :extra_buttons do
= button_to destroy_all_tickets_path, method: 'get', class: 'btn btn-danger', 'data-confirm' => 'Are you sure?', rel: 'nofollow' do
%span.glyphicon.glyphicon-remove
Destroy all
%table.table.table-striped.table-bordered.table-hover.table-condensed
/ header of the table
%tr
%th #
%th Name
%th Computer
%th Reason
%th Created
- if @tickets.length > 0
/ body of the table
= render @tickets
- else
/ displayed if no tickets are open
%tr
%td.text-muted{colspan: '4'} No tickets are open.