Sha256: 200645917dbb6f11e9cc341e68294e0801cc0975bfc9658d23365d164ac0c65b

Contents?: true

Size: 883 Bytes

Versions: 9

Compression:

Stored size: 883 Bytes

Contents

<%# Used to render a unique flash message styling %>
<%%
 	if request.xhr?
		flash_message = flash.now[:success] || flash.now[:notice] || flash.now[:alert]
		style_classes = ""
	else
		style_classes = "margin-top-10 margin-bottom-5 margin-left-40 margin-right-40"
		flash_message = flash[:success] || flash[:notice] || flash[:alert]
	end
	cls_name = "alert"
	cls_name = 'alert-success' if flash.now[:success] || flash[:success]
	cls_name = 'alert-notice' if flash.now[:notice] || flash[:notice]
	cls_name = 'alert-error' if flash.now[:alert] || flash[:alert]
	
	flash_message = flash_message.strip if flash_message
	
 %>
<%% unless flash_message.blank? %>
  <div class="<%%= style_classes %> alert <%%= cls_name %> fade in" data-alert="alert" style="margin-bottom:5px;">
    <a class="close" data-dismiss='alert' href="#">×</a>
    <p><%%= flash_message %></p>
  </div>
<%% end %>

Version data entries

9 entries across 7 versions & 1 rubygems

Version Path
humdrum-rails-0.1.1 lib/rails/generators/humdrum/layout/templates/views/bootstrap2/layouts/common/_flash_message.html.erb
humdrum-rails-0.0.9 lib/rails/generators/humdrum/layout/templates/views/bootstrap3/layouts/common/_flash_message.html.erb
humdrum-rails-0.0.9 lib/rails/generators/humdrum/layout/templates/views/bootstrap2/layouts/common/_flash_message.html.erb
humdrum-rails-0.0.8 lib/rails/generators/humdrum/layout/templates/views/bootstrap/layouts/common/_flash_message.html.erb
humdrum-rails-0.0.7 lib/rails/generators/humdrum/layout/templates/views/bootstrap/layouts/common/_flash_message.html.erb
humdrum-rails-0.0.6 lib/rails/generators/humdrum/layout/templates/views/bootstrap/layouts/common/_flash_message.html.erb
humdrum-rails-0.0.4 lib/rails/generators/humdrum/layout/templates/views/gumby/layouts/common/_flash_message.html.erb
humdrum-rails-0.0.4 lib/rails/generators/humdrum/layout/templates/views/bootstrap/layouts/common/_flash_message.html.erb
humdrum-rails-0.0.3 lib/rails/generators/humdrum/layout/templates/views/layouts/common/_flash_message.html.erb