Commit b8b1aeee authored by Mateus Ravedutti's avatar Mateus Ravedutti

hotfix: recover modal

parent e121c1a9
......@@ -75,7 +75,9 @@
<% if @pode_cancelar %>
<td>
<% if schedule.can_cancel?(DateTime.now + schedule.shift.service_type.sector.prior_cancel_hours.hours, Date.today) %>
<i class="modal-trigger waves-effect material-icons tooltipped update_citizen_schedule agendador-icon" data-position="top" data-delay="50" data-tooltip="Cancelar" href="#modal_update_citizen_schedule_<%=schedule.id%>" data-target="modal_update_citizen_schedule_<%=schedule.id%>" id="table-buttons-actions">cancel</i>
<a class="waves-effect tooltipped modal-trigger has-modal" data-position="top" data-delay="50" data-tooltip="Cancelar" href="#modal_update_citizen_schedule_<%=schedule.id%>">
<i class="material-icons update_citizen_schedule agendador-icon" id="table-buttons-actions">cancel</i>
</a>
<% end %>
</td>
<% end %>
......@@ -85,4 +87,17 @@
</table>
</div>
<% end %>
<% @schedules.each do |schedule| %>
<div id="modal_update_citizen_schedule_<%=schedule.id%>" class="modal">
<div class="modal-content">
<h4 id="update-citizen-schedule-header">Cancelar agendamento</h4>
<p>Deseja realmente cancelar este agendamento?</p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-red btn-flat left">Não</a>
<%= link_to "Sim", { :controller => "citizens", :action => "destroy",
:id => schedule.id }, :method => :delete, :class => "modal-action modal-close waves-effect waves-green btn-flat" %>
</div>
</div>
<% end %>
<%= will_paginate schedules, :renderer => Pagination %>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment