lib/generators/bootswatch_rails/sorcery/templates/show.html.erb in bootswatch_rails-3.2.0.21 vs lib/generators/bootswatch_rails/sorcery/templates/show.html.erb in bootswatch_rails-3.2.0.22
- old
+ new
@@ -79,10 +79,15 @@
<%%- end -%>
<%- end -%>
</tbody>
</table>
-<%%= link_to t('actions.edit'), [:edit, @<%= name %>], class: 'btn btn-primary' %>
-<%%= link_to t('actions.back.index'), <%= table_name %>_path, class: 'btn btn-default' %>
-<%%- if current_<%= name %>.status == :sysadm and @<%= name %> != current_<%= name %> -%>
+<%%- if current_<%= name %>.status.to_sym == :sysadm or @<%= name %> == current_<%= name %> -%>
+ <%%= link_to t('actions.edit'), [:edit, @<%= name %>], class: 'btn btn-primary' %>
+ <%%= link_to t('actions.back.index'), <%= table_name %>_path, class: 'btn btn-default' %>
+<%%- else -%>
+ <%%= link_to t('actions.back.index'), <%= table_name %>_path, class: 'btn btn-primary' %>
+<%%- end -%>
+<%%- if current_<%= name %>.status.to_sym == :sysadm and @<%= name %> != current_<%= name %> -%>
<%%= link_to t('actions.destroy'), @<%= name %>, method: :delete, data: { confirm: t('actions.confirm') }, class: 'btn btn-danger' %>
<%%- end -%>
+