Sha256: 9fca83ad549bd4078fea7c9f601b1e4d929581b7c1ee6139622564105bfcfc67
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
<%% secondary_navigation({:value => link_to(t(:list),<%= plural_table_name %>_path)}, ({:value => link_to(t(:add), new_<%= singular_table_name %>_path)}<%= " if can?(:create, @#{singular_table_name})" if authorization? %>), ({:value => link_to(t(:edit), edit_<%= singular_table_name %>_path(@<%= singular_table_name %>))}<%= " if can?(:update, @#{singular_table_name})" if authorization? %>), {:value => link_to(t(:show), @<%= singular_table_name %>), :active => true} )%> <table> <% attributes.each do |attribute| -%> <tr> <%- case attribute.type when :boolean -%> <td><b><%%= t('attributes.<%= singular_table_name %>.<%= attribute.name %>') %>:</b></td> <td><%%= @<%= singular_table_name %>.<%= attribute.name %> ? style_image_tag("ico_v.png", :class => "ico_true") : style_image_tag("ico_x.png", :class => "ico_false") %></td> <%- when :references, :belongs_to -%> <%% link_name = @<%= singular_table_name %>.<%= attribute.name %>.try(:name) || @<%= singular_table_name %>.<%= attribute.name %>.try(:id) %> <td><b><%%= t('attributes.<%= singular_table_name %>.<%= attribute.name %>') %>:</b></td> <td><%%= link_to(link_name, @<%= singular_table_name %>.<%= attribute.name %> ) %></td> <%- else -%> <td><b><%%= t('attributes.<%= singular_table_name %>.<%= attribute.name %>') %>:</b></td> <td><%%= @<%= singular_table_name %>.<%= attribute.name %> %></td> <%- end -%> </tr> <% end -%> </table>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
leonardo-1.5.0 | lib/generators/erb/leosca/templates/show.html.erb |