summaryrefslogtreecommitdiff
path: root/help/app/views/tickets
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-06-17 01:27:01 -0700
committerelijah <elijah@riseup.net>2013-07-04 03:57:59 -0700
commit7d58f640e89a89a4767e59883b864afcd4e9dad4 (patch)
tree5ddb5705c2062931c3e9478b8e6440150deaf4e1 /help/app/views/tickets
parent3f51128e24e1ca3247169066aa6a03090df98dd6 (diff)
new ui - ticket navigation
Diffstat (limited to 'help/app/views/tickets')
-rw-r--r--help/app/views/tickets/_order-nav.html.haml2
-rw-r--r--help/app/views/tickets/_status-nav.html.haml2
-rw-r--r--help/app/views/tickets/_table-nav.html.haml9
-rw-r--r--help/app/views/tickets/index.html.haml23
-rw-r--r--help/app/views/tickets/new.html.haml25
5 files changed, 32 insertions, 29 deletions
diff --git a/help/app/views/tickets/_order-nav.html.haml b/help/app/views/tickets/_order-nav.html.haml
index 9e8bcee..a2ddb72 100644
--- a/help/app/views/tickets/_order-nav.html.haml
+++ b/help/app/views/tickets/_order-nav.html.haml
@@ -1,4 +1,4 @@
-%ul.nav.nav-pills.pull-right
+%ul.nav.nav-pills.pull-right{:style => 'margin-bottom: 0'}
%li{:class=> ("active" if order.start_with? 'created_at' )}
= link_to_order('created')
%li{:class=> ("active" if order.start_with? 'updated_at' )}
diff --git a/help/app/views/tickets/_status-nav.html.haml b/help/app/views/tickets/_status-nav.html.haml
index 69f4248..e1dca84 100644
--- a/help/app/views/tickets/_status-nav.html.haml
+++ b/help/app/views/tickets/_status-nav.html.haml
@@ -5,3 +5,5 @@
= link_to_status 'closed'
%li{:class => ("active" if status == 'all')}
= link_to_status 'all'
+ %li{:class => ("active" if action?(:new))}
+ = link_to icon(:plus, :black) + t(:new_ticket), new_ticket_path
diff --git a/help/app/views/tickets/_table-nav.html.haml b/help/app/views/tickets/_table-nav.html.haml
index 635b59b..45ebfb2 100644
--- a/help/app/views/tickets/_table-nav.html.haml
+++ b/help/app/views/tickets/_table-nav.html.haml
@@ -1,5 +1,4 @@
-.row
- .span6
- = render 'tickets/status-nav'
- .span4
- = render 'tickets/order-nav'
+- unless action?(:new)
+ = render 'tickets/order-nav'
+= render 'tickets/status-nav'
+
diff --git a/help/app/views/tickets/index.html.haml b/help/app/views/tickets/index.html.haml
index 23a503d..a3cbfcf 100644
--- a/help/app/views/tickets/index.html.haml
+++ b/help/app/views/tickets/index.html.haml
@@ -1,17 +1,12 @@
-%h1 tickets index
+- if admin?
+ = render 'tickets/admin-nav'
-Create a
-= link_to "new ticket", new_ticket_path
+= render 'tickets/table-nav'
+
+%table.table-striped.table-bordered.table-hover
+ //{:style => "width:100%;"}
+ %tbody
+ = render @tickets.all
+= paginate @tickets
-= #%div{"data-pjax-container" => ""} # not sure how to get this working right
-.row
- .span2
- - if admin?
- = render 'tickets/admin-nav'
- .span10
- = render 'tickets/table-nav'
- %table.table-striped.table-bordered.table-hover{:style => "width:100%;"}
- %tbody
- = render @tickets.all
- = paginate @tickets
diff --git a/help/app/views/tickets/new.html.haml b/help/app/views/tickets/new.html.haml
index 1aa689b..5442910 100644
--- a/help/app/views/tickets/new.html.haml
+++ b/help/app/views/tickets/new.html.haml
@@ -1,10 +1,17 @@
-.span12
- %h2=t :new_ticket
- = simple_form_for @ticket, :validate => true, :html => {:class => 'form-horizontal'} do |f|
- = f.input :title
- = f.input :email if !current_user #hmm--might authenticated users want to submit an alternate email?
+
+//%h2.first= t :new_ticket
+
+= render 'tickets/table-nav'
+
+= simple_form_for @ticket, :validate => true, :html => {:class => 'form-horizontal'} do |f|
+ = f.input :title
+ - if user
+ = f.input :email, input_html: {value: user.email_address}
+ = f.input :regarding_user, input_html: {value: user.login}
+ - else
+ = f.input :email
= f.input :regarding_user
- = render :partial => 'new_comment', :locals => {:f => f}
- .form-actions
- = f.button :submit, :class => 'btn-primary'
- = link_to t(:cancel), tickets_path, :class => :btn
+ = render :partial => 'new_comment', :locals => {:f => f}
+ .form-actions
+ = f.button :submit, :class => 'btn-primary'
+ = link_to t(:cancel), tickets_path, :class => :btn