summaryrefslogtreecommitdiff
path: root/help/app/views
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-07-04 01:35:49 -0700
committerelijah <elijah@riseup.net>2013-07-04 01:35:49 -0700
commitc96f3544c5e7289eb4157981cc9f680d689d861f (patch)
tree09c090e59b9b20404260634994116c1092f24df3 /help/app/views
parent65fed45ce918011dd3e563b114651d434fadb23c (diff)
help - fix ticket navigation & links (use @user, not user).
Diffstat (limited to 'help/app/views')
-rw-r--r--help/app/views/tickets/_order-nav.html.haml5
-rw-r--r--help/app/views/tickets/_table-nav.html.haml4
-rw-r--r--help/app/views/tickets/_tabs.html.haml (renamed from help/app/views/tickets/_status-nav.html.haml)13
-rw-r--r--help/app/views/tickets/index.html.haml2
-rw-r--r--help/app/views/tickets/new.html.haml15
5 files changed, 25 insertions, 14 deletions
diff --git a/help/app/views/tickets/_order-nav.html.haml b/help/app/views/tickets/_order-nav.html.haml
deleted file mode 100644
index b235350..0000000
--- a/help/app/views/tickets/_order-nav.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%ul.nav.nav-pills.pull-right{:style => 'margin-bottom: 0'}
- %li{:class=> ("active" if search_order.start_with? 'created_at' )}
- = link_to_order('created')
- %li{:class=> ("active" if search_order.start_with? 'updated_at' )}
- = link_to_order('updated')
diff --git a/help/app/views/tickets/_table-nav.html.haml b/help/app/views/tickets/_table-nav.html.haml
deleted file mode 100644
index 45ebfb2..0000000
--- a/help/app/views/tickets/_table-nav.html.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-- unless action?(:new)
- = render 'tickets/order-nav'
-= render 'tickets/status-nav'
-
diff --git a/help/app/views/tickets/_status-nav.html.haml b/help/app/views/tickets/_tabs.html.haml
index 8e51497..b7b5d3a 100644
--- a/help/app/views/tickets/_status-nav.html.haml
+++ b/help/app/views/tickets/_tabs.html.haml
@@ -1,3 +1,16 @@
+-#
+-# SORT ORDER TABS
+-#
+- unless action?(:new)
+ %ul.nav.nav-pills.pull-right.slim
+ %li{:class=> ("active" if search_order.start_with? 'created_at')}
+ = link_to_order('created')
+ %li{:class=> ("active" if search_order.start_with? 'updated_at')}
+ = link_to_order('updated')
+
+-#
+-# STATUS FILTER TABS
+-#
%ul.nav.nav-tabs
- if logged_in?
%li{:class => ("active" if search_status == 'open')}
diff --git a/help/app/views/tickets/index.html.haml b/help/app/views/tickets/index.html.haml
index 1b32dc1..c02a326 100644
--- a/help/app/views/tickets/index.html.haml
+++ b/help/app/views/tickets/index.html.haml
@@ -1,6 +1,6 @@
- @show_navigation = !params[:user_id].nil?
-= render 'tickets/table-nav'
+= render 'tickets/tabs'
%table.table.table-striped.table-bordered
%thead
diff --git a/help/app/views/tickets/new.html.haml b/help/app/views/tickets/new.html.haml
index 04b091c..4d35659 100644
--- a/help/app/views/tickets/new.html.haml
+++ b/help/app/views/tickets/new.html.haml
@@ -1,13 +1,20 @@
- @show_navigation = !params[:user_id].nil?
-= render 'tickets/table-nav'
+= render 'tickets/tabs'
+
+- if admin? && @user
+ - email = @user.email_address
+ - regarding = @user.login
+- elsif logged_in?
+ - email = current_user.email_address
+ - regarding = current_user.login
= simple_form_for @ticket, :validate => true, :html => {:class => 'form-horizontal'} do |f|
= hidden_ticket_fields
= f.input :title, :label => t(:subject)
- - if user
- = f.input :email, input_html: {value: user.email_address}
- = f.input :regarding_user, input_html: {value: user.login}
+ - if logged_in?
+ = f.input :email, input_html: {value: email}
+ = f.input :regarding_user, input_html: {value: regarding}
- else
= f.input :email
= f.input :regarding_user