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_comment_form.html.haml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 help/app/views/tickets/_new_comment_form.html.haml (limited to 'help/app/views/tickets/_new_comment_form.html.haml') diff --git a/help/app/views/tickets/_new_comment_form.html.haml b/help/app/views/tickets/_new_comment_form.html.haml new file mode 100644 index 0000000..b273503 --- /dev/null +++ b/help/app/views/tickets/_new_comment_form.html.haml @@ -0,0 +1,13 @@ +-# +-# for posting a new comment to an existing ticket. +-# += simple_form_for @ticket, :html => {:class => 'slim'} do |f| + = f.simple_fields_for :comments, @comment, :wrapper => :none, :html => {:class => 'slim'} do |c| + = c.input :body, :label => false, :as => :text, :input_html => {:class => "full-width", :rows=> 5} + - if admin? + = c.input :private, :as => :boolean, :label => false, :inline_label => true + = f.button :submit, t(:post_reply), :class => 'btn-primary' + - if @ticket.is_open + = f.button :submit, t(:reply_and_close) + = link_to t(:destroy), ticket_path, :confirm => 'are you sure?', :method => :delete, :class => 'btn btn-danger' if admin? + = 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_comment_form.html.haml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'help/app/views/tickets/_new_comment_form.html.haml') diff --git a/help/app/views/tickets/_new_comment_form.html.haml b/help/app/views/tickets/_new_comment_form.html.haml index b273503..de54259 100644 --- a/help/app/views/tickets/_new_comment_form.html.haml +++ b/help/app/views/tickets/_new_comment_form.html.haml @@ -7,7 +7,6 @@ - if admin? = c.input :private, :as => :boolean, :label => false, :inline_label => true = f.button :submit, t(:post_reply), :class => 'btn-primary' - - if @ticket.is_open + - if logged_in? && @ticket.is_open = f.button :submit, t(:reply_and_close) - = link_to t(:destroy), ticket_path, :confirm => 'are you sure?', :method => :delete, :class => 'btn btn-danger' if admin? - = link_to t(:cancel), tickets_path, :class => :btn + = 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_comment_form.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'help/app/views/tickets/_new_comment_form.html.haml') diff --git a/help/app/views/tickets/_new_comment_form.html.haml b/help/app/views/tickets/_new_comment_form.html.haml index de54259..ff136f3 100644 --- a/help/app/views/tickets/_new_comment_form.html.haml +++ b/help/app/views/tickets/_new_comment_form.html.haml @@ -2,6 +2,7 @@ -# for posting a new comment to an existing ticket. -# = simple_form_for @ticket, :html => {:class => 'slim'} do |f| + = hidden_ticket_fields = f.simple_fields_for :comments, @comment, :wrapper => :none, :html => {:class => 'slim'} do |c| = c.input :body, :label => false, :as => :text, :input_html => {:class => "full-width", :rows=> 5} - if admin? @@ -9,4 +10,4 @@ = f.button :submit, t(:post_reply), :class => 'btn-primary' - if logged_in? && @ticket.is_open = f.button :submit, t(:reply_and_close) - = link_to t(:cancel), tickets_path, :class => :btn + = link_to t(:cancel), auto_tickets_path, :class => :btn -- cgit v1.2.3 From dc98ad8c6445182d60b3f1909e0260ace6fbfca5 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 5 Jul 2013 18:16:24 -0700 Subject: tickets - replace input[type=submit] tags with button[type=submit] tags --- help/app/views/tickets/_new_comment_form.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'help/app/views/tickets/_new_comment_form.html.haml') diff --git a/help/app/views/tickets/_new_comment_form.html.haml b/help/app/views/tickets/_new_comment_form.html.haml index ff136f3..8418e01 100644 --- a/help/app/views/tickets/_new_comment_form.html.haml +++ b/help/app/views/tickets/_new_comment_form.html.haml @@ -7,7 +7,7 @@ = c.input :body, :label => false, :as => :text, :input_html => {:class => "full-width", :rows=> 5} - if admin? = c.input :private, :as => :boolean, :label => false, :inline_label => true - = f.button :submit, t(:post_reply), :class => 'btn-primary' + = f.button :button, t(:post_reply), :name => 'commit', :class => 'btn-primary', :type => 'submit', :value => 'post_reply' - if logged_in? && @ticket.is_open - = f.button :submit, t(:reply_and_close) + = f.button :button, t(:reply_and_close), :name => 'commit', :class => 'btn', :type => 'submit', :value => 'reply_and_close' = link_to t(:cancel), auto_tickets_path, :class => :btn -- cgit v1.2.3