summaryrefslogtreecommitdiff
path: root/app/views/shared/_index_view_edit_destroy_part.html.haml
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-23 00:49:51 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-23 00:49:51 +0100
commitd97896546095722ccd3a2051cdb2c2ab1b364328 (patch)
tree036b0975d94f6cba7db67de1be0a9970a455900f /app/views/shared/_index_view_edit_destroy_part.html.haml
parent6794ba5553a4a3f7206718276052c5c20c0ea5b0 (diff)
UI optimizations.
Diffstat (limited to 'app/views/shared/_index_view_edit_destroy_part.html.haml')
-rw-r--r--app/views/shared/_index_view_edit_destroy_part.html.haml72
1 files changed, 35 insertions, 37 deletions
diff --git a/app/views/shared/_index_view_edit_destroy_part.html.haml b/app/views/shared/_index_view_edit_destroy_part.html.haml
index 526e11d..3618d63 100644
--- a/app/views/shared/_index_view_edit_destroy_part.html.haml
+++ b/app/views/shared/_index_view_edit_destroy_part.html.haml
@@ -1,43 +1,41 @@
- if !(defined? parent).nil? && !(defined? child).nil?
- - if can? :show, child
- %td
- %a.btn.btn-mini.btn-success{:href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
- %i.icon-info-sign.icon-white
- %span.hidden-phone
- =t("#{child.class.name.underscore.pluralize}.index.actions.show")
+ %td
+ %span{:style => 'white-space: nowrap'}
+ - if can? :show, child
+ %a.btn.btn-small.btn-success{:href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
+ %i.icon-info-sign.icon-white
+ %span.hidden-phone
+ =t("#{child.class.name.underscore.pluralize}.index.actions.show")
- - if can? :edit, child
- %td
- %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
- %i.icon-edit.icon-white
- %span.hidden-phone
- =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
+ - if can? :edit, child
+ %a.btn.btn-small.btn-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
+ %i.icon-edit.icon-white
+ %span.hidden-phone
+ =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
- - if can? :destroy, child
- %td
- %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
- %i.icon-remove.icon-white
- %span.hidden-phone
- =t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
+ - if can? :destroy, child
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
+ %i.icon-remove.icon-white
+ %span.hidden-phone
+ =t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
- elsif !(defined? child).nil?
- - if can? :show, child
- %td
- %a.btn.btn-mini.btn-success{:href => method( :"#{child.class.name.underscore}_path" ).(child) }
- %i.icon-info-sign.icon-white
- %span.hidden-phone
- =t("#{child.class.name.underscore.pluralize}.index.actions.show")
+ %td
+ %span{:style => 'white-space: nowrap'}
+ - if can? :show, child
+ %a.btn.btn-small.btn-success{:href => method( :"#{child.class.name.underscore}_path" ).(child) }
+ %i.icon-info-sign.icon-white
+ %span.hidden-phone
+ =t("#{child.class.name.underscore.pluralize}.index.actions.show")
- - if can? :edit, child
- %td
- %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) }
- %i.icon-edit.icon-white
- %span.hidden-phone
- =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
-
- - if can? :destroy, child
- %td
- %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
- %i.icon-trash.icon-white
- %span.hidden-phone
- =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file
+ - if can? :edit, child
+ %a.btn.btn-small.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) }
+ %i.icon-edit.icon-white
+ %span.hidden-phone
+ =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
+
+ - if can? :destroy, child
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
+ %i.icon-trash.icon-white
+ %span.hidden-phone
+ =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file