summaryrefslogtreecommitdiff
path: root/help/app/views/tickets
diff options
context:
space:
mode:
Diffstat (limited to 'help/app/views/tickets')
-rw-r--r--help/app/views/tickets/_comment.html.haml2
-rw-r--r--help/app/views/tickets/index.html.haml5
-rw-r--r--help/app/views/tickets/new.html.haml2
-rw-r--r--help/app/views/tickets/show.html.haml13
4 files changed, 16 insertions, 6 deletions
diff --git a/help/app/views/tickets/_comment.html.haml b/help/app/views/tickets/_comment.html.haml
index 19e1ddf..1ba3bd1 100644
--- a/help/app/views/tickets/_comment.html.haml
+++ b/help/app/views/tickets/_comment.html.haml
@@ -3,6 +3,8 @@
- if User.find(comment.posted_by)
Posted by
= User.find(comment.posted_by).login
+ - else
+ Unauthenticated post
%p
Posted at
= comment.posted_at
diff --git a/help/app/views/tickets/index.html.haml b/help/app/views/tickets/index.html.haml
index d2e0ea0..f328ca2 100644
--- a/help/app/views/tickets/index.html.haml
+++ b/help/app/views/tickets/index.html.haml
@@ -1,8 +1,7 @@
+Create a
+= link_to "new ticket", new_ticket_path
%h2 Tickets
- @tickets.each do |ticket|
%p
= link_to ticket.title, ticket
-%p
-Create a
-= link_to "new ticket", new_ticket_path
= #render(:partial => "ticket", :collection => @tickets)
diff --git a/help/app/views/tickets/new.html.haml b/help/app/views/tickets/new.html.haml
index d784720..8c660c9 100644
--- a/help/app/views/tickets/new.html.haml
+++ b/help/app/views/tickets/new.html.haml
@@ -1,5 +1,5 @@
%h2=t :new_ticket
-= simple_form_for (@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test
+= simple_form_for(@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test
= #@ticket.errors.messages
= f.input :title
= #f.input :email #if there is no current_user
diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml
index 04dd676..a9b994e 100644
--- a/help/app/views/tickets/show.html.haml
+++ b/help/app/views/tickets/show.html.haml
@@ -5,8 +5,17 @@
%h2= @ticket.title
is open?
= @ticket.is_open
-code:
-= @ticket.code
+- if @ticket.code
+ code:
+ = @ticket.code
+- if @ticket.email
+ email:
+ = @ticket.email
+- if User.find(@ticket.created_by)
+ Created by
+ = User.find(@ticket.created_by).login
+- else
+ Unauthenticated ticket creator
= render(:partial => "comment", :collection => @ticket.comments)
= simple_form_for (@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test