summaryrefslogtreecommitdiff
path: root/help/app/views
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2012-10-16 15:51:35 -0700
committerjessib <jessib@riseup.net>2012-10-16 15:51:35 -0700
commit48d6c2aac9ae2bf1c140e734a576e45289c99150 (patch)
treee52e003e635ee650fbe0981dc1cb4c29c409429e /help/app/views
parent56273c13f54a872d02db286c90a8d5103cf7a663 (diff)
Some functional tests and other tweaks.
Diffstat (limited to 'help/app/views')
-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