summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/layouts/_messages.html.haml5
-rw-r--r--app/views/layouts/application.html.haml2
-rw-r--r--help/app/views/tickets/show.html.haml6
3 files changed, 7 insertions, 6 deletions
diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml
new file mode 100644
index 0000000..80e34d4
--- /dev/null
+++ b/app/views/layouts/_messages.html.haml
@@ -0,0 +1,5 @@
+- flash.each do |name, msg|
+ - if msg.is_a?(String)
+ %div{:class => "alert alert-#{name == :notice ? "success" : "error"}"}
+ %a.close{"data-dismiss" => "alert"} ×
+ = content_tag :div, msg, :id => "flash_#{name}"
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index a57d65e..e6d22f0 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -18,6 +18,6 @@
.content
.row
.span12
- //= render 'layouts/messages'
+ = render 'layouts/messages'
= yield
%footer
diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml
index aa803e0..acd3a61 100644
--- a/help/app/views/tickets/show.html.haml
+++ b/help/app/views/tickets/show.html.haml
@@ -1,9 +1,5 @@
%h1 tickets show (just as space)
%h1 tickets show (just as space)
-- if flash[:notice]
- =flash[:notice]
-- if flash[:alert]
- =flash[:alert]
%h2= @ticket.title
- if @ticket.email
email:
@@ -26,7 +22,7 @@
= button_to 'open', {:change_status => :open}, :method => :put
= render(:partial => "comment", :collection => @ticket.comments)
-= simple_form_for (@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test
+= simple_form_for(@ticket, :html => {:novalidate => true}) do |f| #turn off html5 validations to test
= f.simple_fields_for :comments, TicketComment.new do |c|
= c.input :body, :label => 'Comment', :as => :text
= #render :partial => 'new_comment'