From adacb11c8ff6395f38c3c05bea4e6d276285118f Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 4 Jul 2013 01:35:49 -0700 Subject: help - fix ticket navigation & links (use @user, not user). --- help/app/views/tickets/new.html.haml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (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 04b091c..4d35659 100644 --- a/help/app/views/tickets/new.html.haml +++ b/help/app/views/tickets/new.html.haml @@ -1,13 +1,20 @@ - @show_navigation = !params[:user_id].nil? -= render 'tickets/table-nav' += render 'tickets/tabs' + +- if admin? && @user + - email = @user.email_address + - regarding = @user.login +- elsif logged_in? + - email = current_user.email_address + - regarding = current_user.login = 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} - = f.input :regarding_user, input_html: {value: user.login} + - if logged_in? + = f.input :email, input_html: {value: email} + = f.input :regarding_user, input_html: {value: regarding} - else = f.input :email = f.input :regarding_user -- cgit v1.2.3