diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 8f6912716..85997aecd 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -605,6 +605,7 @@ table { .callout { height: $line-height * 2; line-height: $line-height * 2; + margin: 0; padding: 0 $line-height / 2; } } diff --git a/app/views/officing/voters/_voted.html.erb b/app/views/officing/voters/_voted.html.erb index edd098403..49d1523a6 100644 --- a/app/views/officing/voters/_voted.html.erb +++ b/app/views/officing/voters/_voted.html.erb @@ -1,7 +1,3 @@ -
-
-
- <%= t("officing.voters.show.success") %> -
-
-
+ + <%= t("officing.voters.show.success") %> + diff --git a/app/views/officing/voters/new.html.erb b/app/views/officing/voters/new.html.erb index 0f8fa2958..212a9d8f8 100644 --- a/app/views/officing/voters/new.html.erb +++ b/app/views/officing/voters/new.html.erb @@ -7,7 +7,8 @@ <%= t("officing.voters.new.table_poll") %> - <%= t("officing.voters.new.table_actions") %> + <%= t("officing.voters.new.table_status") %> + <%= t("officing.voters.new.table_actions") %> @@ -16,15 +17,35 @@ <%= poll.name %> - - <% if poll.votable_by?(@user) %> - <%= render "can_vote", poll: poll %> - <% else %> - <%= render "already_voted" %> - <% end %> - + <% if poll.votable_by?(@user) %> + +

+ <%= t("officing.voters.show.can_vote") %> +

+ + + <%= form_for @user, as: :voter, url: officing_voters_path, + method: :post, remote: true, + html: { id: "new_officing_voter" } do |f| %> + <%= f.hidden_field :poll_id, value: poll.id %> + <%= f.hidden_field :user_id, value: @user.id %> + <%= f.submit t("officing.voters.show.submit"), + class: "button success", + data: { disable_with: t("officing.voters.can_vote.submit_disable_with") } %> + <% end %> + + <% else %> + +

+ <%= t("officing.voters.show.error_already_voted") %> +

+ + + <%= t("officing.voters.show.no_actions") %> + + <% end %> <% end %> -<% end %> \ No newline at end of file +<% end %> diff --git a/config/locales/en/officing.yml b/config/locales/en/officing.yml index e51e03510..bb9ef6bd2 100644 --- a/config/locales/en/officing.yml +++ b/config/locales/en/officing.yml @@ -58,11 +58,13 @@ en: new: title: Polls table_poll: Poll - table_actions: Polls status + table_status: Polls status + table_actions: Actions show: can_vote: Can vote error_already_voted: Has already participated in this poll + no_actions: There is no available actions submit: Confirm vote success: "Vote introduced!" can_vote: - submit_disable_with: "WAIT, confirming vote" + submit_disable_with: "Wait, confirming vote..." diff --git a/config/locales/es/officing.yml b/config/locales/es/officing.yml index c23b42568..86d6982fc 100644 --- a/config/locales/es/officing.yml +++ b/config/locales/es/officing.yml @@ -58,11 +58,13 @@ es: new: title: Votaciones table_poll: Votación - table_actions: Estado de las votaciones + table_status: Estado de las votaciones + table_actions: Acciones show: can_vote: Puede votar - error_already_voted: "Ya ha participado en esta votación." + error_already_voted: "Ya ha participado en esta votación" + no_actions: No hay acciones disponibles submit: Confirmar voto success: "¡Voto introducido!" can_vote: - submit_disable_with: "ESPERA, confirmando voto" \ No newline at end of file + submit_disable_with: "Espera, confirmando voto..." \ No newline at end of file