summaryrefslogtreecommitdiff
path: root/app/views/gs_parameters
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-06 20:52:04 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-06 20:52:04 +0100
commit464a2f4907bd27b62f7b5cc5d7537b90469b03bd (patch)
tree350c0fe981cfe1cf7d9b4de51ad73b7e3a26449b /app/views/gs_parameters
parentc500e125c2ee5297b51e463f93940d450dab0813 (diff)
GsParameter can only be created or destroyed by migrations.
Diffstat (limited to 'app/views/gs_parameters')
-rw-r--r--app/views/gs_parameters/_index_core.html.haml25
-rw-r--r--app/views/gs_parameters/index.html.haml11
-rw-r--r--app/views/gs_parameters/new.html.haml3
3 files changed, 21 insertions, 18 deletions
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