Skip to content

Instantly share code, notes, and snippets.

@noili
Last active August 28, 2016 23:40
Show Gist options
  • Save noili/7649dfd359ef84d0e2c32ca4165988e0 to your computer and use it in GitHub Desktop.
Save noili/7649dfd359ef84d0e2c32ca4165988e0 to your computer and use it in GitHub Desktop.
<li class="date <%= 'inactive' if day.expired? %>">
<h1>
<%= day.date.strftime('%a, %d') %>
<% if selectable_day? day %>
<button type="button" class="btn btn-primary btn-sm my-btn"
data-at="<%= day.date %>" title="Nuevo turno">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
<span class="sr-only">Nuevo turno</span>
</button>
<% end %>
</h1>
<ul class="list-group">
<% day.turns.each do |turn|%>
<li data-turn-id="<%= turn.id %>" class="list-group-item<%= "-warning" if @visit && !turn.zones.include?(@visit.client.zone) %>">
<%= turn.employee %>
<% turn.zones.each do |zone| %>
<span class="label label-info"><%= zone %></span>
<% end %>
<span class="label label-default"><%= turn.visits.count %></span>
<% if selectable_day? day %>
<button type="button" class="btn btn-primary btn-xs"
data-at="<%= day.date %>" title="Seleccionar turno">
<span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
<span class="sr-only">Seleccionar</span>
</button>
<% end %>
<%= link_to turn_path(turn), class: "btn btn-default btn-xs",
title: "detalles" do %>
<span class="glyphicon glyphicon-info-sign" aria-hidden="true">
</span>
<span class="sr-only">detalles</span>
<% end %>
</li>
<% end %>
</ul>
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment