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/_form.html.haml7
-rw-r--r--app/views/gs_parameters/_form_core.html.haml4
-rw-r--r--app/views/gs_parameters/_index_core.html.haml16
-rw-r--r--app/views/gs_parameters/edit.html.haml15
-rw-r--r--app/views/gs_parameters/index.html.haml15
-rw-r--r--app/views/gs_parameters/show.html.haml20
6 files changed, 77 insertions, 0 deletions
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..70b3773
--- /dev/null
+++ b/app/views/gs_parameters/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ = 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/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml
new file mode 100644
index 0000000..3d5f3cf
--- /dev/null
+++ b/app/views/gs_parameters/_index_core.html.haml
@@ -0,0 +1,16 @@
+- 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')
+
+
+ - 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
diff --git a/app/views/gs_parameters/edit.html.haml b/app/views/gs_parameters/edit.html.haml
new file mode 100644
index 0000000..b456f43
--- /dev/null
+++ b/app/views/gs_parameters/edit.html.haml
@@ -0,0 +1,15 @@
+- content_for :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
diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml
new file mode 100644
index 0000000..9132cdd
--- /dev/null
+++ b/app/views/gs_parameters/index.html.haml
@@ -0,0 +1,15 @@
+- 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{:class => 'table table-striped'}
+ - @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{: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
new file mode 100644
index 0000000..795d09c
--- /dev/null
+++ b/app/views/gs_parameters/show.html.haml
@@ -0,0 +1,20 @@
+- cache(@gs_parameter) do
+ - 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
+
+ = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_parameter } \ No newline at end of file