summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/gs_parameters/_form.html.erb15
-rw-r--r--app/views/gs_parameters/_form.html.haml7
-rw-r--r--app/views/gs_parameters/_form_core.html.haml6
-rw-r--r--app/views/gs_parameters/_index_core.html.haml17
-rw-r--r--app/views/gs_parameters/edit.html.erb6
-rw-r--r--app/views/gs_parameters/edit.html.haml3
-rw-r--r--app/views/gs_parameters/index.html.erb29
-rw-r--r--app/views/gs_parameters/index.html.haml6
-rw-r--r--app/views/gs_parameters/new.html.erb5
-rw-r--r--app/views/gs_parameters/new.html.haml3
-rw-r--r--app/views/gs_parameters/show.html.erb25
-rw-r--r--app/views/gs_parameters/show.html.haml19
12 files changed, 61 insertions, 80 deletions
diff --git a/app/views/gs_parameters/_form.html.erb b/app/views/gs_parameters/_form.html.erb
deleted file mode 100644
index e559bcc..0000000
--- a/app/views/gs_parameters/_form.html.erb
+++ /dev/null
@@ -1,15 +0,0 @@
-<%= simple_form_for(@gs_parameter) do |f| %>
- <%= f.error_notification %>
-
- <div class="inputs">
- <%= f.input :name, :autofocus => true %>
- <%= f.input :section %>
- <%= f.input :value %>
- <%= f.input :class_type %>
-
- </div>
-
- <div class="actions">
- <%= f.button :submit %>
- </div>
-<% end %>
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..ebb5f2d
--- /dev/null
+++ b/app/views/gs_parameters/_form_core.html.haml
@@ -0,0 +1,6 @@
+.inputs
+ = f.input :name, :label => t('gs_parameters.form.name.label'), :hint => conditional_hint('gs_parameters.form.name.hint')
+ = f.input :section, :label => t('gs_parameters.form.section.label'), :hint => conditional_hint('gs_parameters.form.section.hint')
+ = f.input :value, :label => t('gs_parameters.form.value.label'), :hint => conditional_hint('gs_parameters.form.value.hint')
+ = f.input :class_type, :label => t('gs_parameters.form.class_type.label'), :hint => conditional_hint('gs_parameters.form.class_type.hint')
+ = 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..cc6fdd9
--- /dev/null
+++ b/app/views/gs_parameters/_index_core.html.haml
@@ -0,0 +1,17 @@
+%table
+ %tr
+ %th= t('gs_parameters.index.name')
+ %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')
+
+ - reset_cycle
+ - for gs_parameter in gs_parameters
+ %tr{:class => cycle('odd', 'even')}
+ %td= gs_parameter.name
+ %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
diff --git a/app/views/gs_parameters/edit.html.erb b/app/views/gs_parameters/edit.html.erb
deleted file mode 100644
index 6938a40..0000000
--- a/app/views/gs_parameters/edit.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-<h1>Editing gs_parameter</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Show', @gs_parameter %> |
-<%= link_to 'Back', gs_parameters_path %>
diff --git a/app/views/gs_parameters/edit.html.haml b/app/views/gs_parameters/edit.html.haml
new file mode 100644
index 0000000..7c24234
--- /dev/null
+++ b/app/views/gs_parameters/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("gs_parameters.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gs_parameters/index.html.erb b/app/views/gs_parameters/index.html.erb
deleted file mode 100644
index dee6838..0000000
--- a/app/views/gs_parameters/index.html.erb
+++ /dev/null
@@ -1,29 +0,0 @@
-<h1>Listing gs_parameters</h1>
-
-<table>
- <tr>
- <th>Name</th>
- <th>Section</th>
- <th>Value</th>
- <th>Class type</th>
- <th></th>
- <th></th>
- <th></th>
- </tr>
-
-<% @gs_parameters.each do |gs_parameter| %>
- <tr>
- <td><%= gs_parameter.name %></td>
- <td><%= gs_parameter.section %></td>
- <td><%= gs_parameter.value %></td>
- <td><%= gs_parameter.class_type %></td>
- <td><%= link_to 'Show', gs_parameter %></td>
- <td><%= link_to 'Edit', edit_gs_parameter_path(gs_parameter) %></td>
- <td><%= link_to 'Destroy', gs_parameter, confirm: 'Are you sure?', method: :delete %></td>
- </tr>
-<% end %>
-</table>
-
-<br />
-
-<%= link_to 'New Gs parameter', new_gs_parameter_path %>
diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml
new file mode 100644
index 0000000..4c9ac84
--- /dev/null
+++ b/app/views/gs_parameters/index.html.haml
@@ -0,0 +1,6 @@
+- title t("gs_parameters.index.page_title")
+
+- if @gs_parameters && @gs_parameters.count > 0
+ = 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.erb b/app/views/gs_parameters/new.html.erb
deleted file mode 100644
index a357e2e..0000000
--- a/app/views/gs_parameters/new.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-<h1>New gs_parameter</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Back', gs_parameters_path %>
diff --git a/app/views/gs_parameters/new.html.haml b/app/views/gs_parameters/new.html.haml
new file mode 100644
index 0000000..845acc2
--- /dev/null
+++ b/app/views/gs_parameters/new.html.haml
@@ -0,0 +1,3 @@
+- title t("gs_parameters.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/gs_parameters/show.html.erb b/app/views/gs_parameters/show.html.erb
deleted file mode 100644
index 1f03542..0000000
--- a/app/views/gs_parameters/show.html.erb
+++ /dev/null
@@ -1,25 +0,0 @@
-<p id="notice"><%= notice %></p>
-
-<p>
- <b>Name:</b>
- <%= @gs_parameter.name %>
-</p>
-
-<p>
- <b>Section:</b>
- <%= @gs_parameter.section %>
-</p>
-
-<p>
- <b>Value:</b>
- <%= @gs_parameter.value %>
-</p>
-
-<p>
- <b>Class type:</b>
- <%= @gs_parameter.class_type %>
-</p>
-
-
-<%= link_to 'Edit', edit_gs_parameter_path(@gs_parameter) %> |
-<%= link_to 'Back', gs_parameters_path %>
diff --git a/app/views/gs_parameters/show.html.haml b/app/views/gs_parameters/show.html.haml
new file mode 100644
index 0000000..185641d
--- /dev/null
+++ b/app/views/gs_parameters/show.html.haml
@@ -0,0 +1,19 @@
+- 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