lib/generators/admin/scaffold_controller/templates/views/erb/show.html.erb.erb in admin_help-0.1.3 vs lib/generators/admin/scaffold_controller/templates/views/erb/show.html.erb.erb in admin_help-0.1.4

- old
+ new

@@ -1,11 +1,23 @@ -<p id="notice"><%%= notice %></p> +<div class="panel"> + <table class="table table--vertical"> + <thead> + <tr> + <th style="width:30%">属性</th> + <th>值</th> + </tr> + </thead> -<% attributes.reject(&:password_digest?).each do |attribute| -%> -<p> - <strong><%= attribute.human_name %>:</strong> - <%%= @<%= singular_table_name %>.<%= attribute.name %> %> -</p> - -<% end -%> -<%%= link_to 'Edit', edit_<%= prefixed_plain_model_url %>_path(@<%= singular_table_name %>) %> | -<%%= link_to 'Back', <%= prefixed_index_helper %>_path %> + <tbody> + <% attributes.reject(&:password_digest?).each do |attribute| %> + <tr> + <th><%%= <%= singular_table_name.classify %>.human_attribute_name(:<%= attribute.name %>) %>:</th> + <td><%%= @<%= singular_table_name %>.<%= attribute.name %> %></td> + </tr> + <% end %> + </tbody> + </table> + <div class="actions"> + <%%= link_to t('actions.edit'), edit_<%= prefixed_plain_model_url %>_path(@<%= singular_table_name %>), class: "button button--primary" %> + <%%= link_to t('buttons.back'), <%= prefixed_index_helper %>_path, class: "button button--info" %> + </div> +</div>