Sha256: e28b185763c061112696f508378bba64a1f1672877e3605ca15c2839756af451
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
<% if model && model.respond_to?('errors') && model.errors && model.errors.any? %> <div id="error_explanation"> <div class="alert alert-danger"> <strong>The form contains <%= pluralize(model.errors.count, 'error') %>.</strong> <% if model.errors.count > 6 %> <div id="error_top_<%= model.object_id %>" style="display: block;"> <% model.errors.full_messages[0..2].each do |msg| %> <li><%= msg %></li> <% end %> <li><a href="javascript:show_all_<%= model.object_id %>()" title="Show all errors">... plus <%= model.errors.count - 3 %> more</a></li> </div> <div id="error_all_<%= model.object_id %>" style="display: none;"> <% model.errors.full_messages.each do |msg| %> <li><%= msg %></li> <% end %> </div> <script type="text/javascript"> function show_all_<%= model.object_id %>() { $('#error_top_<%= model.object_id %>').hide(); $('#error_all_<%= model.object_id %>').show(); } </script> <% else %> <ul> <% model.errors.full_messages.each do |msg| %> <li><%= msg %></li> <% end %> </ul> <% end %> </div> </div> <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
barkest_core-1.5.4.0 | app/views/shared/_error_messages.html.erb |
barkest_core-1.5.3.0 | app/views/shared/_error_messages.html.erb |