diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 7686887ed..6c5a08ae6 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -942,6 +942,15 @@ .note-marked p{ margin-bottom:0; } + .image-upload{ + .button, p{ + float: left; + } + p{ + margin-left:1rem; + margin-top: 0.8rem; + } + } } .investment-project-show .supports, diff --git a/app/views/budgets/investments/_image_form.html.erb b/app/views/budgets/investments/_image_form.html.erb index 5be91a466..0d009b661 100644 --- a/app/views/budgets/investments/_image_form.html.erb +++ b/app/views/budgets/investments/_image_form.html.erb @@ -1,30 +1,29 @@ <%= form_for([@investment.budget, @investment], url: update_image_budget_investment_path(@investment.budget, @investment), multipart: true, method: :put) do |f| %> <%= render 'shared/errors', resource: @investment %> -
-
<% note_key = @investment.image.exists? ? "edit_note" : "add_note" %> <%= t("budgets.investments.edit_image.#{note_key}", title: @investment.title) %>

- <% if @investment.image.exists? %>
<%= image_tag @investment.image.url(:large) %>
<% end %> -
- <%= f.file_field :image, accept: 'image/jpeg' %> +
+ <%= f.file_field :image, accept: 'image/jpeg', label: false, class:'show-for-sr' %> +
+ <%= f.label :image, t("images.upload_image"), class:'button' %> +

<%= @investment.image.url.split('/').last.split("?")[0] %>

+
-
<%= f.label :image_title, t("budgets.investments.edit_image.form.image_title") %> <%= f.text_field :image_title, placeholder: t("budgets.investments.edit_image.form.image_title"), label: false %>
-
<%= f.submit(class: "button", value: t("budgets.investments.edit_image.form.submit_button")) %>
diff --git a/app/views/budgets/investments/_investment_show.html.erb b/app/views/budgets/investments/_investment_show.html.erb index ab255796a..8fa83c1e9 100644 --- a/app/views/budgets/investments/_investment_show.html.erb +++ b/app/views/budgets/investments/_investment_show.html.erb @@ -27,7 +27,6 @@ <%= investment.heading.name %>

- <% if investment.image.exists? %>
@@ -43,8 +42,6 @@
- - <% end %>

<%= t("budgets.investments.show.code_html", code: investment.id) %> diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 85089ca20..ed5fcdc58 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -184,6 +184,8 @@ en: geozones: none: All city all: All scopes + images: + upload_image: Upload Image layouts: application: chrome: Google Chrome diff --git a/config/locales/es/activerecord.yml b/config/locales/es/activerecord.yml index 82190a041..238782276 100644 --- a/config/locales/es/activerecord.yml +++ b/config/locales/es/activerecord.yml @@ -99,7 +99,7 @@ es: title: "Título" location: "Ubicación" organization_name: "Si estás proponiendo en nombre de una organización o colectivo, escribe su nombre" - image: "Imagen descriptiva de la propueta" + image: "Imagen descriptiva de la propuesta" image_title: "Título de la imagen" comment: body: "Comentario" diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index 9f52ccc38..00b7d3d80 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -184,6 +184,8 @@ es: geozones: none: Toda la ciudad all: Todos los ámbitos de actuación + images: + upload_image: Subir una imagen layouts: application: chrome: Google Chrome