memberlog/app/views/admin/memberlogs/_memberlogs.html.erb

43 lines
1.6 KiB
Plaintext

<% @memberlogs.each do |memberlog| %>
<tr id="<%= dom_id memberlog %>" class="with_action">
<td class="span2"><%= memberlog.member_profile.name rescue "" %></td>
<td class="span2"><%= memberlog.created_at.strftime('%Y-%m-%d (%a) %R') %></td>
<td>
<% if memberlog.finish == true %>
<%= memberlog.checkout.strftime('%R') %></td>
<% else %>
<span class="label label-warning"><%= t('memberlog.working') %></span>
<% end %>
</td>
<td class="span6">
<%= link_to memberlog.todo.html_safe, admin_memberlog_path(memberlog.id), :class => "modal-opener" %>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<li><a href="#" class="detail-row" onclick="$('#<%= "#{memberlog.id.to_s}-detail" %>').slideToggle(300); return false;"><%= t(:detail) %></a></li>
<!-- <li><%= link_to t('edit'), edit_admin_memberlog_path(memberlog,:page => params[:page]) %></li>
<li><%= link_to t(:delete_), admin_memberlog_path(id: memberlog.id, :page => params[:page]), method: :delete, data: { confirm: 'Are you sure?' } %></li> -->
</ul>
</div>
</td>
<td>
<% if !memberlog.excuse.nil? %>
<span class="label label-important"><%= memberlog.excuse %></span>
<% end %>
</td>
</tr>
<tr class="footable-row-detail">
<td class="footable-cell-detail" colspan="6">
<div id="<%= "#{memberlog.id.to_s}-detail" %>" class="footable-row-detail-inner" style="display: none;">
<div>
<strong><%= t(:complete) %></strong> :
<%= memberlog.complete%>
</div>
</div>
</td>
</tr>
<% end %>