adds document counter to signature sheet

This commit is contained in:
rgarcia
2016-12-27 11:41:38 +01:00
parent 4e1bb62654
commit d554ec810a
4 changed files with 11 additions and 0 deletions

View File

@@ -8,6 +8,11 @@
<strong><%= @signature_sheet.author.name %></strong> <strong><%= @signature_sheet.author.name %></strong>
</div> </div>
<h3 id="document_count" class="block">
<%= t("admin.signature_sheets.show.document_count") %>
<%= @signature_sheet.signatures.count %>
</h3>
<div class="callout margin-top"> <div class="callout margin-top">
<p><strong><%= t("admin.signature_sheets.show.documents") %></strong></p> <p><strong><%= t("admin.signature_sheets.show.documents") %></strong></p>
<%= simple_format @signature_sheet.document_numbers %> <%= simple_format @signature_sheet.document_numbers %>

View File

@@ -312,6 +312,7 @@ en:
created_at: Created created_at: Created
author: Author author: Author
documents: Documents documents: Documents
document_count: "Number of documents:"
verified: verified:
one: "There is %{count} valid signature" one: "There is %{count} valid signature"
other: "There are %{count} valid signatures" other: "There are %{count} valid signatures"

View File

@@ -310,6 +310,7 @@ es:
created_at: Creado created_at: Creado
author: Autor author: Autor
documents: Documentos documents: Documentos
document_count: "Número de documentos:"
verified: verified:
one: "Hay %{count} firma válida" one: "Hay %{count} firma válida"
other: "Hay %{count} firmas válidas" other: "Hay %{count} firmas válidas"

View File

@@ -59,6 +59,10 @@ feature 'Signature sheets' do
expect(page).to have_content signature_sheet.created_at.strftime("%d %b %H:%M") expect(page).to have_content signature_sheet.created_at.strftime("%d %b %H:%M")
expect(page).to have_content user.name expect(page).to have_content user.name
within("#document_count") do
expect(page).to have_content 3
end
within("#verified_signatures") do within("#verified_signatures") do
expect(page).to have_content 1 expect(page).to have_content 1
end end