69 lines
1.9 KiB
Plaintext
69 lines
1.9 KiB
Plaintext
h1.page-header = "Ticket: #{@ticket.head.title}"
|
||
|
||
p
|
||
strong
|
||
| Id: #
|
||
= @ticket.id
|
||
p
|
||
strong = t ".respond_to"
|
||
|:
|
||
= link_to @ticket.head.title, client_ticket_path(@ticket.head)
|
||
|
||
p
|
||
strong = t ".state"
|
||
|:
|
||
- if @ticket.head.state == Ticket::CLOSE
|
||
td.bg-danger = t ".states.close"
|
||
- else
|
||
td.bg-success = t ".states.open"
|
||
|
||
p
|
||
strong = t ".creator"
|
||
|:
|
||
span.ticket-creator = link_to_creator @ticket
|
||
p
|
||
strong = t ".title"
|
||
|:
|
||
= @ticket.title
|
||
p
|
||
strong = t ".description"
|
||
|:
|
||
.container-fluid.ticket-description
|
||
= @ticket.description
|
||
|
||
- if not @ticket.tickets.empty?
|
||
table.table.table-condensed.
|
||
thead
|
||
tr
|
||
th = t ".creator"
|
||
th = t ".title"
|
||
th = t ".description"
|
||
th = t ".state"
|
||
th = t ".last_update"
|
||
th
|
||
/ th
|
||
|
||
tbody
|
||
- @ticket.tickets.each do |ticket|
|
||
tr
|
||
td = link_to_creator(ticket)
|
||
td = link_to ticket.title, client_ticket_path(ticket)
|
||
td = ticket.short_description
|
||
- if ticket.state == Ticket::CLOSE
|
||
td.bg-danger = ticket.state
|
||
- else
|
||
td.bg-success = ticket.state
|
||
td = ticket.updated_at.to_s(:long)
|
||
td = link_to (t ".buttons.show"), client_ticket_path(ticket)
|
||
td = link_to (t ".buttons.edit"), edit_client_ticket_path(ticket)
|
||
|
||
br
|
||
|
||
- if @ticket.open?
|
||
= link_to (t '.buttons.respond'), client_ticket_respond_path(@ticket), class: 'btn btn-sm btn-default'
|
||
= link_to (t '.buttons.close'), client_ticket_close_path(@ticket), method: :patch, class: 'btn btn-sm btn-success'
|
||
- else
|
||
= link_to (t '.buttons.reopen'), client_ticket_open_path(@ticket), method: :patch, class: 'btn btn-sm btn-danger'
|
||
= link_to (t '.buttons.edit'), edit_client_ticket_path(@ticket), class: 'btn btn-sm btn-default'
|
||
= link_to (t '.buttons.back'), client_tickets_path, class: 'btn btn-sm btn-default'
|