modified something

This commit is contained in:
Keith 2017-02-21 18:21:35 +08:00
parent 46a5399489
commit 65d2a47c32
5 changed files with 10 additions and 5 deletions

View File

@ -2,9 +2,9 @@ class Dayoff < PersonalPluginIntro
include Mongoid::Document include Mongoid::Document
include Mongoid::Timestamps include Mongoid::Timestamps
# validates :dayoff_description, :presence => true
belongs_to :member_log belongs_to :member_log, :dependent => :destroy
field :dayoff_description, localize: true field :dayoff_description, localize: true

View File

@ -40,6 +40,7 @@
</div> </div>
</div> </div>
<% end %> <% end %>
<div class="control-group"></div>
<!-- Dayoff Description --> <!-- Dayoff Description -->
<% @site_in_use_locales.each do |locale| %> <% @site_in_use_locales.each do |locale| %>
@ -61,6 +62,7 @@
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= t('memberlog.end_dayoff') %></label> <label class="control-label muted"><%= t('memberlog.end_dayoff') %></label>
<div class="controls"> <div class="controls">

View File

@ -23,8 +23,8 @@
<%= b.start_dayoff.strftime('%Y-%m-%d') %>~ <%= b.start_dayoff.strftime('%Y-%m-%d') %>~
<%= b.end_dayoff.strftime('%Y-%m-%d') %> <%= b.end_dayoff.strftime('%Y-%m-%d') %>
<%= link_to content_tag(:i, nil, :class => 'icon-edit') +' '+ t('edit'),'/admin/members/'+@member.to_param+'/dayoffs/'+b.id+'/edit', :class => "btn btn-danger btn-mini"%> <%= link_to content_tag(:i, nil, :class => 'icon-edit') +' '+ t('edit'),'/admin/members/'+@member.to_param+'/dayoffs/'+b.id+'/edit', :class => "btn btn-danger btn-mini"%>
<%= link_to content_tag(:i, nil, :class => 'icons-trash') +' '+ t(:delete_), admin_dayoff_path(id: b.id, member_profile_id: @member.id), :class => "btn btn-danger btn-mini", method: :delete, remote: true, data: { confirm: t('sure?') } %> <!-- <%= link_to content_tag(:i, nil, :class => 'icons-trash') +' '+ t(:delete_), admin_dayoff_path(id: b.id, member_profile_id: @member.id), :class => "btn btn-danger btn-mini", method: :delete, remote: true, data: { confirm: t('sure?') } %>
-->
</ul> </ul>
<% end %> <% end %>
<% end %> <% end %>
@ -37,7 +37,7 @@
<!-- <th><input type="checkbox" /></th> --> <!-- <th><input type="checkbox" /></th> -->
<!-- <% end -%> --> <!-- <% end -%> -->
<th class="span2"><%= t('memberlog.checkin') %></th> <th class="span2"><%= t('memberlog.checkin') %></th>
<th class="span3"><%= t('memberlog.checkout') %></th> <th class="span2"><%= t('memberlog.checkout') %></th>
<th class="span3"><%= t('memberlog.excuse') %></th> <th class="span3"><%= t('memberlog.excuse') %></th>
</tr> </tr>
</thead> </thead>
@ -46,6 +46,7 @@
<tr id="<%= dom_id memberlog %>"> <tr id="<%= dom_id memberlog %>">
<td> <td>
<%= link_to memberlog.created_at.strftime('%Y-%m-%d (%a) %R'), admin_memberlog_path(memberlog.id), :data => {"target" => "#logModal", "toggle" => "modal"} %> <%= link_to memberlog.created_at.strftime('%Y-%m-%d (%a) %R'), admin_memberlog_path(memberlog.id), :data => {"target" => "#logModal", "toggle" => "modal"} %>
<div class="quick-edit"> <div class="quick-edit">
<ul class="nav nav-pills hide"> <ul class="nav nav-pills hide">
<% if memberlog.finish == false %> <% if memberlog.finish == false %>

View File

@ -12,3 +12,4 @@ en:
take_dayoff: Take_Dayoff take_dayoff: Take_Dayoff
start_dayoff: Start Dayoff start_dayoff: Start Dayoff
end_dayoff: End Dayoff end_dayoff: End Dayoff
status: Status

View File

@ -12,3 +12,4 @@ zh_tw:
take_dayoff: 請/排假 take_dayoff: 請/排假
start_dayoff: 休假開始日期 start_dayoff: 休假開始日期
end_dayoff: 休假結束日期 end_dayoff: 休假結束日期
status: 狀態