Merge branch 'master' into legislation-module-stable
This commit is contained in:
@@ -35,6 +35,14 @@
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% 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 %>
|
||||
|
||||
<% if feature?(:legislation) %>
|
||||
<li <%= "class=active" if controller_name == "processes" %>>
|
||||
<%= link_to admin_legislation_processes_path do %>
|
||||
|
||||
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