From 0cd386e0144601f5478f90bbdb401d55c019c828 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 3 Jul 2013 11:11:10 -0700 Subject: better ticket view navigation: tickets are now either global in scope (for admins) or stay as a nested resource for a particular user (for normal users and when you visit the tickets list of a particular user). --- help/app/views/tickets/new.html.haml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'help/app/views/tickets/new.html.haml') diff --git a/help/app/views/tickets/new.html.haml b/help/app/views/tickets/new.html.haml index 7d3f76c..04b091c 100644 --- a/help/app/views/tickets/new.html.haml +++ b/help/app/views/tickets/new.html.haml @@ -1,6 +1,9 @@ +- @show_navigation = !params[:user_id].nil? + = render 'tickets/table-nav' = simple_form_for @ticket, :validate => true, :html => {:class => 'form-horizontal'} do |f| + = hidden_ticket_fields = f.input :title, :label => t(:subject) - if user = f.input :email, input_html: {value: user.email_address} @@ -15,4 +18,6 @@ .form-actions = f.button :submit, :class => 'btn-primary' - if logged_in? - = link_to t(:cancel), tickets_path, :class => :btn + = link_to t(:cancel), auto_tickets_path, :class => :btn + - else + = link_to t(:cancel), root_path, :class => 'btn' \ No newline at end of file -- cgit v1.2.3