summaryrefslogtreecommitdiff
path: root/app/views/gs_parameters
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/gs_parameters')
-rw-r--r--app/views/gs_parameters/_index_core.html.haml37
-rw-r--r--app/views/gs_parameters/index.html.haml4
-rw-r--r--app/views/gs_parameters/show.html.haml46
3 files changed, 54 insertions, 33 deletions
diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml
index 3d5f3cf..11d60db 100644
--- a/app/views/gs_parameters/_index_core.html.haml
+++ b/app/views/gs_parameters/_index_core.html.haml
@@ -1,16 +1,25 @@
- 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
- %th= t('gs_parameters.index.section')
- %th= t('gs_parameters.index.value')
+ %thead
+ %tr
+ %th= t('gs_parameters.index.name')
+ - if !@sections
+ %th= t('gs_parameters.index.section')
+ %th= t('gs_parameters.index.value')
-
- - for gs_parameter in gs_parameters
- - cache(['gs_parameters_table_single_row', gs_parameter]) do
- %tr
- %td= gs_parameter.name
- - if !@sections
- %td= gs_parameter.section
- %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
+ %tbody
+ - for gs_parameter in gs_parameters
+ - cache(['gs_parameters_table_single_row', gs_parameter]) do
+ %tr
+ %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'))
+ - if !@sections
+ %td= gs_parameter.section
+ %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} \ 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 9132cdd..1189a45 100644
--- a/app/views/gs_parameters/index.html.haml
+++ b/app/views/gs_parameters/index.html.haml
@@ -3,7 +3,7 @@
- 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{:class => 'table table-striped'}
+ %table.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{:class => 'table table-striped'}
+ %table.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 795d09c..706625f 100644
--- a/app/views/gs_parameters/show.html.haml
+++ b/app/views/gs_parameters/show.html.haml
@@ -1,20 +1,32 @@
-- cache(@gs_parameter) do
- - content_for :title, t("gs_parameters.show.page_title")
+- content_for :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
+- cache(@gs_parameter) do
+ %table.table.table-striped
+ %tbody
+ %tr
+ %td
+ %strong= t('gs_parameters.show.name') + ":"
+ %td
+ = @gs_parameter.name
+ %tr
+ %td
+ %strong= t('gs_parameters.show.section') + ":"
+ %td
+ = @gs_parameter.section
+ %tr
+ %td
+ %strong= t('gs_parameters.show.value') + ":"
+ %td
+ = @gs_parameter.value
+ %tr
+ %td
+ %strong= t('gs_parameters.show.class_type') + ":"
+ %td
+ = @gs_parameter.class_type
+ %tr
+ %td
+ %strong= t('gs_parameters.show.description') + ":"
+ %td
+ = @gs_parameter.description
= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_parameter } \ No newline at end of file