Sha256: c2071afc10ad6e99badc13661e157d05130839106e7a760a3da6f6a5726fd70e

Contents?: true

Size: 1.74 KB

Versions: 25

Compression:

Stored size: 1.74 KB

Contents

<%%- page_title t('activerecord.models.<%= singular_table_name %>.one') -%>
<h2><%%= t('headers.show', name: t('activerecord.models.<%= singular_table_name %>.one')) %></h2>
<%%- content_for(:help) { "<%= singular_table_name %>_show" } -%>

<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

25 entries across 25 versions & 1 rubygems

Version Path
bootswatch_rails-3.3.7.8 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.7.7 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.7.6 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.7.5 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.7.4 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.7.3 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.7.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.7.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.7.0 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.6.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.6.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.5.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.5.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.4.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.2.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.1.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.1.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.1.0 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.0.11 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.3.0.10 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb