diff --git a/app/views/admin/site_customization/documents/index.html.erb b/app/views/admin/site_customization/documents/index.html.erb index e122cc891..ee792f63f 100644 --- a/app/views/admin/site_customization/documents/index.html.erb +++ b/app/views/admin/site_customization/documents/index.html.erb @@ -1,20 +1,20 @@ -

Documentos

+

<%= t("admin.documents.index.title") %>

<%= link_to t("admin.documents.index.new_link"), new_admin_site_customization_document_path, class: "button float-right" %> -

<%= page_entries_info @documents %>

- <% if @documents.any? %> +

<%= page_entries_info @documents %>

+ - - - - - + + + + + @@ -26,10 +26,10 @@ diff --git a/config/locales/en/activerecord.yml b/config/locales/en/activerecord.yml index 9396fbc85..450dcb797 100644 --- a/config/locales/en/activerecord.yml +++ b/config/locales/en/activerecord.yml @@ -79,6 +79,9 @@ en: site_customization/content_block: one: Custom content block other: Custom content blocks + document: + one: Document + other: Documents legislation/process: one: "Process" other: "Processes" diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index b881adfc9..ad66ad884 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -441,11 +441,15 @@ en: documents: new: title: "Upload a document" - file_field_text: "Choose document" + label_attachment: "Choose document" submit_button: "Upload" index: new_link: "Add new document" no_documents: "There are no documents." + title: "Documents" + format: "Format" + size: "Size" + url: "URL" create: success_notice: "Document uploaded succesfully" unable_notice: "Invalid document" diff --git a/config/locales/es/activerecord.yml b/config/locales/es/activerecord.yml index f564f4e11..c8ef9247d 100644 --- a/config/locales/es/activerecord.yml +++ b/config/locales/es/activerecord.yml @@ -79,6 +79,9 @@ es: site_customization/content_block: one: Bloque other: Bloques + document: + one: Documento + other: Documentos legislation/process: one: "Proceso" other: "Procesos" diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index bc3eb9314..b55e1dae8 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -441,13 +441,18 @@ es: documents: new: title: "Subir un documento" + label_attachment: "Selecciona un documento" submit_button: "Subir documento" index: + title: "Documentos" new_link: "Subir un documento" no_documents: "No hay documentos." + format: "Formato" + size: "Tamaño" + url: "URL" create: success_notice: "Documento creado correctamente" - unable_notice: "Document inválido" + unable_notice: "Documento inválido" destroy: success_notice: "Documento borrado correctamente" hidden_users: diff --git a/spec/features/admin/site_customization/documents_spec.rb b/spec/features/admin/site_customization/documents_spec.rb index c7bbe446a..d373993ce 100644 --- a/spec/features/admin/site_customization/documents_spec.rb +++ b/spec/features/admin/site_customization/documents_spec.rb @@ -79,7 +79,7 @@ feature 'Documents' do visit admin_site_customization_documents_path within("#document_#{document.id}") do - accept_confirm { click_link "Destroy" } + accept_confirm { click_link "Delete" } end expect(page).to have_content "Document deleted succesfully"
TitleFormatSizeUrlActions<%= t("admin.shared.title") %><%= t("admin.documents.index.format") %><%= t("admin.documents.index.size") %><%= t("admin.documents.index.url") %><%= t("admin.shared.actions") %>
<%= link_to document.title, document.attachment.url, target: :blank %>
- <%= link_to "Destroy", - admin_site_customization_document_path(document), + <%= link_to t("admin.shared.delete"), + admin_site_customization_document_path(document), method: :delete, - data: { confirm: t('admin.actions.confirm') } %> + data: { confirm: t("admin.actions.confirm") } %>