diff options
-rw-r--r-- | app/views/shared/_create_link.html.haml | 6 | ||||
-rw-r--r-- | app/views/shared/_index_view_edit_destroy_part.html.haml | 72 | ||||
-rw-r--r-- | app/views/shared/_show_edit_destroy_part.html.haml | 8 |
3 files changed, 42 insertions, 44 deletions
diff --git a/app/views/shared/_create_link.html.haml b/app/views/shared/_create_link.html.haml index 0711ddf..25e851b 100644 --- a/app/views/shared/_create_link.html.haml +++ b/app/views/shared/_create_link.html.haml @@ -2,11 +2,11 @@ - if can? :create, parent.send(child_class.name.underscore.pluralize).build %p - if t("#{child_class.name.underscore.pluralize}.index.actions.create_for").include?('translation missing') || (!(defined? short_link).nil? && short_link == true) - %a.btn.btn-mini.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) } + %a.btn.btn-small.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) } %i.icon-plus.icon-white =t("#{child_class.name.underscore.pluralize}.index.actions.create") - else - %a.btn.btn-mini.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) } + %a.btn.btn-small.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) } %i.icon-plus.icon-white / =t("#{child_class.name.underscore.pluralize}.index.actions.create_for", :resource => parent.to_s) =t("#{child_class.name.underscore.pluralize}.index.actions.create") @@ -14,6 +14,6 @@ - elsif !(defined? child_class).nil? - if can? :create, child_class %p - %a.btn.btn-mini.btn-primary{:href => method( :"new_#{child_class.name.underscore}_path" ).() } + %a.btn.btn-small.btn-primary{:href => method( :"new_#{child_class.name.underscore}_path" ).() } %i.icon-plus.icon-white =t("#{child_class.name.underscore.pluralize}.index.actions.create")
\ No newline at end of file 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 diff --git a/app/views/shared/_show_edit_destroy_part.html.haml b/app/views/shared/_show_edit_destroy_part.html.haml index a306bc3..a4eba23 100644 --- a/app/views/shared/_show_edit_destroy_part.html.haml +++ b/app/views/shared/_show_edit_destroy_part.html.haml @@ -1,20 +1,20 @@ %p - if !(defined? parent).nil? && !(defined? child).nil? - if can? :edit, child - %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, 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 =t("#{child.class.name.underscore.pluralize}.actions.edit") - if can? :destroy, child - %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"} + %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"} %i.icon-trash.icon-white =t("#{child.class.name.underscore.pluralize}.actions.destroy") - elsif !(defined? child).nil? - if can? :edit, child - %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) } + %a.btn.btn-small.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) } %i.icon-edit.icon-white =t("#{child.class.name.underscore.pluralize}.actions.edit") - if can? :destroy, child - %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"} + %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"} %i.icon-trash.icon-white =t("#{child.class.name.underscore.pluralize}.actions.destroy")
\ No newline at end of file |