summaryrefslogtreecommitdiff
path: root/app/views/gs_parameters
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-24 13:49:44 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-24 13:49:44 +0100
commitea3df5a7eb079982a8fcda3df572a0d1433b7f52 (patch)
treea6bf21ab9e2187ff1b17654a0df2c9309c62146d /app/views/gs_parameters
parentb792c8eb19fba97a7dab5cd2be8e6bd74617e7d2 (diff)
Better UI on mobile phones.
Diffstat (limited to 'app/views/gs_parameters')
-rw-r--r--app/views/gs_parameters/_index_core.html.haml12
-rw-r--r--app/views/gs_parameters/show.html.haml46
2 files changed, 39 insertions, 19 deletions
diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml
index 9628feb..11d60db 100644
--- a/app/views/gs_parameters/_index_core.html.haml
+++ b/app/views/gs_parameters/_index_core.html.haml
@@ -10,8 +10,16 @@
- for gs_parameter in gs_parameters
- cache(['gs_parameters_table_single_row', gs_parameter]) do
%tr
- %td= gs_parameter.name
+ %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= truncate(gs_parameter.value, :length => 50)
+ %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/show.html.haml b/app/views/gs_parameters/show.html.haml
index 795d09c..d04949b 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{:class => '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