summaryrefslogtreecommitdiff
path: root/engines/support/app/views/tickets/new.html.haml
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-04-11 10:03:19 +0200
committerAzul <azul@leap.se>2014-04-11 10:07:23 +0200
commit636692f9921bd695d726695d2d46c91f5a6e56f3 (patch)
treea7cc0b89007bd273ae7719f31c16e052a141fec7 /engines/support/app/views/tickets/new.html.haml
parent32136605ddd405a0bf47f3b795b22fd4b49465b5 (diff)
move engines into engines directory
Also renamed help to support so it's harder to confuse it with documentation
Diffstat (limited to 'engines/support/app/views/tickets/new.html.haml')
-rw-r--r--engines/support/app/views/tickets/new.html.haml30
1 files changed, 30 insertions, 0 deletions
diff --git a/engines/support/app/views/tickets/new.html.haml b/engines/support/app/views/tickets/new.html.haml
new file mode 100644
index 0000000..8f217a5
--- /dev/null
+++ b/engines/support/app/views/tickets/new.html.haml
@@ -0,0 +1,30 @@
+- @show_navigation = !params[:user_id].nil?
+
+= 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 :subject
+ - 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
+ = f.simple_fields_for :comments, @comment do |c|
+ = c.input :body, :label => t(:description), :as => :text, :input_html => {:class => "full-width", :rows=> 5}
+ - if admin?
+ = c.input :private, :as => :boolean, :label => false, :inline_label => true
+ .form-actions
+ = f.button :submit, :class => 'btn-primary', :value => t(:create_thing, :thing => t(:ticket))
+ - if logged_in?
+ = link_to t(:cancel), auto_tickets_path, :class => :btn
+ - else
+ = link_to t(:cancel), home_path, :class => 'btn' \ No newline at end of file