Browse files

Merge pull request #904 from abdurrehmanamjad/master

added the "show" button on index page for themed resources.
  • Loading branch information...
2 parents c6893c3 + f80d034 commit d3776ddd0b89d28fdebfd6e1c1541348cc90e5cc @seyhunak committed May 23, 2016
View
2 lib/generators/bootstrap/themed/templates/index.html.erb
@@ -22,6 +22,8 @@
<%- end -%>
<td><%%=l <%= resource_name %>.created_at %></td>
<td>
+ <%%= link_to t('.show', :default => t("helpers.links.show")),
+ <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs' %>
<%%= link_to t('.edit', :default => t("helpers.links.edit")),
edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs' %>
<%%= link_to t('.destroy', :default => t("helpers.links.destroy")),
View
1 lib/generators/bootstrap/themed/templates/index.html.haml
@@ -19,6 +19,7 @@
<%- end -%>
%td=l <%= resource_name %>.created_at
%td
+ = link_to t('.show', :default => t("helpers.links.show")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
= link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
= link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-xs btn-danger'
View
2 lib/generators/bootstrap/themed/templates/index.html.slim
@@ -19,6 +19,8 @@ table.table.table-striped
<%- end -%>
td=l <%= resource_name %>.created_at
td
+ = link_to t('.show', :default => t("helpers.links.show")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
+ '
= link_to t('.edit', :default => t("helpers.links.edit")), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-default btn-xs'
'
= link_to t('.destroy', :default => t("helpers.links.destroy")), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, :class => 'btn btn-xs btn-danger'

0 comments on commit d3776dd

Please sign in to comment.