summaryrefslogtreecommitdiff
path: root/help/app
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2012-12-21 15:18:05 -0800
committerjessib <jessib@leap.se>2012-12-21 15:18:05 -0800
commitb23a7999dfc3e38e0f0ea6a1a3d4fd1e86b358ca (patch)
treed8b9d161629357787e82bf7c5983dad199d301be /help/app
parent6af8c4c72be753e3aeb30bbfbadf0c49a3ed5ef4 (diff)
Still much to do, but improvements to CSS.
Diffstat (limited to 'help/app')
-rw-r--r--help/app/views/tickets/_comment.html.haml26
-rw-r--r--help/app/views/tickets/_new_comment.html.haml2
-rw-r--r--help/app/views/tickets/_ticket_data.html.haml25
-rw-r--r--help/app/views/tickets/new.html.haml21
-rw-r--r--help/app/views/tickets/show.html.haml50
5 files changed, 68 insertions, 56 deletions
diff --git a/help/app/views/tickets/_comment.html.haml b/help/app/views/tickets/_comment.html.haml
index 1ba3bd1..26794dc 100644
--- a/help/app/views/tickets/_comment.html.haml
+++ b/help/app/views/tickets/_comment.html.haml
@@ -1,13 +1,15 @@
- # style is super ugly but just for now
-%div{:style => "border: solid 1px"}
- - if User.find(comment.posted_by)
- Posted by
- = User.find(comment.posted_by).login
- - else
- Unauthenticated post
- %p
- Posted at
- = comment.posted_at
- %p
- = comment.body
- %p \ No newline at end of file
+%tr
+ %td
+ - if commenter = User.find(comment.posted_by)
+ %b
+ = 'Posted by' + (commenter.is_admin? ? ' admin' : '') + ':'
+ = commenter.login
+ - else
+ Unauthenticated post
+ .pull-right
+ %b
+ Posted at:
+ = comment.posted_at.to_s(:short)
+ %br
+ = comment.body
diff --git a/help/app/views/tickets/_new_comment.html.haml b/help/app/views/tickets/_new_comment.html.haml
index 5697854..7307dad 100644
--- a/help/app/views/tickets/_new_comment.html.haml
+++ b/help/app/views/tickets/_new_comment.html.haml
@@ -1,2 +1,2 @@
= f.simple_fields_for :comments, @comment do |c|
- = c.input :body, :label => 'Comment', :as => :text
+ = c.input :body, :label => 'Comment', :as => :text, :input_html => {:class => "span12", :rows=>4}
diff --git a/help/app/views/tickets/_ticket_data.html.haml b/help/app/views/tickets/_ticket_data.html.haml
new file mode 100644
index 0000000..3d301be
--- /dev/null
+++ b/help/app/views/tickets/_ticket_data.html.haml
@@ -0,0 +1,25 @@
+.spam12
+ %b
+ Created by:
+ - if User.find(@ticket.created_by)
+ = User.find(@ticket.created_by).login
+ - else
+ Unauthenticated ticket creator
+ - if @ticket.email
+ %b
+ email:
+ = @ticket.email
+ %b
+ Created at:
+ = @ticket.created_at.to_s(:short)
+ %b
+ Updated at:
+ = @ticket.updated_at.to_s(:short)
+ %b
+ = "Status:"
+ - if @ticket.is_open
+ = 'open'
+ = 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
diff --git a/help/app/views/tickets/new.html.haml b/help/app/views/tickets/new.html.haml
index a8c5f8f..750b990 100644
--- a/help/app/views/tickets/new.html.haml
+++ b/help/app/views/tickets/new.html.haml
@@ -1,10 +1,11 @@
-%h2=t :new_ticket
-= simple_form_for(@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test
- = f.input :title
- = f.input :email if !current_user #hmm--might authenticated users want to submit an alternate email?
- = render :partial => 'new_comment', :locals => {:f => f}
- = # regarding_user if not logged in
- = # email if not logged in
- .form-actions
- = f.button :submit, :class => 'btn-primary'
- = link_to t(:cancel), tickets_path, :class => :btn
+.span12
+ %h2=t :new_ticket
+ = simple_form_for(@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test
+ = f.input :title
+ = f.input :email if !current_user #hmm--might authenticated users want to submit an alternate email?
+ = render :partial => 'new_comment', :locals => {:f => f}
+ = # regarding_user if not logged in
+ = # email if not logged in
+ .form-actions
+ = f.button :submit, :class => 'btn-primary'
+ = link_to t(:cancel), tickets_path, :class => :btn
diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml
index 46d86de..3f00b35 100644
--- a/help/app/views/tickets/show.html.haml
+++ b/help/app/views/tickets/show.html.haml
@@ -1,34 +1,18 @@
-%h2= @ticket.title
+.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%;"}
+ %tbody
+ = render(:partial => "comment", :collection => @ticket.comments)
+ = #render @ticket.comments should work if view is in /app/views/comments/_comment
-%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
-
-%p
-- if @ticket.email
- email:
- = @ticket.email
-%li
- - if User.find(@ticket.created_by)
- Created by
- = User.find(@ticket.created_by).login
- - else
- Unauthenticated ticket creator
-%li
- = "status:"
- - if @ticket.is_open
- = 'open'
- = button_to 'close', {:post => {:is_open => false}}, :method => :put
- - else
- = 'closed'
- = button_to 'open', {:post => {:is_open => true}}, :method => :put
-= 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
- = render :partial => 'new_comment', :locals => {:f => f}
- = f.button :submit, @post_reply_str
- - if @ticket.is_open
- = f.button :submit, @reply_close_str, :class => 'btn-primary'
-= #link_to t(:destroy), ticket_path, :confirm => 'are you sure?', :method => :delete, :class => :btn if admin? # for link_to to work with delete, need to figure out jquery interaction correctly. see http://stackoverflow.com/questions/3774925/delete-link-sends-get-instead-of-delete-in-rails-3-view etc..
-= button_to 'Destroy', ticket_path, :confirm => 'are you sure?', :class => 'btn btn-danger', :method => :delete if admin?
-= link_to t(:cancel), tickets_path, :class => :btn
+ = simple_form_for(@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test
+ = 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