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/show.html.haml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'help/app/views/tickets/show.html.haml') diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml index a69048b..ddd4e9f 100644 --- a/help/app/views/tickets/show.html.haml +++ b/help/app/views/tickets/show.html.haml @@ -1,18 +1,10 @@ -.spam12 - %h2 - %a#title.editable.editable-click{"data-name" => "title", "data-resource" => "post", "data-type" => "text", "data-url" => ticket_path(@ticket.id), "data-pk" => @ticket.id, :href => "#"} - = @ticket.title - = render 'tickets/ticket_data' - %table.table-striped.table-bordered.table-hover{:style => "width:100%;"} +.ticket + = render 'tickets/edit_form' + %table.table.table-striped.table-bordered %tbody - = render(:partial => "comment", :collection => @ticket.comments) - = #render @ticket.comments should work if view is in /app/views/comments/_comment - - = simple_form_for @ticket, :html => {:class => 'form-horizontal'} do |f| # don't need validations so long as this is so simple - = render :partial => 'new_comment', :locals => {:f => f} - .span10.offset3 - = f.button :submit, @post_reply_str, :class => 'btn-primary' - - if @ticket.is_open - = f.button :submit, @reply_close_str - = 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 + = render :partial => 'tickets/comment', :collection => @ticket.comments + %tr + %td.user + = logged_in? ? current_user.login : t(:anonymous) + %td.comment + = render 'tickets/new_comment_form' \ No newline at end of file -- 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/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'help/app/views/tickets/show.html.haml') diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml index ddd4e9f..bfdb773 100644 --- a/help/app/views/tickets/show.html.haml +++ b/help/app/views/tickets/show.html.haml @@ -1,3 +1,5 @@ +- @show_navigation = !params[:user_id].nil? + .ticket = render 'tickets/edit_form' %table.table.table-striped.table-bordered -- cgit v1.2.3