diff options
author | jessib <jessib@leap.se> | 2013-01-17 10:39:15 -0800 |
---|---|---|
committer | jessib <jessib@leap.se> | 2013-01-17 10:39:15 -0800 |
commit | 7d7741f7d26c3ae7ee1dc347a6b1a1142a3c2824 (patch) | |
tree | 5ec11b9600d4330ec94f56dda779634cd7dcae1b /help/app/views | |
parent | 2485527650c4832d764d318e91c10bafde8b8ae5 (diff) | |
parent | b550cd14f33b9664fe6b547dc56107fae7d12caf (diff) |
Merge branch 'master' into feature/unauthenticated_tickets
Conflicts:
help/app/views/tickets/_comment.html.haml
help/app/views/tickets/_new_comment.html.haml
Diffstat (limited to 'help/app/views')
-rw-r--r-- | help/app/views/tickets/_comment.html.haml | 6 | ||||
-rw-r--r-- | help/app/views/tickets/_new_comment.html.haml | 2 | ||||
-rw-r--r-- | help/app/views/tickets/_ticket.html.haml | 22 | ||||
-rw-r--r-- | help/app/views/tickets/_ticket_data.html.haml | 2 | ||||
-rw-r--r-- | help/app/views/tickets/new.html.haml | 2 | ||||
-rw-r--r-- | help/app/views/tickets/show.html.haml | 2 |
6 files changed, 21 insertions, 15 deletions
diff --git a/help/app/views/tickets/_comment.html.haml b/help/app/views/tickets/_comment.html.haml index 01cf01a..501ceec 100644 --- a/help/app/views/tickets/_comment.html.haml +++ b/help/app/views/tickets/_comment.html.haml @@ -7,7 +7,8 @@ = 'Posted by' + (comment.posted_by_user.is_admin? ? ' admin' : '') + ':' = comment.posted_by_user.login - else - Unauthenticated post + %b + Unauthenticated post - if comment.private (Private comment) .pull-right @@ -15,4 +16,5 @@ Posted at: = comment.posted_at.to_s(:short) %br - = comment.body
\ No newline at end of file + = comment.body + diff --git a/help/app/views/tickets/_new_comment.html.haml b/help/app/views/tickets/_new_comment.html.haml index 8d40bb6..96388ea 100644 --- a/help/app/views/tickets/_new_comment.html.haml +++ b/help/app/views/tickets/_new_comment.html.haml @@ -1,4 +1,4 @@ = f.simple_fields_for :comments, @comment do |c| - = c.input :body, :label => 'Comment', :as => :text, :input_html => {:class => "span12", :rows=>4} + = c.input :body, :label => 'Comment', :as => :text, :input_html => {:class => "span9", :rows=>4} - if admin? = c.input :private, :as => :boolean, :label => false, :inline_label => true diff --git a/help/app/views/tickets/_ticket.html.haml b/help/app/views/tickets/_ticket.html.haml index 3edfa8b..7b37652 100644 --- a/help/app/views/tickets/_ticket.html.haml +++ b/help/app/views/tickets/_ticket.html.haml @@ -1,13 +1,17 @@ +- updated_at_text = 'updated: ' + ticket.updated_at.to_s(:long) %tr %td %b = link_to ticket.title, ticket - %br - %small - created: - = ticket.created_at.to_s(:short) - updated: - = ticket.updated_at.to_s(:short) - %small.pull-right - comments by: - = ticket.commenters + - if params[:controller] == 'tickets' + %br + %small + created: + = ticket.created_at.to_s(:long) + = updated_at_text + %small.pull-right + comments by: + = ticket.commenters + - else + %small + = updated_at_text
\ No newline at end of file diff --git a/help/app/views/tickets/_ticket_data.html.haml b/help/app/views/tickets/_ticket_data.html.haml index 2261d8f..d68d3e9 100644 --- a/help/app/views/tickets/_ticket_data.html.haml +++ b/help/app/views/tickets/_ticket_data.html.haml @@ -32,4 +32,4 @@ = button_to 'Close', {:post => {:is_open => false}}, :method => :put, :class => 'btn btn-small' - else = 'closed' - = button_to 'Open', {:post => {:is_open => true}}, :method => :put, :class => 'btn btn-small'
\ No newline at end of file + = button_to 'Open', {:post => {:is_open => true}}, :method => :put, :class => 'btn btn-small' diff --git a/help/app/views/tickets/new.html.haml b/help/app/views/tickets/new.html.haml index af8baad..1aa689b 100644 --- a/help/app/views/tickets/new.html.haml +++ b/help/app/views/tickets/new.html.haml @@ -1,6 +1,6 @@ .span12 %h2=t :new_ticket - = simple_form_for(@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test + = 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? = f.input :regarding_user diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml index 3f00b35..a69048b 100644 --- a/help/app/views/tickets/show.html.haml +++ b/help/app/views/tickets/show.html.haml @@ -8,7 +8,7 @@ = render(:partial => "comment", :collection => @ticket.comments) = #render @ticket.comments should work if view is in /app/views/comments/_comment - = simple_form_for(@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test + = 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' |