:ruby # created by user link if @ticket.is_creator_validated? created_by = link_to @ticket.created_by_user.login, @ticket.created_by_user else created_by = t(:anonymous) end # regarding user link if admin? if @ticket.regarding_user_actual_user regarding_user_link = link_to @ticket.regarding_user_actual_user.login, @ticket.regarding_user_actual_user else regarding_user_link = "(#{t(:unknown)})" end else regarding_user_link = '' end = simple_form_for @ticket do |f| = hidden_ticket_fields %p.first - if @ticket.is_open? %span.label.label-info %b{style: 'padding:10px'}= t(:open) = f.button :loading, t(:close), value: 'close', class: 'btn-mini' - else %span.label.label-success %b{style: 'padding:10px'}= t(:closed) = f.button :loading, t(:open), value: 'open', class: 'btn-mini' %span.label.label-clear= t(:created_by_on, :user => created_by, :time => @ticket.created_at.to_s(:short)).html_safe = simple_form_for @ticket do |f| = hidden_ticket_fields %div= t(:subject) = f.text_field :subject, :class => 'large full-width' .row-fluid .span4 %div= t(:status) = f.select :is_open, [[t(:open), "true"], [t(:closed), "false"]] .span4 %div= t(:email) = f.text_field :email .span4 %div = t(:regarding_account) = regarding_user_link = f.text_field :regarding_user = f.button :loading, t(:save), :value => 'save' - if admin? = link_to t(:destroy), auto_ticket_path(@ticket), :confirm => t(:are_you_sure), :method => :delete, :class => 'btn'