From bdad29d001523a2ba4f515e6202babaa61739fc9 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 15 Jan 2013 18:02:06 +0100 Subject: Refactoring and caching. --- app/views/tenants/_gs_parameter_table.html.haml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 app/views/tenants/_gs_parameter_table.html.haml (limited to 'app/views/tenants/_gs_parameter_table.html.haml') diff --git a/app/views/tenants/_gs_parameter_table.html.haml b/app/views/tenants/_gs_parameter_table.html.haml new file mode 100644 index 0000000..7663f46 --- /dev/null +++ b/app/views/tenants/_gs_parameter_table.html.haml @@ -0,0 +1,24 @@ +- cache([I18n.locale, tenant, GuiFunction.count, GuiFunction.order(:updated_at).last, GsParameter.count, GsParameter.order(:updated_at).last]) do + %table + %tr{:class => 'even'} + %th + Funktion + %th + Anzahl + %th + Letztes Update + + %tr{:class => 'odd'} + %td + = t("gui_functions.name") + %td + = link_to GuiFunction.count.to_s, gui_functions_path + %td + = l GuiFunction.order(:updated_at).last.updated_at, :format => :short + %tr{:class => 'even'} + %td + = t("gs_parameters.name") + %td + = link_to GsParameter.count.to_s, gs_parameters_path + %td + = l GsParameter.order(:updated_at).last.updated_at, :format => :short -- cgit v1.2.3 From 7b5c903f96e1c97ad788962c88d6d285852d890e Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 15 Jan 2013 20:50:18 +0100 Subject: Fixed caching. --- app/views/tenants/_gs_parameter_table.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/tenants/_gs_parameter_table.html.haml') diff --git a/app/views/tenants/_gs_parameter_table.html.haml b/app/views/tenants/_gs_parameter_table.html.haml index 7663f46..3af06cf 100644 --- a/app/views/tenants/_gs_parameter_table.html.haml +++ b/app/views/tenants/_gs_parameter_table.html.haml @@ -1,4 +1,4 @@ -- cache([I18n.locale, tenant, GuiFunction.count, GuiFunction.order(:updated_at).last, GsParameter.count, GsParameter.order(:updated_at).last]) do +- cache(['gs_parameters_tenant_overview_table', I18n.locale, tenant, GuiFunction.count, GuiFunction.order(:updated_at).last, GsParameter.count, GsParameter.order(:updated_at).last]) do %table %tr{:class => 'even'} %th -- 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/tenants/_gs_parameter_table.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/tenants/_gs_parameter_table.html.haml') diff --git a/app/views/tenants/_gs_parameter_table.html.haml b/app/views/tenants/_gs_parameter_table.html.haml index 3af06cf..94c44e5 100644 --- a/app/views/tenants/_gs_parameter_table.html.haml +++ b/app/views/tenants/_gs_parameter_table.html.haml @@ -1,4 +1,4 @@ -- cache(['gs_parameters_tenant_overview_table', I18n.locale, tenant, GuiFunction.count, GuiFunction.order(:updated_at).last, GsParameter.count, GsParameter.order(:updated_at).last]) do +- cache(['gs_parameters_tenant_overview_table', I18n.locale, tenant, GuiFunction.count, GuiFunction.reorder(:updated_at).last, GsParameter.count, GsParameter.reorder(:updated_at).last]) do %table %tr{:class => 'even'} %th @@ -14,11 +14,11 @@ %td = link_to GuiFunction.count.to_s, gui_functions_path %td - = l GuiFunction.order(:updated_at).last.updated_at, :format => :short + = l GuiFunction.reorder(:updated_at).last.updated_at, :format => :short %tr{:class => 'even'} %td = t("gs_parameters.name") %td = link_to GsParameter.count.to_s, gs_parameters_path %td - = l GsParameter.order(:updated_at).last.updated_at, :format => :short + = l GsParameter.reorder(:updated_at).last.updated_at, :format => :short -- 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/tenants/_gs_parameter_table.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/tenants/_gs_parameter_table.html.haml') diff --git a/app/views/tenants/_gs_parameter_table.html.haml b/app/views/tenants/_gs_parameter_table.html.haml index 94c44e5..407f6e3 100644 --- a/app/views/tenants/_gs_parameter_table.html.haml +++ b/app/views/tenants/_gs_parameter_table.html.haml @@ -1,6 +1,6 @@ - cache(['gs_parameters_tenant_overview_table', I18n.locale, tenant, GuiFunction.count, GuiFunction.reorder(:updated_at).last, GsParameter.count, GsParameter.reorder(:updated_at).last]) do - %table - %tr{:class => 'even'} + %table{:class => 'table table-striped'} + %tr %th Funktion %th @@ -8,14 +8,14 @@ %th Letztes Update - %tr{:class => 'odd'} + %tr %td = t("gui_functions.name") %td = link_to GuiFunction.count.to_s, gui_functions_path %td = l GuiFunction.reorder(:updated_at).last.updated_at, :format => :short - %tr{:class => 'even'} + %tr %td = t("gs_parameters.name") %td -- cgit v1.2.3 From c52babd4346b1a52c28bb7437d0434ecfb9ab70f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 22:25:32 +0100 Subject: Twitter Bootstrap stuff. --- app/views/tenants/_gs_parameter_table.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/tenants/_gs_parameter_table.html.haml') diff --git a/app/views/tenants/_gs_parameter_table.html.haml b/app/views/tenants/_gs_parameter_table.html.haml index 407f6e3..8afdb0e 100644 --- a/app/views/tenants/_gs_parameter_table.html.haml +++ b/app/views/tenants/_gs_parameter_table.html.haml @@ -12,13 +12,13 @@ %td = t("gui_functions.name") %td - = link_to GuiFunction.count.to_s, gui_functions_path + = link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + GuiFunction.count.to_s, gui_functions_path %td = l GuiFunction.reorder(:updated_at).last.updated_at, :format => :short %tr %td = t("gs_parameters.name") %td - = link_to GsParameter.count.to_s, gs_parameters_path + = link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + GsParameter.count.to_s, gs_parameters_path %td = l GsParameter.reorder(:updated_at).last.updated_at, :format => :short -- cgit v1.2.3