From 01f2ab4e3d5694de81f6ebb594e0e852616ebbd9 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 12:42:53 +0100 Subject: Added GsParameter model as a replacement for gemeinschaft_parameters.rb --- app/views/gs_parameters/_form.html.erb | 14 ++++++++++++++ app/views/gs_parameters/edit.html.erb | 6 ++++++ app/views/gs_parameters/index.html.erb | 29 +++++++++++++++++++++++++++++ app/views/gs_parameters/new.html.erb | 5 +++++ app/views/gs_parameters/show.html.erb | 25 +++++++++++++++++++++++++ 5 files changed, 79 insertions(+) create mode 100644 app/views/gs_parameters/_form.html.erb create mode 100644 app/views/gs_parameters/edit.html.erb create mode 100644 app/views/gs_parameters/index.html.erb create mode 100644 app/views/gs_parameters/new.html.erb create mode 100644 app/views/gs_parameters/show.html.erb (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_form.html.erb b/app/views/gs_parameters/_form.html.erb new file mode 100644 index 0000000..13ad26f --- /dev/null +++ b/app/views/gs_parameters/_form.html.erb @@ -0,0 +1,14 @@ +<%= simple_form_for(@gs_parameter) do |f| %> + <%= f.error_notification %> + +
+ <%= f.input :name %> + <%= f.input :section %> + <%= f.input :value %> + <%= f.input :class_type %> +
+ +
+ <%= f.button :submit %> +
+<% end %> diff --git a/app/views/gs_parameters/edit.html.erb b/app/views/gs_parameters/edit.html.erb new file mode 100644 index 0000000..6938a40 --- /dev/null +++ b/app/views/gs_parameters/edit.html.erb @@ -0,0 +1,6 @@ +

Editing gs_parameter

+ +<%= render 'form' %> + +<%= link_to 'Show', @gs_parameter %> | +<%= link_to 'Back', gs_parameters_path %> diff --git a/app/views/gs_parameters/index.html.erb b/app/views/gs_parameters/index.html.erb new file mode 100644 index 0000000..dee6838 --- /dev/null +++ b/app/views/gs_parameters/index.html.erb @@ -0,0 +1,29 @@ +

Listing gs_parameters

+ + + + + + + + + + + + +<% @gs_parameters.each do |gs_parameter| %> + + + + + + + + + +<% end %> +
NameSectionValueClass type
<%= gs_parameter.name %><%= gs_parameter.section %><%= gs_parameter.value %><%= gs_parameter.class_type %><%= link_to 'Show', gs_parameter %><%= link_to 'Edit', edit_gs_parameter_path(gs_parameter) %><%= link_to 'Destroy', gs_parameter, confirm: 'Are you sure?', method: :delete %>
+ +
+ +<%= link_to 'New Gs parameter', new_gs_parameter_path %> diff --git a/app/views/gs_parameters/new.html.erb b/app/views/gs_parameters/new.html.erb new file mode 100644 index 0000000..a357e2e --- /dev/null +++ b/app/views/gs_parameters/new.html.erb @@ -0,0 +1,5 @@ +

New gs_parameter

+ +<%= render 'form' %> + +<%= link_to 'Back', gs_parameters_path %> diff --git a/app/views/gs_parameters/show.html.erb b/app/views/gs_parameters/show.html.erb new file mode 100644 index 0000000..1f03542 --- /dev/null +++ b/app/views/gs_parameters/show.html.erb @@ -0,0 +1,25 @@ +

<%= notice %>

+ +

+ Name: + <%= @gs_parameter.name %> +

+ +

+ Section: + <%= @gs_parameter.section %> +

+ +

+ Value: + <%= @gs_parameter.value %> +

+ +

+ Class type: + <%= @gs_parameter.class_type %> +

+ + +<%= link_to 'Edit', edit_gs_parameter_path(@gs_parameter) %> | +<%= link_to 'Back', gs_parameters_path %> -- cgit v1.2.3 From 4b8dfcded36e1162346ee029d4bfc9c94323bdde Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 12:57:06 +0100 Subject: autofocus --- app/views/gs_parameters/_form.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_form.html.erb b/app/views/gs_parameters/_form.html.erb index 13ad26f..e559bcc 100644 --- a/app/views/gs_parameters/_form.html.erb +++ b/app/views/gs_parameters/_form.html.erb @@ -2,10 +2,11 @@ <%= f.error_notification %>
- <%= f.input :name %> + <%= f.input :name, :autofocus => true %> <%= f.input :section %> <%= f.input :value %> <%= f.input :class_type %> +
-- cgit v1.2.3 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/_form.html.erb | 15 -------------- app/views/gs_parameters/_form.html.haml | 7 +++++++ app/views/gs_parameters/_form_core.html.haml | 6 ++++++ app/views/gs_parameters/_index_core.html.haml | 17 ++++++++++++++++ app/views/gs_parameters/edit.html.erb | 6 ------ app/views/gs_parameters/edit.html.haml | 3 +++ app/views/gs_parameters/index.html.erb | 29 --------------------------- app/views/gs_parameters/index.html.haml | 6 ++++++ app/views/gs_parameters/new.html.erb | 5 ----- app/views/gs_parameters/new.html.haml | 3 +++ app/views/gs_parameters/show.html.erb | 25 ----------------------- app/views/gs_parameters/show.html.haml | 19 ++++++++++++++++++ 12 files changed, 61 insertions(+), 80 deletions(-) delete mode 100644 app/views/gs_parameters/_form.html.erb create mode 100644 app/views/gs_parameters/_form.html.haml create mode 100644 app/views/gs_parameters/_form_core.html.haml create mode 100644 app/views/gs_parameters/_index_core.html.haml delete mode 100644 app/views/gs_parameters/edit.html.erb create mode 100644 app/views/gs_parameters/edit.html.haml delete mode 100644 app/views/gs_parameters/index.html.erb create mode 100644 app/views/gs_parameters/index.html.haml delete mode 100644 app/views/gs_parameters/new.html.erb create mode 100644 app/views/gs_parameters/new.html.haml delete mode 100644 app/views/gs_parameters/show.html.erb create mode 100644 app/views/gs_parameters/show.html.haml (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_form.html.erb b/app/views/gs_parameters/_form.html.erb deleted file mode 100644 index e559bcc..0000000 --- a/app/views/gs_parameters/_form.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -<%= simple_form_for(@gs_parameter) do |f| %> - <%= f.error_notification %> - -
- <%= f.input :name, :autofocus => true %> - <%= f.input :section %> - <%= f.input :value %> - <%= f.input :class_type %> - -
- -
- <%= f.button :submit %> -
-<% end %> diff --git a/app/views/gs_parameters/_form.html.haml b/app/views/gs_parameters/_form.html.haml new file mode 100644 index 0000000..ea69e95 --- /dev/null +++ b/app/views/gs_parameters/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@gs_parameter) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('gs_parameters.form.submit') \ No newline at end of file diff --git a/app/views/gs_parameters/_form_core.html.haml b/app/views/gs_parameters/_form_core.html.haml new file mode 100644 index 0000000..ebb5f2d --- /dev/null +++ b/app/views/gs_parameters/_form_core.html.haml @@ -0,0 +1,6 @@ +.inputs + = f.input :name, :label => t('gs_parameters.form.name.label'), :hint => conditional_hint('gs_parameters.form.name.hint') + = f.input :section, :label => t('gs_parameters.form.section.label'), :hint => conditional_hint('gs_parameters.form.section.hint') + = f.input :value, :label => t('gs_parameters.form.value.label'), :hint => conditional_hint('gs_parameters.form.value.hint') + = f.input :class_type, :label => t('gs_parameters.form.class_type.label'), :hint => conditional_hint('gs_parameters.form.class_type.hint') + = f.input :description, :label => t('gs_parameters.form.description.label'), :hint => conditional_hint('gs_parameters.form.description.hint') diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml new file mode 100644 index 0000000..cc6fdd9 --- /dev/null +++ b/app/views/gs_parameters/_index_core.html.haml @@ -0,0 +1,17 @@ +%table + %tr + %th= t('gs_parameters.index.name') + %th= t('gs_parameters.index.section') + %th= t('gs_parameters.index.value') + %th= t('gs_parameters.index.class_type') + %th= t('gs_parameters.index.description') + + - reset_cycle + - for gs_parameter in gs_parameters + %tr{:class => cycle('odd', 'even')} + %td= gs_parameter.name + %td= gs_parameter.section + %td= gs_parameter.value + %td= gs_parameter.class_type + %td= gs_parameter.description + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} \ No newline at end of file diff --git a/app/views/gs_parameters/edit.html.erb b/app/views/gs_parameters/edit.html.erb deleted file mode 100644 index 6938a40..0000000 --- a/app/views/gs_parameters/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

