Merge pull request #1809 from rockandror/documentable-ajax
[WIP] Documentable
This commit is contained in:
@@ -37,6 +37,7 @@ data:
|
||||
- config/locales/%{locale}/officing.yml
|
||||
- config/locales/%{locale}/budgets.yml
|
||||
- config/locales/%{locale}/legislation.yml
|
||||
- config/locales/%{locale}/documents.yml
|
||||
|
||||
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
|
||||
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
||||
|
||||
@@ -76,6 +76,9 @@ en:
|
||||
legislation/answers:
|
||||
one: "Answer"
|
||||
other: "Answers"
|
||||
documents:
|
||||
one: "Document"
|
||||
other: "Documents"
|
||||
attributes:
|
||||
budget:
|
||||
name: "Name"
|
||||
@@ -197,6 +200,9 @@ en:
|
||||
value: Value
|
||||
legislation/annotation:
|
||||
text: Comment
|
||||
document:
|
||||
title: Title
|
||||
attachment: Attachment
|
||||
errors:
|
||||
models:
|
||||
user:
|
||||
|
||||
35
config/locales/en/documents.yml
Normal file
35
config/locales/en/documents.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
en:
|
||||
documents:
|
||||
tab: Documents
|
||||
no_documents: Don't have uploaded documents
|
||||
upload_document: Upload document
|
||||
max_documents_allowed_reached_html: You have reached the maximum number of documents allowed! <strong>You have to delete one before you can upload another.</strong>
|
||||
form:
|
||||
title: Documents
|
||||
attachment_label: Choose document
|
||||
submit_button: Upload document
|
||||
delete_button: Remove document
|
||||
note: "You can upload up to a maximum of %{max_documents_allowed} documents of following content types: %{accepted_content_types}, up to %{max_file_size} MB per file."
|
||||
add_new_document: Add new document
|
||||
new:
|
||||
title: Upload document
|
||||
recommendations_title: File upload tips
|
||||
recommendation_one_html: You can upload up to a <strong>maximum of %{max_documents_allowed} documents</strong>.
|
||||
recommendation_two_html: You can upload <strong>%{accepted_content_types}</strong> files.
|
||||
recommendation_three_html: You can upload files up to <strong>%{max_file_size} MB</strong>.
|
||||
|
||||
actions:
|
||||
create:
|
||||
notice: Document was created successfully.
|
||||
alert: Cannot create document. Check form errors and try again.
|
||||
destroy:
|
||||
notice: Document was deleted successfully.
|
||||
alert: Cannot destroy document.
|
||||
confirm: Are you sure you want to delete the document? This action cannot be undone!
|
||||
buttons:
|
||||
download_document: Dowload file
|
||||
destroy_document: Destroy
|
||||
errors:
|
||||
messages:
|
||||
in_between: must be in between %{min} and %{max}
|
||||
wrong_content_type: content type %{content_type} does not match any of accepted content types %{accepted_content_types}
|
||||
@@ -177,6 +177,7 @@ en:
|
||||
user: Account
|
||||
verification/sms: phone
|
||||
signature_sheet: Signature sheet
|
||||
document: Document
|
||||
geozones:
|
||||
none: All city
|
||||
all: All scopes
|
||||
|
||||
@@ -76,6 +76,9 @@ es:
|
||||
legislation/answers:
|
||||
one: "Respuesta"
|
||||
other: "Respuestas"
|
||||
documents:
|
||||
one: "Documento"
|
||||
other: "Documentos"
|
||||
attributes:
|
||||
budget:
|
||||
name: "Nombre"
|
||||
@@ -192,6 +195,9 @@ es:
|
||||
value: Valor
|
||||
legislation/annotation:
|
||||
text: Comentario
|
||||
document:
|
||||
title: Título
|
||||
attachment: Archivo adjunto
|
||||
errors:
|
||||
models:
|
||||
user:
|
||||
|
||||
34
config/locales/es/documents.yml
Normal file
34
config/locales/es/documents.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
es:
|
||||
documents:
|
||||
tab: Documentos
|
||||
no_documents: No hay documentos subidos
|
||||
upload_document: Subir documento
|
||||
max_documents_allowed_reached_html: ¡Has alcanzado el número máximo de documentos permitidos! <strong>Tienes que eliminar uno antes de poder subir otro.</strong>
|
||||
form:
|
||||
title: Documentos
|
||||
attachment_label: Selecciona un documento
|
||||
submit_button: Subir documento
|
||||
delete_button: Eliminar documento
|
||||
note: "Puedes subir hasta un máximo de %{max_documents_allowed} documentos en los formatos: %{accepted_content_types}, y de hasta %{max_file_size} MB por archivo."
|
||||
add_new_document: Añadir nuevo documento
|
||||
new:
|
||||
title: Subir un documento
|
||||
recommendations_title: Consejos para subir archivos
|
||||
recommendation_one_html: Puedes subir hasta un máximo de <strong>%{max_documents_allowed} documentos</strong>
|
||||
recommendation_two_html: Sólo puedes subir <strong>archivos %{accepted_content_types}</strong>.
|
||||
recommendation_three_html: Puedes subir archivos de hasta <strong>%{max_file_size} MB</strong>
|
||||
actions:
|
||||
create:
|
||||
notice: "El documento se ha creado correctamente."
|
||||
alert: "El documento no se ha podido crear. Revise los errores del formulario."
|
||||
destroy:
|
||||
notice: "El documento se ha eliminado correctamente."
|
||||
alert: "El documento no se ha podido eliminar."
|
||||
confirm: "¿Está seguro de que desea eliminar el documento? Esta acción no se puede deshacer!"
|
||||
buttons:
|
||||
download_document: Descargar archivo
|
||||
destroy_document: Eliminar
|
||||
errors:
|
||||
messages:
|
||||
in_between: debe estar entre %{min} y %{max}
|
||||
wrong_content_type: El tipo de contenido %{content_type} del archivo no coincide con ninguno de los tipos de contenido aceptados %{accepted_content_types}
|
||||
@@ -177,6 +177,7 @@ es:
|
||||
user: la cuenta
|
||||
verification/sms: el teléfono
|
||||
signature_sheet: la hoja de firmas
|
||||
document: el documento
|
||||
geozones:
|
||||
none: Toda la ciudad
|
||||
all: Todos los ámbitos de actuación
|
||||
|
||||
@@ -95,6 +95,14 @@ Rails.application.routes.draw do
|
||||
|
||||
resources :follows, only: [:create, :destroy]
|
||||
|
||||
resources :documents, only: [:new, :create, :destroy] do
|
||||
collection do
|
||||
get :new_nested
|
||||
delete :destroy_upload
|
||||
post :upload
|
||||
end
|
||||
end
|
||||
|
||||
resources :stats, only: [:index]
|
||||
|
||||
resources :legacy_legislations, only: [:show], path: 'legislations'
|
||||
|
||||
Reference in New Issue
Block a user