diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-07 11:37:03 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-07 11:37:03 +0100 |
commit | 11f186a118285fbc87a536af26730780a9ad01f5 (patch) | |
tree | fe6363b036f60f238916d070b3d0cb0625dd53c8 /app/views/gs_parameters | |
parent | 2b94b16ee1201d15b3b9d66e142df311141a47db (diff) | |
parent | 3e19646f46c772e10ed3d7a45e8c974ab23f625b (diff) |
Merge branch 'develop'5.1.1
Diffstat (limited to 'app/views/gs_parameters')
-rw-r--r-- | app/views/gs_parameters/index.html.haml | 48 | ||||
-rw-r--r-- | app/views/gs_parameters/show.html.haml | 10 |
2 files changed, 47 insertions, 11 deletions
diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 8df2bb3..9d757a0 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -2,12 +2,42 @@ - cache(['gs_parameter_all_tables', I18n.locale, @gs_parameters.count, @gs_parameters.reorder(:updated_at).first, @gs_parameters.reorder(:updated_at).last]) do - if @gs_parameters && @gs_parameters.count > 0 - - if @sections - - @sections.each do |section| - %h3= section - %table.table.table-striped - -# Template Dependency: gs_parameters/_index_core - = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) - - else - %table.table.table-striped - = render "index_core", :gs_parameters => @gs_parameters + %table.table.table-striped + %thead + %tr + %th + %th + %th + %th + + %tbody + - @entities.each do |entity_name, entity| + %tr.table.info + %td{:colspan => 5} + - if !entity_name.blank? + %strong= entity_name + - entity.each do |section_name, section| + %tr.table.success + %td + %td{:colspan => 4} + %strong= section_name + - gs_parameters = @gs_parameters.where(:entity => entity_name, :section => section_name) + - cache(['gs_parameter_sub_table', I18n.locale, gs_parameters.count, gs_parameters.reorder(:updated_at).first, gs_parameters.reorder(:updated_at).last]) do + + - for gs_parameter in gs_parameters + - cache(['gs_parameters_table_single_row', I18n.locale, gs_parameter]) do + %tr + %td + %td + %td + %span.hidden-phone + = truncate(gs_parameter.name, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH')) + %span.visible-phone + = truncate(gs_parameter.name, :length => GsParameter.get('MOBILE_MAX_STRING_LENGTH')) + %td + %span.hidden-phone + = truncate(gs_parameter.value, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH')) + %span.visible-phone + = truncate(gs_parameter.value, :length => GsParameter.get('MOBILE_MAX_STRING_LENGTH')) + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} + diff --git a/app/views/gs_parameters/show.html.haml b/app/views/gs_parameters/show.html.haml index 706625f..85e9b98 100644 --- a/app/views/gs_parameters/show.html.haml +++ b/app/views/gs_parameters/show.html.haml @@ -4,10 +4,11 @@ %table.table.table-striped %tbody %tr + %tr %td - %strong= t('gs_parameters.show.name') + ":" + %strong= t('gs_parameters.show.entity') + ":" %td - = @gs_parameter.name + = @gs_parameter.entity %tr %td %strong= t('gs_parameters.show.section') + ":" @@ -15,6 +16,11 @@ = @gs_parameter.section %tr %td + %strong= t('gs_parameters.show.name') + ":" + %td + = @gs_parameter.name + %tr + %td %strong= t('gs_parameters.show.value') + ":" %td = @gs_parameter.value |