MorningPeak/app/views/tickets/show.html.slim

39 lines
898 B
Plaintext

h1.page-header = "Show ticket: #{@ticket.title}"
p
strong
| Id: #
= @ticket.id
p
strong State:
- if @ticket.state == Ticket::CLOSE
td.bg-danger = @ticket.state
- else
td.bg-success = @ticket.state
p
strong Creator:
= link_to_creator @ticket
p
strong Title:
= @ticket.title
p
strong Description:
.container-fluid.ticket-description
= descriptionize @ticket.description
p
strong State:
= @ticket.state
br
- if @ticket.open?
= link_to 'Close', ticket_close_path(@ticket), method: :patch, class: 'btn btn-sm btn-success'
- else
= link_to 'Reopen', ticket_open_path(@ticket), method: :patch, class: 'btn btn-sm btn-danger'
= link_to 'Edit', edit_ticket_path(@ticket), class: 'btn btn-sm btn-default'
= link_to 'Back', tickets_path, class: 'btn btn-sm btn-default'
== render partial: "/comments/thread", locals: {commentable: @ticket, type: 'admin'}