From e76890d5f4634d47514a592d501d9792ae2ff7bb Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 21:00:52 +0100 Subject: Different scaffold for GsParameter. --- app/views/gs_parameters/index.html.haml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 app/views/gs_parameters/index.html.haml (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml new file mode 100644 index 0000000..4c9ac84 --- /dev/null +++ b/app/views/gs_parameters/index.html.haml @@ -0,0 +1,6 @@ +- title t("gs_parameters.index.page_title") + +- if @gs_parameters && @gs_parameters.count > 0 + = render "index_core", :gs_parameters => @gs_parameters + += render :partial => 'shared/create_link', :locals => {:child_class => GsParameter} \ No newline at end of file -- cgit v1.2.3 From 464a2f4907bd27b62f7b5cc5d7537b90469b03bd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 6 Jan 2013 20:52:04 +0100 Subject: GsParameter can only be created or destroyed by migrations. --- app/views/gs_parameters/index.html.haml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 4c9ac84..753e64b 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,6 +1,15 @@ - title t("gs_parameters.index.page_title") - if @gs_parameters && @gs_parameters.count > 0 - = render "index_core", :gs_parameters => @gs_parameters + - if @sections + %table + - @sections.each do |section| + %tr + %td{:colspan => 3} + %h3= section + = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) + - else + %table + = render "index_core", :gs_parameters => @gs_parameters = render :partial => 'shared/create_link', :locals => {:child_class => GsParameter} \ No newline at end of file -- cgit v1.2.3 From 7b1295884861b222e441f431089ea3a6d99fd569 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 10 Jan 2013 11:45:46 +0100 Subject: Started to fragment cache gs_parameter views. --- app/views/gs_parameters/index.html.haml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 753e64b..51957b6 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,15 +1,15 @@ - title t("gs_parameters.index.page_title") - if @gs_parameters && @gs_parameters.count > 0 - - if @sections - %table - - @sections.each do |section| - %tr - %td{:colspan => 3} - %h3= section - = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) - - else - %table - = render "index_core", :gs_parameters => @gs_parameters - -= render :partial => 'shared/create_link', :locals => {:child_class => GsParameter} \ No newline at end of file + - cache([@ps_parameters_unordered.order(:updated_at).last, @ps_parameters_unordered.pluck(:id)]) do + - if @sections + %table + - @sections.each do |section| + %tr + %td{:colspan => 3} + %h3= section + / Template Dependency: gs_parameters/index_core + = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) + - else + %table + = render "index_core", :gs_parameters => @gs_parameters -- cgit v1.2.3 From 2b57fadfebf7f7df6a589ab089eec522413e8390 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 10 Jan 2013 12:29:07 +0100 Subject: Added fragment caching to gs_parameters. --- app/views/gs_parameters/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 51957b6..3c16806 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -8,7 +8,7 @@ %tr %td{:colspan => 3} %h3= section - / Template Dependency: gs_parameters/index_core + -# Template Dependency: gs_parameters/_index_core = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) - else %table -- cgit v1.2.3 From 49738b091eea2ca65d6f8c71b88747e314ec2950 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 10 Jan 2013 22:44:10 +0100 Subject: Refactoring and adding some caches. --- app/views/gs_parameters/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 3c16806..b4a53e8 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,7 +1,7 @@ - title t("gs_parameters.index.page_title") - if @gs_parameters && @gs_parameters.count > 0 - - cache([@ps_parameters_unordered.order(:updated_at).last, @ps_parameters_unordered.pluck(:id)]) do + - cache([@ps_parameters_unordered.order(:updated_at).last, @ps_parameters_unordered.count]) do - if @sections %table - @sections.each do |section| -- cgit v1.2.3 From ca77ad70f4c2df28f6460e0160f23d115174440d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 15 Jan 2013 20:42:02 +0100 Subject: Optimized caching. --- app/views/gs_parameters/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index b4a53e8..c7a6b70 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,7 +1,7 @@ - title t("gs_parameters.index.page_title") - if @gs_parameters && @gs_parameters.count > 0 - - cache([@ps_parameters_unordered.order(:updated_at).last, @ps_parameters_unordered.count]) do + - cache(['gs_parameters_table', @gs_parameters_unordered.order(:updated_at).last, @gs_parameters_unordered.count]) do - if @sections %table - @sections.each do |section| -- cgit v1.2.3 From d44b8c81f939deb1e83e17d19c580b3bf6ac9ab6 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 15 Jan 2013 22:00:45 +0100 Subject: Optimized caching. --- app/views/gs_parameters/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index c7a6b70..37fe825 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,7 +1,7 @@ - title t("gs_parameters.index.page_title") - if @gs_parameters && @gs_parameters.count > 0 - - cache(['gs_parameters_table', @gs_parameters_unordered.order(:updated_at).last, @gs_parameters_unordered.count]) do + - cache(['gs_parameters_table', I18n.locale, @gs_parameters_unordered.order(:updated_at).last, @gs_parameters_unordered.count]) do - if @sections %table - @sections.each do |section| -- cgit v1.2.3 From fe5b9f2c046561f9918a5660b4a5193ef66fd3aa Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 20 Jan 2013 20:01:06 +0100 Subject: Replaced some order with reorder within cache key generation. --- app/views/gs_parameters/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 37fe825..3844c3d 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,7 +1,7 @@ - title t("gs_parameters.index.page_title") - if @gs_parameters && @gs_parameters.count > 0 - - cache(['gs_parameters_table', I18n.locale, @gs_parameters_unordered.order(:updated_at).last, @gs_parameters_unordered.count]) do + - cache(['gs_parameters_table', I18n.locale, @gs_parameters_unordered.reorder(:updated_at).last, @gs_parameters_unordered.count]) do - if @sections %table - @sections.each do |section| -- cgit v1.2.3 From 18ed88c7e3c789366f6e5443dc4ee0bc981a4b88 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 20:18:16 +0100 Subject: Started the migration to Twitter Bootstrap. --- app/views/gs_parameters/index.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/gs_parameters/index.html.haml') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 3844c3d..9132cdd 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -1,9 +1,9 @@ -- title t("gs_parameters.index.page_title") +- content_for :title, t("gs_parameters.index.page_title") - if @gs_parameters && @gs_parameters.count > 0 - cache(['gs_parameters_table', I18n.locale, @gs_parameters_unordered.reorder(:updated_at).last, @gs_parameters_unordered.count]) do - if @sections - %table + %table{:class => 'table table-striped'} - @sections.each do |section| %tr %td{:colspan => 3} @@ -11,5 +11,5 @@ -# Template Dependency: gs_parameters/_index_core = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) - else - %table + %table{:class => 'table table-striped'} = render "index_core", :gs_parameters => @gs_parameters -- cgit v1.2.3