diff --git a/app/helpers/links_helper.rb b/app/helpers/links_helper.rb new file mode 100644 index 000000000..4d59f234e --- /dev/null +++ b/app/helpers/links_helper.rb @@ -0,0 +1,5 @@ +module LinksHelper + def render_destroy_element_link(builder, element) + link_to_remove_association element.new_record? ? t('links.form.cancel_button') : t('links.form.delete_button') , builder, class: 'delete remove-element' + end +end diff --git a/app/views/admin/proposal_dashboard/actions/index.html.erb b/app/views/admin/proposal_dashboard/actions/index.html.erb index 997df7dac..8cb0b3901 100644 --- a/app/views/admin/proposal_dashboard/actions/index.html.erb +++ b/app/views/admin/proposal_dashboard/actions/index.html.erb @@ -27,7 +27,7 @@ <%= action.title %> <%= t("admin.proposal_dashboard_actions.action_type.#{action.action_type}") %> - <%= action.required_supports %> + <%= number_with_delimiter(action.required_supports, delimiter: '.') %> <%= active_human_readable(action.active) %> <%= link_to t('admin.proposal_dashboard_actions.index.edit'), diff --git a/app/views/links/_link_fields.html.erb b/app/views/links/_link_fields.html.erb index 6a615399f..52f1d97d9 100644 --- a/app/views/links/_link_fields.html.erb +++ b/app/views/links/_link_fields.html.erb @@ -11,8 +11,8 @@ <%= f.check_box :open_in_new_tab, label: Link.human_attribute_name(:open_in_new_tab) %> -
- <%= f.check_box :_destroy, label: t('.destroy') if f.object.id.present? %> +
+ <%= render_destroy_element_link(f, f.object) %>

diff --git a/config/locales/en/documents.yml b/config/locales/en/documents.yml index 12e839941..7471deb84 100644 --- a/config/locales/en/documents.yml +++ b/config/locales/en/documents.yml @@ -7,7 +7,7 @@ en: title_placeholder: Add a descriptive title for the document attachment_label: Choose document delete_button: Remove document - cancel_button: Cancelar + cancel_button: Cancel 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 actions: @@ -21,4 +21,4 @@ en: 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} \ No newline at end of file + wrong_content_type: content type %{content_type} does not match any of accepted content types %{accepted_content_types} diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index aa41b8f7f..3b5911c0b 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -974,6 +974,9 @@ en: text_sign_up: sign up title: How I can comment this document? links: + form: + delete_button: Delete + cancel_button: Cancel nested_links: title: Links note: Add the links that are of interest diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index 9c1c3f112..075f1914c 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -973,6 +973,9 @@ es: text_sign_up: registrarte title: "¿Cómo puedo comentar este documento?" links: + form: + delete_button: Borrar + cancel_button: Cancelar nested_links: title: Enlaces note: Añade los enlaces que sean de interés.