Editing gs_parameter

- -<%= render 'form' %> - -<%= link_to 'Show', @gs_parameter %> | -<%= link_to 'Back', gs_parameters_path %> diff --git a/app/views/gs_parameters/edit.html.haml b/app/views/gs_parameters/edit.html.haml new file mode 100644 index 0000000..7c24234 --- /dev/null +++ b/app/views/gs_parameters/edit.html.haml @@ -0,0 +1,3 @@ +- title t("gs_parameters.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/gs_parameters/index.html.erb b/app/views/gs_parameters/index.html.erb deleted file mode 100644 index dee6838..0000000 --- a/app/views/gs_parameters/index.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -

Listing gs_parameters

- - - - - - - - - - - - -<% @gs_parameters.each do |gs_parameter| %> - - - - - - - - - -<% end %> -
NameSectionValueClass type
<%= gs_parameter.name %><%= gs_parameter.section %><%= gs_parameter.value %><%= gs_parameter.class_type %><%= link_to 'Show', gs_parameter %><%= link_to 'Edit', edit_gs_parameter_path(gs_parameter) %><%= link_to 'Destroy', gs_parameter, confirm: 'Are you sure?', method: :delete %>
- -
- -<%= link_to 'New Gs parameter', new_gs_parameter_path %> 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 diff --git a/app/views/gs_parameters/new.html.erb b/app/views/gs_parameters/new.html.erb deleted file mode 100644 index a357e2e..0000000 --- a/app/views/gs_parameters/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

New gs_parameter

- -<%= render 'form' %> - -<%= link_to 'Back', gs_parameters_path %> diff --git a/app/views/gs_parameters/new.html.haml b/app/views/gs_parameters/new.html.haml new file mode 100644 index 0000000..845acc2 --- /dev/null +++ b/app/views/gs_parameters/new.html.haml @@ -0,0 +1,3 @@ +- title t("gs_parameters.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/gs_parameters/show.html.erb b/app/views/gs_parameters/show.html.erb deleted file mode 100644 index 1f03542..0000000 --- a/app/views/gs_parameters/show.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -

<%= notice %>

- -

- Name: - <%= @gs_parameter.name %> -

- -

- Section: - <%= @gs_parameter.section %> -

- -

- Value: - <%= @gs_parameter.value %> -

- -

- Class type: - <%= @gs_parameter.class_type %> -

- - -<%= link_to 'Edit', edit_gs_parameter_path(@gs_parameter) %> | -<%= link_to 'Back', gs_parameters_path %> diff --git a/app/views/gs_parameters/show.html.haml b/app/views/gs_parameters/show.html.haml new file mode 100644 index 0000000..185641d --- /dev/null +++ b/app/views/gs_parameters/show.html.haml @@ -0,0 +1,19 @@ +- title t("gs_parameters.show.page_title") + +%p + %strong= t('gs_parameters.show.name') + ":" + = @gs_parameter.name +%p + %strong= t('gs_parameters.show.section') + ":" + = @gs_parameter.section +%p + %strong= t('gs_parameters.show.value') + ":" + = @gs_parameter.value +%p + %strong= t('gs_parameters.show.class_type') + ":" + = @gs_parameter.class_type +%p + %strong= t('gs_parameters.show.description') + ":" + = @gs_parameter.description + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_parameter } \ 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_core.html.haml | 25 +++++++++++-------------- app/views/gs_parameters/index.html.haml | 11 ++++++++++- app/views/gs_parameters/new.html.haml | 3 --- 3 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 app/views/gs_parameters/new.html.haml (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml index cc6fdd9..57fd85f 100644 --- a/app/views/gs_parameters/_index_core.html.haml +++ b/app/views/gs_parameters/_index_core.html.haml @@ -1,17 +1,14 @@ -%table - %tr - %th= t('gs_parameters.index.name') +%tr + %th= t('gs_parameters.index.name') + - if !@sections %th= t('gs_parameters.index.section') - %th= t('gs_parameters.index.value') - %th= t('gs_parameters.index.class_type') - %th= t('gs_parameters.index.description') + %th= t('gs_parameters.index.value') - - reset_cycle - - for gs_parameter in gs_parameters - %tr{:class => cycle('odd', 'even')} - %td= gs_parameter.name +- reset_cycle +- for gs_parameter in gs_parameters + %tr{:class => cycle('odd', 'even')} + %td= gs_parameter.name + - if !@sections %td= gs_parameter.section - %td= gs_parameter.value - %td= gs_parameter.class_type - %td= gs_parameter.description - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} \ No newline at end of file + %td= gs_parameter.value + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} \ No newline at end of file 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 diff --git a/app/views/gs_parameters/new.html.haml b/app/views/gs_parameters/new.html.haml deleted file mode 100644 index 845acc2..0000000 --- a/app/views/gs_parameters/new.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -- title t("gs_parameters.new.page_title") - -= render "form" \ No newline at end of file -- cgit v1.2.3 From 2ac13c8df129cedd81950eb7c5697fbd57cd9612 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 9 Jan 2013 12:48:49 +0100 Subject: entity added --- app/views/gs_parameters/_form_core.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_form_core.html.haml b/app/views/gs_parameters/_form_core.html.haml index ebb5f2d..c5f435d 100644 --- a/app/views/gs_parameters/_form_core.html.haml +++ b/app/views/gs_parameters/_form_core.html.haml @@ -1,6 +1,7 @@ .inputs - = f.input :name, :label => t('gs_parameters.form.name.label'), :hint => conditional_hint('gs_parameters.form.name.hint') + = f.input :entity, :label => t('gs_parameters.form.entity.label'), :hint => conditional_hint('gs_parameters.form.entity.hint') = f.input :section, :label => t('gs_parameters.form.section.label'), :hint => conditional_hint('gs_parameters.form.section.hint') + = f.input :name, :label => t('gs_parameters.form.name.label'), :hint => conditional_hint('gs_parameters.form.name.hint') = f.input :value, :label => t('gs_parameters.form.value.label'), :hint => conditional_hint('gs_parameters.form.value.hint') = f.input :class_type, :label => t('gs_parameters.form.class_type.label'), :hint => conditional_hint('gs_parameters.form.class_type.hint') = f.input :description, :label => t('gs_parameters.form.description.label'), :hint => conditional_hint('gs_parameters.form.description.hint') -- cgit v1.2.3 From 70c436c52c76cf866b03fcab6bc43437c9490cd1 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 10 Jan 2013 10:34:57 +0100 Subject: GsParameter :entity, :section and :name can't be changed in the GUI any more. --- app/views/gs_parameters/_form_core.html.haml | 7 ++----- app/views/gs_parameters/edit.html.haml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_form_core.html.haml b/app/views/gs_parameters/_form_core.html.haml index c5f435d..70b3773 100644 --- a/app/views/gs_parameters/_form_core.html.haml +++ b/app/views/gs_parameters/_form_core.html.haml @@ -1,7 +1,4 @@ .inputs - = f.input :entity, :label => t('gs_parameters.form.entity.label'), :hint => conditional_hint('gs_parameters.form.entity.hint') - = f.input :section, :label => t('gs_parameters.form.section.label'), :hint => conditional_hint('gs_parameters.form.section.hint') - = f.input :name, :label => t('gs_parameters.form.name.label'), :hint => conditional_hint('gs_parameters.form.name.hint') - = f.input :value, :label => t('gs_parameters.form.value.label'), :hint => conditional_hint('gs_parameters.form.value.hint') - = f.input :class_type, :label => t('gs_parameters.form.class_type.label'), :hint => conditional_hint('gs_parameters.form.class_type.hint') + = f.input :value, :label => t('gs_parameters.form.value.label'), :hint => conditional_hint('gs_parameters.form.value.hint'), :autofocus => true + = f.input :class_type, :collection => ['String', 'Integer', 'Boolean', 'YAML', 'Nil'], :label => t('gs_parameters.form.class_type.label'), :hint => conditional_hint('gs_parameters.form.class_type.hint'), :include_blank => false = f.input :description, :label => t('gs_parameters.form.description.label'), :hint => conditional_hint('gs_parameters.form.description.hint') diff --git a/app/views/gs_parameters/edit.html.haml b/app/views/gs_parameters/edit.html.haml index 7c24234..c00c7df 100644 --- a/app/views/gs_parameters/edit.html.haml +++ b/app/views/gs_parameters/edit.html.haml @@ -1,3 +1,15 @@ - title t("gs_parameters.edit.page_title") +%p + %strong= t('gs_parameters.show.name') + ":" + = @gs_parameter.name +- if !@gs_parameter.entity.blank? + %p + %strong= t('gs_parameters.show.entity') + ":" + = @gs_parameter.entity +- if !@gs_parameter.section.blank? + %p + %strong= t('gs_parameters.show.section') + ":" + = @gs_parameter.section + = render "form" \ 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_core.html.haml | 28 +++++++++++---------- app/views/gs_parameters/index.html.haml | 24 +++++++++--------- app/views/gs_parameters/show.html.haml | 35 ++++++++++++++------------- 3 files changed, 45 insertions(+), 42 deletions(-) (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml index 57fd85f..ece3922 100644 --- a/app/views/gs_parameters/_index_core.html.haml +++ b/app/views/gs_parameters/_index_core.html.haml @@ -1,14 +1,16 @@ -%tr - %th= t('gs_parameters.index.name') - - if !@sections - %th= t('gs_parameters.index.section') - %th= t('gs_parameters.index.value') - -- reset_cycle -- for gs_parameter in gs_parameters - %tr{:class => cycle('odd', 'even')} - %td= gs_parameter.name +- cache([gs_parameters.first.section, gs_parameters.reorder(:updated_at).last, gs_parameters.pluck(:id)]) do + %tr + %th= t('gs_parameters.index.name') + 'asd' - if !@sections - %td= gs_parameter.section - %td= gs_parameter.value - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} \ No newline at end of file + %th= t('gs_parameters.index.section') + %th= t('gs_parameters.index.value') + + - reset_cycle + - for gs_parameter in gs_parameters + - cache(gs_parameter) do + %tr{:class => cycle('odd', 'even')} + %td= gs_parameter.name + - if !@sections + %td= gs_parameter.section + %td= gs_parameter.value + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} \ No newline at end of file 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 diff --git a/app/views/gs_parameters/show.html.haml b/app/views/gs_parameters/show.html.haml index 185641d..7919f8c 100644 --- a/app/views/gs_parameters/show.html.haml +++ b/app/views/gs_parameters/show.html.haml @@ -1,19 +1,20 @@ -- title t("gs_parameters.show.page_title") +- cache(@gs_parameter) do + - title t("gs_parameters.show.page_title") -%p - %strong= t('gs_parameters.show.name') + ":" - = @gs_parameter.name -%p - %strong= t('gs_parameters.show.section') + ":" - = @gs_parameter.section -%p - %strong= t('gs_parameters.show.value') + ":" - = @gs_parameter.value -%p - %strong= t('gs_parameters.show.class_type') + ":" - = @gs_parameter.class_type -%p - %strong= t('gs_parameters.show.description') + ":" - = @gs_parameter.description + %p + %strong= t('gs_parameters.show.name') + ":" + = @gs_parameter.name + %p + %strong= t('gs_parameters.show.section') + ":" + = @gs_parameter.section + %p + %strong= t('gs_parameters.show.value') + ":" + = @gs_parameter.value + %p + %strong= t('gs_parameters.show.class_type') + ":" + = @gs_parameter.class_type + %p + %strong= t('gs_parameters.show.description') + ":" + = @gs_parameter.description -= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_parameter } \ No newline at end of file + = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_parameter } \ No newline at end of file -- 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_core.html.haml | 2 +- app/views/gs_parameters/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml index ece3922..0c36560 100644 --- a/app/views/gs_parameters/_index_core.html.haml +++ b/app/views/gs_parameters/_index_core.html.haml @@ -1,6 +1,6 @@ - cache([gs_parameters.first.section, gs_parameters.reorder(:updated_at).last, gs_parameters.pluck(:id)]) do %tr - %th= t('gs_parameters.index.name') + 'asd' + %th= t('gs_parameters.index.name') - if !@sections %th= t('gs_parameters.index.section') %th= t('gs_parameters.index.value') 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') 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_core.html.haml | 6 +++--- app/views/gs_parameters/index.html.haml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml index 0c36560..a3f8e1c 100644 --- a/app/views/gs_parameters/_index_core.html.haml +++ b/app/views/gs_parameters/_index_core.html.haml @@ -1,4 +1,4 @@ -- cache([gs_parameters.first.section, gs_parameters.reorder(:updated_at).last, gs_parameters.pluck(:id)]) do +- cache(['gs_parameters_table_section', gs_parameters.first.section, gs_parameters.reorder(:updated_at).last, gs_parameters.pluck(:id)]) do %tr %th= t('gs_parameters.index.name') - if !@sections @@ -7,10 +7,10 @@ - reset_cycle - for gs_parameter in gs_parameters - - cache(gs_parameter) do + - cache(['gs_parameters_table_single_row', gs_parameter]) do %tr{:class => cycle('odd', 'even')} %td= gs_parameter.name - if !@sections %td= gs_parameter.section - %td= gs_parameter.value + %td= truncate(gs_parameter.value, :length => 50) =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} \ No newline at end of file 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') 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') 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/edit.html.haml | 2 +- app/views/gs_parameters/index.html.haml | 6 +++--- app/views/gs_parameters/show.html.haml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/edit.html.haml b/app/views/gs_parameters/edit.html.haml index c00c7df..b456f43 100644 --- a/app/views/gs_parameters/edit.html.haml +++ b/app/views/gs_parameters/edit.html.haml @@ -1,4 +1,4 @@ -- title t("gs_parameters.edit.page_title") +- content_for :title, t("gs_parameters.edit.page_title") %p %strong= t('gs_parameters.show.name') + ":" 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 diff --git a/app/views/gs_parameters/show.html.haml b/app/views/gs_parameters/show.html.haml index 7919f8c..795d09c 100644 --- a/app/views/gs_parameters/show.html.haml +++ b/app/views/gs_parameters/show.html.haml @@ -1,5 +1,5 @@ - cache(@gs_parameter) do - - title t("gs_parameters.show.page_title") + - content_for :title, t("gs_parameters.show.page_title") %p %strong= t('gs_parameters.show.name') + ":" -- cgit v1.2.3 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/gs_parameters/_index_core.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/gs_parameters') diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml index a3f8e1c..3d5f3cf 100644 --- a/app/views/gs_parameters/_index_core.html.haml +++ b/app/views/gs_parameters/_index_core.html.haml @@ -5,10 +5,10 @@ %th= t('gs_parameters.index.section') %th= t('gs_parameters.index.value') - - reset_cycle + - for gs_parameter in gs_parameters - cache(['gs_parameters_table_single_row', gs_parameter]) do - %tr{:class => cycle('odd', 'even')} + %tr %td= gs_parameter.name - if !@sections %td= gs_parameter.section -- cgit v1.2.3