Can't checkout when the time expired
This commit is contained in:
parent
119ed32168
commit
257d408ec5
|
@ -8,6 +8,7 @@ class Admin::MemberlogsController < OrbitMemberController
|
|||
def index
|
||||
@dayoffs = Dayoff.all
|
||||
@now = Time.now.to_date
|
||||
# @ch = ["一","二","三","四","五","六","日"]
|
||||
@memberlogs = MemberLog.all.order_by(:created_at=>'desc').page(params[:page]).per(10)
|
||||
end
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
<%= f.hidden_field :member_profile_id, :value => @member.id %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="control-group"></div>
|
||||
<div class="control-group"></div>
|
||||
<% end %>
|
||||
|
||||
<!-- Dayoff Description -->
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% @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)') %>
|
||||
<td class="span2"><%= memberlog.created_at.strftime('%Y/%m/%d (%a)') %></td>
|
||||
<% if memberlog.dayoff == true %>
|
||||
<td><span class="badge badge-important"><%= t('memberlog.dayoff') %> </span></td>
|
||||
<% else %>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<% if memberlog.finish == false %>
|
||||
<% if memberlog.finish == false and memberlog.created_at.to_date == Time.now.to_date %>
|
||||
<li><%= link_to t('edit'), '/admin/members/'+@member.to_param+'/memberlogs/'+memberlog.id+'/edit' %></li>
|
||||
<li><%= link_to t(:delete_), admin_memberlog_path(id: memberlog.id, member_profile_id: @member.id), method: :delete, remote: true, data: { confirm: t('sure?') } %></li>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue