From 8fdc1332bbff9c23400459dc7018cba147279cc5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 21:21:49 +0100 Subject: Added %thead and %tbody to the tables. --- app/views/shared/_show_edit_destroy_part.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/shared') diff --git a/app/views/shared/_show_edit_destroy_part.html.haml b/app/views/shared/_show_edit_destroy_part.html.haml index e82c667..a306bc3 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-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) } + %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") - if can? :destroy, child - %a.btn.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-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") - elsif !(defined? child).nil? - if can? :edit, child - %a.btn.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) } + %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") - if can? :destroy, child - %a.btn.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}.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 -- cgit v1.2.3 From cda8e27d0b09c5371fca3946ad476a205ded0412 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 22:33:24 +0100 Subject: Show icons only but no text in the buttons on small devises. --- .../shared/_index_view_edit_destroy_part.html.haml | 33 ++++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'app/views/shared') 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 00b9e8a..526e11d 100644 --- a/app/views/shared/_index_view_edit_destroy_part.html.haml +++ b/app/views/shared/_index_view_edit_destroy_part.html.haml @@ -1,40 +1,43 @@ -- style = 'width:90px' -- style = '' - - if !(defined? parent).nil? && !(defined? child).nil? - if can? :show, child - %td{ :style => style } + %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 - =t("#{child.class.name.underscore.pluralize}.index.actions.show") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - if can? :edit, child - %td{ :style => style } + %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 - =t("#{child.class.name.underscore.pluralize}.index.actions.edit") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - if can? :destroy, child - %td{ :style => style } + %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 - =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") - elsif !(defined? child).nil? - if can? :show, child - %td{ :style => style } + %td %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}.index.actions.show") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - if can? :edit, child - %td{ :style => style } + %td %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}.index.actions.edit") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - if can? :destroy, child - %td{ :style => style } + %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 - =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file -- cgit v1.2.3 From d97896546095722ccd3a2051cdb2c2ab1b364328 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 00:49:51 +0100 Subject: UI optimizations. --- app/views/shared/_create_link.html.haml | 6 +- .../shared/_index_view_edit_destroy_part.html.haml | 72 +++++++++++----------- app/views/shared/_show_edit_destroy_part.html.haml | 8 +-- 3 files changed, 42 insertions(+), 44 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 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 -- cgit v1.2.3 From 7b745a37f1729052e2278cbb10ac6d43484b94a3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 10:01:58 +0100 Subject: Fixed language keys for I18n.t --- app/views/shared/_create_link.html.haml | 12 ++++++------ app/views/shared/_show_edit_destroy_part.html.haml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 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 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 -- cgit v1.2.3 From e84e82032813b7acd71f8073d00f57e1cd65eb7c Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 17:36:33 +0100 Subject: Fixed I18n bug. --- app/views/shared/_index_view_edit_destroy_part.html.haml | 4 ++-- app/views/shared/_show_edit_destroy_part.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/shared') 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 3618d63..8e119fe 100644 --- a/app/views/shared/_index_view_edit_destroy_part.html.haml +++ b/app/views/shared/_index_view_edit_destroy_part.html.haml @@ -14,7 +14,7 @@ =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( :"#{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_destroy"), "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") @@ -35,7 +35,7 @@ =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"} + %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "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 f715075..a1e8490 100644 --- a/app/views/shared/_show_edit_destroy_part.html.haml +++ b/app/views/shared/_show_edit_destroy_part.html.haml @@ -5,7 +5,7 @@ %i.icon-edit.icon-white =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( :"#{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_destroy"), "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}.index.actions.destroy") @@ -15,6 +15,6 @@ %i.icon-edit.icon-white =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"} + %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"} %i.icon-trash.icon-white =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file -- cgit v1.2.3 From b792c8eb19fba97a7dab5cd2be8e6bd74617e7d2 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:38:24 +0100 Subject: Housekeeping. --- app/views/shared/_header.de.html.haml | 41 ----------------------------------- app/views/shared/_header.html.haml | 41 ----------------------------------- 2 files changed, 82 deletions(-) delete mode 100644 app/views/shared/_header.de.html.haml delete mode 100644 app/views/shared/_header.html.haml (limited to 'app/views/shared') diff --git a/app/views/shared/_header.de.html.haml b/app/views/shared/_header.de.html.haml deleted file mode 100644 index 10ad2a0..0000000 --- a/app/views/shared/_header.de.html.haml +++ /dev/null @@ -1,41 +0,0 @@ -%header#main - .light - %h1.gemeinschaft-logo - - if @current_user && @current_user.current_tenant - = link_to "Gemeinschaft", tenant_path(@current_user.current_tenant) - - else - = link_to "Gemeinschaft", root_url - - - if current_user - = form_tag '/search' do - %div.search-box - - if GuiFunction.display?('search_field_in_top_navigation_bar', current_user) - %input.text{:value => 'Suchen ...', :name => 'q'} - %input{:type => 'submit', :value => ''} - - / Adjustable Navigation. - - if current_user - - if navigation_items.size > 0 - - navigation_items.each do |item| - - if GuiFunction.display?('navigation_items_in_top_navigation_bar', current_user) - %span - = link_to item[:title], item[:url] - - - if current_user - .user-context - %a.user{:href => tenant_user_path(current_user.current_tenant.id, current_user.id)} - - if GuiFunction.display?('user_avatar_in_top_navigation_bar', current_user) - - if current_user.image? && current_user.image_url(:mini) - = image_tag current_user.image_url(:mini).to_s, :class => 'display' - - else - - if current_user.male? - = image_tag 'icons/user-male-16x.png', :class => 'display logged-out' - - else - = image_tag 'icons/user-female-16x.png', :class => 'display logged-out' - = current_user - = link_to( "[x]", log_out_path, :class => 'logout', :title => "Abmelden" ) # Temporary way of logging out. - - else - .user-context - = link_to "Registrieren", sign_up_path - or - = link_to "Anmelden", log_in_path diff --git a/app/views/shared/_header.html.haml b/app/views/shared/_header.html.haml deleted file mode 100644 index 377d8e0..0000000 --- a/app/views/shared/_header.html.haml +++ /dev/null @@ -1,41 +0,0 @@ -%header#main - .light - %h1.gemeinschaft-logo - - if @current_user && @current_user.current_tenant - = link_to "Gemeinschaft", tenant_path(@current_user.current_tenant) - - else - = link_to "Gemeinschaft", root_url - - - if current_user - = form_tag '/search' do - %div.search-box - - if GuiFunction.display?('search_field_in_top_navigation_bar', current_user) - %input.text{:value => 'Search ...', :name => 'q'} - %input{:type => 'submit', :value => ''} - - / Adjustable Navigation. - - if current_user - - if navigation_items.size > 0 - - navigation_items.each do |item| - - if GuiFunction.display?('navigation_items_in_top_navigation_bar', current_user) - %span - = link_to item[:title], item[:url] - - - if current_user - .user-context - %a.user{:href => tenant_user_path(current_user.current_tenant.id, current_user.id)} - - if GuiFunction.display?('user_avatar_in_top_navigation_bar', current_user) - - if current_user.image? && current_user.image_url(:mini) - = image_tag current_user.image_url(:mini).to_s, :class => 'display' - - else - - if current_user.male? - = image_tag 'icons/user-male-16x.png', :class => 'display logged-out' - - else - = image_tag 'icons/user-female-16x.png', :class => 'display logged-out' - = current_user - = link_to( "[x]", log_out_path, :class => 'logout', :title => "Log out" ) # Temporary way of logging out. - - else - .user-context - = link_to "Sign up", sign_up_path - or - = link_to "Log in", log_in_path -- cgit v1.2.3 From cdde455a50df5de70ee3d84ce66733e8769db05f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 28 Jan 2013 11:09:16 +0100 Subject: Fixed HTML bug. --- app/views/shared/_create_link.html.haml | 3 +-- .../shared/_index_view_edit_destroy_part.html.haml | 19 +++++++------------ 2 files changed, 8 insertions(+), 14 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 b1eef1f..53e9dbc 100644 --- a/app/views/shared/_create_link.html.haml +++ b/app/views/shared/_create_link.html.haml @@ -8,8 +8,7 @@ - else %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") + =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 8e119fe..6bb1e7b 100644 --- a/app/views/shared/_index_view_edit_destroy_part.html.haml +++ b/app/views/shared/_index_view_edit_destroy_part.html.haml @@ -4,20 +4,17 @@ - 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") + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - 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") + =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_destroy"), "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") + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") - elsif !(defined? child).nil? %td @@ -25,17 +22,15 @@ - 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") + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - 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") + =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_destroy"), "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 + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") + \ No newline at end of file -- cgit v1.2.3