summaryrefslogtreecommitdiff
path: root/app/views/shared
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-23 10:01:58 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-23 10:01:58 +0100
commit7b745a37f1729052e2278cbb10ac6d43484b94a3 (patch)
treed712b16832410a6cf3ab061babeb2f2e1f640350 /app/views/shared
parent387f0949d62121f145f80b017329c83aeffc8355 (diff)
Fixed language keys for I18n.t
Diffstat (limited to 'app/views/shared')
-rw-r--r--app/views/shared/_create_link.html.haml12
-rw-r--r--app/views/shared/_show_edit_destroy_part.html.haml12
2 files changed, 12 insertions, 12 deletions
diff --git a/app/views/shared/_create_link.html.haml b/app/views/shared/_create_link.html.haml
index 25e851b..b1eef1f 100644
--- a/app/views/shared/_create_link.html.haml
+++ b/app/views/shared/_create_link.html.haml
@@ -2,18 +2,18 @@
- 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-small.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) }
- %i.icon-plus.icon-white
+ %a.btn.btn-small.btn-default{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) }
+ %i.icon-plus
=t("#{child_class.name.underscore.pluralize}.index.actions.create")
- else
- %a.btn.btn-small.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) }
- %i.icon-plus.icon-white
+ %a.btn.btn-small.btn-default{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) }
+ %i.icon-plus
/ =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
%p
- %a.btn.btn-small.btn-primary{:href => method( :"new_#{child_class.name.underscore}_path" ).() }
- %i.icon-plus.icon-white
+ %a.btn.btn-small.btn-default{:href => method( :"new_#{child_class.name.underscore}_path" ).() }
+ %i.icon-plus
=t("#{child_class.name.underscore.pluralize}.index.actions.create") \ 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 a4eba23..f715075 100644
--- a/app/views/shared/_show_edit_destroy_part.html.haml
+++ b/app/views/shared/_show_edit_destroy_part.html.haml
@@ -3,18 +3,18 @@
- 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
- =t("#{child.class.name.underscore.pluralize}.actions.edit")
+ =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}.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}.index.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")
+ =t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
- elsif !(defined? child).nil?
- if can? :edit, 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")
+ =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}.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}.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