Fixed last minute bugs

Fixed last minute bugs with polls
This commit is contained in:
Juan Salvador Pérez García
2018-07-19 10:00:37 +02:00
parent 0e8746299d
commit 4ee0a94241
4 changed files with 5 additions and 4 deletions

View File

@@ -39,6 +39,7 @@ class Poll < ActiveRecord::Base
scope :overlaping_with, lambda { |poll|
where('? < ends_at and ? >= starts_at', poll.starts_at.beginning_of_day, poll.ends_at.end_of_day)
.where.not(id: poll.id)
.where(related: poll.related)
}
scope :sort_for_list, -> { order(:geozone_restricted, :starts_at, :name) }

View File

@@ -19,11 +19,9 @@
<div class="card-section text-center">
<% if poll.incoming? %>
<%= link_to 'Editar encuesta', edit_proposal_dashboard_poll_path(proposal, poll), class: 'button hollow' %>
<%= link_to t('.edit_poll'), edit_proposal_dashboard_poll_path(proposal, poll), class: 'button hollow' %>
<% else %>
<a href='#' class="button">
<%= t('.view_responses') %>
</a>
<%= link_to t('.view_responses'), proposal_dashboard_poll_path(proposal, poll), class: 'button' %>
<% end %>
</div>
<div class="card-section">

View File

@@ -577,6 +577,7 @@ en:
one: "%{count} response"
other: "%{count} responses"
view_responses: View responses
edit_poll: Edit survey
show_results: Show results
show_results_help: If you check this box the results will be public and all users will be able to see them
form:

View File

@@ -577,6 +577,7 @@ es:
one: "%{count} respuesta"
other: "%{count} respuestas"
view_responses: Ver respuestas
edit_poll: Editar encuesta
show_results: Mostrar resultados
show_results_help: Si marcas esta casilla los resultados serán públicos y todos los usuarios podrán verlos
form: