From 7d58f640e89a89a4767e59883b864afcd4e9dad4 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 17 Jun 2013 01:27:01 -0700 Subject: new ui - ticket navigation --- help/app/views/tickets/new.html.haml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 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 1aa689b..5442910 100644 --- a/help/app/views/tickets/new.html.haml +++ b/help/app/views/tickets/new.html.haml @@ -1,10 +1,17 @@ -.span12 - %h2=t :new_ticket - = simple_form_for @ticket, :validate => true, :html => {:class => 'form-horizontal'} do |f| - = f.input :title - = f.input :email if !current_user #hmm--might authenticated users want to submit an alternate email? + +//%h2.first= t :new_ticket + += render 'tickets/table-nav' + += simple_form_for @ticket, :validate => true, :html => {:class => 'form-horizontal'} do |f| + = f.input :title + - if user + = f.input :email, input_html: {value: user.email_address} + = f.input :regarding_user, input_html: {value: user.login} + - else + = f.input :email = f.input :regarding_user - = render :partial => 'new_comment', :locals => {:f => f} - .form-actions - = f.button :submit, :class => 'btn-primary' - = link_to t(:cancel), tickets_path, :class => :btn + = render :partial => 'new_comment', :locals => {:f => f} + .form-actions + = f.button :submit, :class => 'btn-primary' + = link_to t(:cancel), tickets_path, :class => :btn -- cgit v1.2.3 From 8393058ac15d72be702a6de481d6129aed4bbef3 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 19 Jun 2013 00:33:19 -0700 Subject: new ui for tickets --- help/app/views/tickets/new.html.haml | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 5442910..acb9537 100644 --- a/help/app/views/tickets/new.html.haml +++ b/help/app/views/tickets/new.html.haml @@ -1,17 +1,17 @@ - -//%h2.first= t :new_ticket - = render 'tickets/table-nav' = simple_form_for @ticket, :validate => true, :html => {:class => 'form-horizontal'} do |f| - = f.input :title + = 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} - else = f.input :email = f.input :regarding_user - = render :partial => 'new_comment', :locals => {:f => f} + = f.simple_fields_for :comments, @comment do |c| + = c.input :body, :label => t(:description), :as => :text, :input_html => {:class => "full-width", :rows=> 5} + - if admin? + = c.input :private, :as => :boolean, :label => false, :inline_label => true .form-actions = f.button :submit, :class => 'btn-primary' = link_to t(:cancel), tickets_path, :class => :btn -- cgit v1.2.3 From d121373b7c21a29e47708e8b67aeb964202e52c5 Mon Sep 17 00:00:00 2001 From: elijah Date: Sun, 23 Jun 2013 22:14:45 -0700 Subject: fix several issues with tickets: js error, when to redirect, navigation, localization. --- help/app/views/tickets/new.html.haml | 3 ++- 1 file changed, 2 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 acb9537..7d3f76c 100644 --- a/help/app/views/tickets/new.html.haml +++ b/help/app/views/tickets/new.html.haml @@ -14,4 +14,5 @@ = c.input :private, :as => :boolean, :label => false, :inline_label => true .form-actions = f.button :submit, :class => 'btn-primary' - = link_to t(:cancel), tickets_path, :class => :btn + - if logged_in? + = link_to t(:cancel), tickets_path, :class => :btn -- cgit v1.2.3 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 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