diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:01:45 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:01:45 +0100 |
commit | b80bd744ad873f6fc43018bc4bfb90677de167bd (patch) | |
tree | 072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/shared/_show_edit_destroy_part.html.haml | |
parent | 3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff) |
Start of GS5.
Diffstat (limited to 'app/views/shared/_show_edit_destroy_part.html.haml')
-rw-r--r-- | app/views/shared/_show_edit_destroy_part.html.haml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/shared/_show_edit_destroy_part.html.haml b/app/views/shared/_show_edit_destroy_part.html.haml new file mode 100644 index 0000000..aff18d1 --- /dev/null +++ b/app/views/shared/_show_edit_destroy_part.html.haml @@ -0,0 +1,16 @@ +%p + - if !(defined? parent).nil? && !(defined? child).nil? + - if can? :edit, child + = link_to t("#{child.class.name.underscore.pluralize}.show.actions.edit"), method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) + - if can? :destroy, child + - if can? :edit, child + | + = link_to t("#{child.class.name.underscore.pluralize}.show.actions.destroy"), method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :method => :delete + + - elsif !(defined? child).nil? + - if can? :edit, child + = link_to t("#{child.class.name.underscore.pluralize}.show.actions.edit"), method( :"edit_#{child.class.name.underscore}_path" ).(child) + - if can? :destroy, child + - if can? :edit, child + | + = link_to t("#{child.class.name.underscore.pluralize}.show.actions.destroy"), method( :"#{child.class.name.underscore}_path" ).(child), :method => :delete
\ No newline at end of file |