diff options
author | Azul <azul@leap.se> | 2014-05-27 16:32:50 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-05-27 16:32:50 +0200 |
commit | cc59ce53e52bf48d97de16d66012e8309bf98fe8 (patch) | |
tree | 8b32b2a2f791723fe93b5d73fcc104d6a9729355 /engines/support | |
parent | 863863ff1fb6c9ab13b44248417ae1c5e57987af (diff) |
add btn helper for link_to with .btn
Also translates the first arg if it's a symbol and adds more btn- classes if given as html_options[:type]
Diffstat (limited to 'engines/support')
-rw-r--r-- | engines/support/app/views/tickets/_edit_form.html.haml | 2 | ||||
-rw-r--r-- | engines/support/app/views/tickets/_new_comment_form.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/support/app/views/tickets/_edit_form.html.haml b/engines/support/app/views/tickets/_edit_form.html.haml index 522489e..9adc2cc 100644 --- a/engines/support/app/views/tickets/_edit_form.html.haml +++ b/engines/support/app/views/tickets/_edit_form.html.haml @@ -43,4 +43,4 @@ = f.input :regarding_user, label: Ticket.human_attribute_name(:regarding_user) + regarding_user_link = f.button :loading - if admin? - = link_to t(".destroy", cascade: true), auto_ticket_path(@ticket), :confirm => t("tickets.confirm.destroy.are_you_sure", cascade: true), :method => :delete, :class => 'btn' + = btn t(".destroy", cascade: true), auto_ticket_path(@ticket), confirm: t("tickets.confirm.destroy.are_you_sure", cascade: true), method: :delete diff --git a/engines/support/app/views/tickets/_new_comment_form.html.haml b/engines/support/app/views/tickets/_new_comment_form.html.haml index b829b6b..711421d 100644 --- a/engines/support/app/views/tickets/_new_comment_form.html.haml +++ b/engines/support/app/views/tickets/_new_comment_form.html.haml @@ -10,4 +10,4 @@ = f.button :loading, t(".post_reply"), class: 'btn-primary', value: 'post_reply' - if logged_in? && @ticket.is_open = f.button :loading, t(".reply_and_close"), value: 'reply_and_close' - = link_to t(".cancel"), auto_tickets_path, :class => :btn + = btn t(".cancel"), auto_tickets_path |