summaryrefslogtreecommitdiff
path: root/help/app/views
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2012-11-08 15:30:04 -0800
committerjessib <jessib@riseup.net>2012-11-08 15:30:04 -0800
commit30f04a24fe0dcbdc779584ec92c1a06801195f86 (patch)
tree590b4bee0124fe72a87b8ea78fbae4da42ad82b3 /help/app/views
parent2f44497b6206ad7b31e7444f52609cb3e56b8ab5 (diff)
First attempt at functionality for admins viewing their own tickets.
Diffstat (limited to 'help/app/views')
-rw-r--r--help/app/views/tickets/index.html.haml6
-rw-r--r--help/app/views/tickets/show.html.haml1
2 files changed, 6 insertions, 1 deletions
diff --git a/help/app/views/tickets/index.html.haml b/help/app/views/tickets/index.html.haml
index dff39ce..8fe4055 100644
--- a/help/app/views/tickets/index.html.haml
+++ b/help/app/views/tickets/index.html.haml
@@ -4,7 +4,11 @@ Create a
= # below shouldn't be unless logged in
%h2 Tickets
= form_tag (tickets_path, :method => :get) do # want to redo as ajax, and make sure it displays the selected option
- = select_tag :status, options_for_select(["open", "closed", "all"])
+ - options = ["open", "closed", "all"]
+ - if admin?
+ - options << "open tickets I admin" # obviously not what we will want
+ - options << "all tickets I admin" # obviously not what we will want
+ = select_tag :status, options_for_select(options) # TODO
= submit_tag "filter"
- @tickets.each do |ticket|
%p
diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml
index acd3a61..77d168a 100644
--- a/help/app/views/tickets/show.html.haml
+++ b/help/app/views/tickets/show.html.haml
@@ -21,6 +21,7 @@
= 'closed'
= button_to 'open', {:change_status => :open}, :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
= f.simple_fields_for :comments, TicketComment.new do |c|