Sha256: 41cffdb0657fc2dc3cd2700f67c9a886632bb44c18d7aaa7025f13e299c4c7bc

Contents?: true

Size: 1.29 KB

Versions: 9

Compression:

Stored size: 1.29 KB

Contents

<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>
        <%%= t('activerecord.attributes.<%= singular_table_name %>.<%= attribute.name %>') %>
      </td>
      <td>
  <%- if attribute.name.include?("picture") -%>
        <p>
          <%%= link_to "Anzeigen in Originalgröße", '#' %>
        </p>
        <%%= 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 %>
  <%- 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

9 entries across 9 versions & 1 rubygems

Version Path
bootswatch_rails-3.1.1.9 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.1.1.8 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.1.1.7 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.1.1.6 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.1.1.5 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.1.1.4 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.1.1.3 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.1.1.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb
bootswatch_rails-3.1.1.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/show.html.erb