From d8fe3b636cab1504cb5d3cb5dc57ed818749ccf5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 21:30:48 +0100 Subject: Twitter Bootstrap stuff. --- app/views/shared/_create_link.html.haml | 3 ++- .../shared/_index_view_edit_destroy_part.html.haml | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'app/views/shared') diff --git a/app/views/shared/_create_link.html.haml b/app/views/shared/_create_link.html.haml index e5bc840..0711ddf 100644 --- a/app/views/shared/_create_link.html.haml +++ b/app/views/shared/_create_link.html.haml @@ -8,7 +8,8 @@ - else %a.btn.btn-mini.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) + / =t("#{child_class.name.underscore.pluralize}.index.actions.create_for", :resource => parent.to_s) + =t("#{child_class.name.underscore.pluralize}.index.actions.create") - elsif !(defined? child_class).nil? - if can? :create, child_class 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 5bc715b..00b9e8a 100644 --- a/app/views/shared/_index_view_edit_destroy_part.html.haml +++ b/app/views/shared/_index_view_edit_destroy_part.html.haml @@ -1,39 +1,40 @@ -- style = 'width:70px' +- style = 'width:90px' +- style = '' - if !(defined? parent).nil? && !(defined? child).nil? - if can? :show, child %td{ :style => style } %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 - =t("#{child.class.name.underscore.pluralize}.actions.show") + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - if can? :edit, child %td{ :style => style } %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 - =t("#{child.class.name.underscore.pluralize}.actions.edit") + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - if can? :destroy, child %td{ :style => style } - %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"} - %i.icon-trash.icon-white - =t("#{child.class.name.underscore.pluralize}.actions.destroy") + %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 + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") - elsif !(defined? child).nil? - if can? :show, child %td{ :style => style } %a.btn.btn-mini.btn-success{:href => method( :"#{child.class.name.underscore}_path" ).(child) } %i.icon-info-sign.icon-white - =t("#{child.class.name.underscore.pluralize}.actions.show") + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - if can? :edit, child %td{ :style => style } %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) } %i.icon-edit.icon-white - =t("#{child.class.name.underscore.pluralize}.actions.edit") + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - if can? :destroy, child %td{ :style => style } - %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-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 - =t("#{child.class.name.underscore.pluralize}.actions.destroy") \ No newline at end of file + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file -- cgit v1.2.3