Sha256: 48cf903b6df4aad1e20f5dc881601eb61887e68a944737ab47904c5879418962

Contents?: true

Size: 1.68 KB

Versions: 16

Compression:

Stored size: 1.68 KB

Contents

<%%- page_title t('activerecord.models.<%= singular_table_name %>.one') -%>
<h2><%%= t('headers.show', name: t('activerecord.models.<%= singular_table_name %>.one')) %></h2>

<table class="table table-striped table-hover">
  <tbody>
<% attributes.each do |attribute| -%>
    <tr>
      <td>
  <%- if [ "created_by", "updated_by" ].include? attribute.name -%>
        <%%= t('activerecord.attributes.<%= attribute.name %>') %>
  <%- else -%>
        <%%= t('activerecord.attributes.<%= singular_table_name %>.<%= attribute.name %>') %>
  <%- end -%>
      </td>
      <td>
  <%- if attribute.name.include?("picture") -%>
        <%%= image_tag(@<%= singular_table_name %>.<%= attribute.name %>_url(:display)) %>
  <%- elsif attribute.type == :boolean -%>
        <%%= @<%= singular_table_name %>.<%= attribute.name %> ? t('simple_form.yes') : t('simple_form.no') %>
  <%- elsif attribute.type == :belongs_to -%>
        <%%= @<%= singular_table_name %>.<%= attribute.name %>.name %>
  <%- elsif attribute.name == "created_by" -%>
        <%%= raw(text_created_by(@<%= singular_table_name %>, "create")) %>
  <%- elsif attribute.name == "updated_by" -%>
        <%%= raw(text_created_by(@<%= singular_table_name %>, "update")) %>
  <%- else -%>
        <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
  <%- end -%>
      </td>
    </tr>
<% end -%>
  </tbody>
</table>

<%%= link_to t('actions.edit'), [:edit, @<%= singular_table_name %>], class: 'btn btn-primary' %>
<%%= link_to t('actions.back.index'), <%= index_helper %>_path, class: 'btn btn-default' %>
<%%= link_to t('actions.destroy'), @<%= singular_table_name %>, method: :delete, data: { confirm: t('actions.confirm') }, class: 'btn btn-danger' %>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
bootswatch_rails-3.3.0.4 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.0.3 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.0.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.0.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.43 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.42 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.41 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.40 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.39 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.38 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.37 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.36 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.35 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.34 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.33 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.2.0.32 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb