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.haml10
-rw-r--r--help/app/views/tickets/_new_comment.html.haml2
-rw-r--r--help/app/views/tickets/index.html.haml5
-rw-r--r--help/app/views/tickets/new.html.haml14
-rw-r--r--help/app/views/tickets/show.html.haml10
5 files changed, 41 insertions, 0 deletions
diff --git a/help/app/views/tickets/_comment.html.haml b/help/app/views/tickets/_comment.html.haml
new file mode 100644
index 0000000..77e29b8
--- /dev/null
+++ b/help/app/views/tickets/_comment.html.haml
@@ -0,0 +1,10 @@
+%div
+ - if User.find(comment.posted_by)
+ Posted by
+ = User.find(comment.posted_by).login
+ %p
+ Posted at
+ = comment.posted_at
+ %p
+ = comment.body
+ %p \ No newline at end of file
diff --git a/help/app/views/tickets/_new_comment.html.haml b/help/app/views/tickets/_new_comment.html.haml
new file mode 100644
index 0000000..bf88da6
--- /dev/null
+++ b/help/app/views/tickets/_new_comment.html.haml
@@ -0,0 +1,2 @@
+= simple_fields_for :comment do |c|
+ = c.input :body, :label => 'Comment', :as => :text
diff --git a/help/app/views/tickets/index.html.haml b/help/app/views/tickets/index.html.haml
new file mode 100644
index 0000000..55bfa79
--- /dev/null
+++ b/help/app/views/tickets/index.html.haml
@@ -0,0 +1,5 @@
+%h2 Tickets
+- @tickets.each do |ticket|
+ %p
+ = link_to ticket.title, ticket
+= #render(:partial => "ticket", :collection => @tickets) \ No newline at end of file
diff --git a/help/app/views/tickets/new.html.haml b/help/app/views/tickets/new.html.haml
new file mode 100644
index 0000000..fd1bcd4
--- /dev/null
+++ b/help/app/views/tickets/new.html.haml
@@ -0,0 +1,14 @@
+%h2=t :new_ticket
+= simple_form_for @ticket do |f|
+ = f.input :title
+ = #f.input :email #if there is no current_user
+ = f.input :email if !User.current_test
+ = #simple_fields_for :comment do |c|
+ = #c.input :body, :label => 'Comment', :as => :text
+ = #f.input :comment
+ = render :partial => 'new_comment'
+ = # regarding_user if not logged in
+ = # email if not logged in
+ = #f.button :submit, :value => t(:submit), :class => 'btn-primary'
+ = f.button :submit
+ = link_to t(:cancel), root_url, :class => :btn
diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml
new file mode 100644
index 0000000..a37f5c8
--- /dev/null
+++ b/help/app/views/tickets/show.html.haml
@@ -0,0 +1,10 @@
+%h2= @ticket.title
+is open?
+= @ticket.is_open
+code:
+= @ticket.code
+= render(:partial => "comment", :collection => @ticket.comments)
+
+= simple_form_for @ticket do |f|
+ = render :partial => 'new_comment'
+ = f.button :submit \ No newline at end of file