Merge branch 'master' into redux-polling
This commit is contained in:
@@ -118,5 +118,13 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<% if feature?(:signature_sheets) %>
|
||||
<li <%= "class=active" if controller_name == "signature_sheets" %>>
|
||||
<%= link_to admin_signature_sheets_path do %>
|
||||
<span class="icon-budget"></span><%= t("admin.menu.signature_sheets") %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
15
app/views/admin/geozones/_errors.html.erb
Normal file
15
app/views/admin/geozones/_errors.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
<% if @geozone.errors.any? %>
|
||||
|
||||
<div id="error_explanation" data-alert class="callout alert" data-closable>
|
||||
<button class="close-button" aria-label="<%= t("application.close") %>" type="button" data-close>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
||||
<strong>
|
||||
<%= @geozone.errors.count %>
|
||||
<%= t("admin.geozones.errors.form.error", count: @geozone.errors.count) %>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
29
app/views/admin/geozones/_form.html.erb
Normal file
29
app/views/admin/geozones/_form.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<%= form_for [:admin, @geozone] do |f| %>
|
||||
|
||||
<%= render 'errors' %>
|
||||
|
||||
<div clas="row">
|
||||
<div class="small-12 medium-6 large-4 column">
|
||||
<%= f.label :name, t("admin.geozones.geozone.name") %>
|
||||
<%= f.text_field :name, label: false %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 large-4 column">
|
||||
<%= f.label :html_map_coordinates, t("admin.geozones.geozone.coordinates") %>
|
||||
<%= f.text_field :html_map_coordinates, label: false %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 large-2 column">
|
||||
<%= f.label :external_code, t("admin.geozones.geozone.external_code") %>
|
||||
<%= f.text_field :external_code, label: false %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 large-2 column">
|
||||
<%= f.label :census_code, t("admin.geozones.geozone.census_code") %>
|
||||
<%= f.text_field :census_code, label: false %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="actions small-12 large-3 medium-3 column">
|
||||
<%= f.submit(class: "button expanded", value: t("admin.geozones.edit.form.submit_button")) %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
13
app/views/admin/geozones/edit.html.erb
Normal file
13
app/views/admin/geozones/edit.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= link_to admin_geozones_path, class: "back" do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= t("admin.geozones.edit.back") %>
|
||||
<% end %>
|
||||
|
||||
<h1><%= t("admin.geozones.edit.editing") %></h1>
|
||||
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
</div>
|
||||
33
app/views/admin/geozones/index.html.erb
Normal file
33
app/views/admin/geozones/index.html.erb
Normal file
@@ -0,0 +1,33 @@
|
||||
<%= link_to t("admin.geozones.index.create"),
|
||||
new_admin_geozone_path, class: "button success float-right" %>
|
||||
|
||||
<h2 class="inline-block"><%= t("admin.geozones.index.title") %></h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.geozones.geozone.name") %></th>
|
||||
<th><%= t("admin.geozones.geozone.external_code") %></th>
|
||||
<th><%= t("admin.geozones.geozone.census_code") %></th>
|
||||
<th><%= t("admin.geozones.geozone.coordinates") %></th>
|
||||
<th colspan="2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @geozones.each do |geozone| %>
|
||||
<tr id="<%= dom_id(geozone) %>">
|
||||
<td><%= geozone.name %></td>
|
||||
<td><%= geozone.external_code %></td>
|
||||
<td><%= geozone.census_code %></td>
|
||||
<td><%= geozone.html_map_coordinates %></td>
|
||||
<td>
|
||||
<%= link_to t("admin.geozones.index.edit"), edit_admin_geozone_path(geozone), class: 'edit-banner button hollow' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t("admin.geozones.index.delete"), admin_geozone_path(geozone), method: :delete, class: 'button hollow alert' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
13
app/views/admin/geozones/new.html.erb
Normal file
13
app/views/admin/geozones/new.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="geozone-new row">
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= link_to admin_geozones_path, class: "back" do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= t("admin.geozones.new.back") %>
|
||||
<% end %>
|
||||
|
||||
<h1><%= t("admin.geozones.new.creating") %></h1>
|
||||
|
||||
<%= render "form" %>
|
||||
</div>
|
||||
</div>
|
||||
31
app/views/admin/signature_sheets/index.html.erb
Normal file
31
app/views/admin/signature_sheets/index.html.erb
Normal file
@@ -0,0 +1,31 @@
|
||||
<h2 class="inline-block"><%= t("admin.signature_sheets.index.title") %></h2>
|
||||
|
||||
<%= link_to t("admin.signature_sheets.index.new"), new_admin_signature_sheet_path,
|
||||
class: "button success float-right" %>
|
||||
|
||||
<% if @signature_sheets.any? %>
|
||||
<table>
|
||||
<tr>
|
||||
<th><%= t("admin.signature_sheets.name") %></th>
|
||||
<th><%= t("admin.signature_sheets.author") %></th>
|
||||
<th><%= t("admin.signature_sheets.created_at") %></th>
|
||||
</tr>
|
||||
<% @signature_sheets.each do |signature_sheet| %>
|
||||
<tr id="<%= dom_id(signature_sheet) %>" class="signature_sheet">
|
||||
<td>
|
||||
<%= link_to signature_sheet.name, [:admin, signature_sheet] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= signature_sheet.author.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= l(signature_sheet.created_at, format: :short) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% else %>
|
||||
<div class="callout primary margin-top">
|
||||
<%= t("admin.signature_sheets.no_signature_sheets") %>
|
||||
</div>
|
||||
<% end %>
|
||||
22
app/views/admin/signature_sheets/new.html.erb
Normal file
22
app/views/admin/signature_sheets/new.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<%= render 'shared/back_link' %>
|
||||
|
||||
<h2><%= t("admin.signature_sheets.new.title") %></h2>
|
||||
|
||||
<%= form_for [:admin, @signature_sheet] do |f| %>
|
||||
<%= render 'shared/errors',
|
||||
resource: @signature_sheet %>
|
||||
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= f.select :signable_type, signable_options %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= f.text_field :signable_id %>
|
||||
</div>
|
||||
|
||||
<%= f.label :document_numbers %>
|
||||
<p class="note"><%= t("admin.signature_sheets.new.document_numbers_note") %></p>
|
||||
<%= f.text_area :document_numbers, rows: "6", label: false %>
|
||||
|
||||
<%= f.submit(class: "button", value: t("admin.signature_sheets.new.submit")) %>
|
||||
<% end %>
|
||||
39
app/views/admin/signature_sheets/show.html.erb
Normal file
39
app/views/admin/signature_sheets/show.html.erb
Normal file
@@ -0,0 +1,39 @@
|
||||
<h2 class="inline-block"><%= @signature_sheet.name %></h2>
|
||||
|
||||
<div class="callout secondary float-right">
|
||||
<%= t("admin.signature_sheets.show.created_at") %>
|
||||
<strong><%= l(@signature_sheet.created_at, format: :short) %></strong>
|
||||
<span class="bullet"> • </span>
|
||||
<%= t("admin.signature_sheets.show.author") %>
|
||||
<strong><%= @signature_sheet.author.name %></strong>
|
||||
</div>
|
||||
|
||||
<div class="callout margin-top">
|
||||
<p><strong><%= t("admin.signature_sheets.show.documents") %></strong></p>
|
||||
<%= simple_format @signature_sheet.document_numbers %>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="verified_signatures" class="callout success">
|
||||
<strong>
|
||||
<%= t("admin.signature_sheets.show.verified",
|
||||
count: @signature_sheet.signatures.verified.count ) %>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div id="unverified_signatures" class="callout alert">
|
||||
<p>
|
||||
<strong>
|
||||
<%= t("admin.signature_sheets.show.unverified",
|
||||
count: @signature_sheet.signatures.unverified.count ) %>
|
||||
<%= t("admin.signature_sheets.show.unverified_error") %>
|
||||
</strong>
|
||||
</p>
|
||||
<%= @signature_sheet.signatures.unverified.map(&:document_number).join(", ") %>
|
||||
</div>
|
||||
|
||||
<% unless @signature_sheet.processed? %>
|
||||
<div class="callout primary margin-top">
|
||||
<%= t("admin.signature_sheets.show.loading") %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user