88 lines
2.8 KiB
Plaintext
88 lines
2.8 KiB
Plaintext
<div class="alert alert-error">
|
||
<% @dayoffs.each do |b| %>
|
||
<% if @now <= b.end_dayoff.to_date %>
|
||
<ul>
|
||
<%= b.member_profile.name %>
|
||
【<%= b.dayoff_description %>】
|
||
<%= b.start_dayoff.strftime('%Y-%m-%d') %>~
|
||
<%= b.end_dayoff.strftime('%Y-%m-%d') %>
|
||
</ul>
|
||
<% end %>
|
||
<% end %>
|
||
</div>
|
||
<table class="table main-list">
|
||
<thead>
|
||
<tr>
|
||
<th class="span1"><%= t("memberlog.staff") %></th>
|
||
<th class="span3"><%= t('memberlog.checkin') %></th>
|
||
<th class="span2"><%= t('memberlog.checkout') %></th>
|
||
<th class="span4"><%= t('memberlog.todo') %></th>
|
||
<th class="span3"><%= t('memberlog.excuse') %></th>
|
||
|
||
</tr>
|
||
</thead>
|
||
<tbody id="tbody_writing_journals" class="sort-holder">
|
||
<%= render 'memberlogs' %>
|
||
</tbody>
|
||
</table>
|
||
<div class="bottomnav clearfix">
|
||
<div class="action pull-right">
|
||
<!-- <div class="dropup upload-button">
|
||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
||
<i class="icon-upload-alt icon-white"></i>上傳
|
||
<span class="caret"></span>
|
||
</button>
|
||
<div class="dropdown-menu upload-box">
|
||
<form action="/admin/journal_papers/import_from_excel" method="post" enctype="multipart/form-data">
|
||
<%#= hidden_field_tag :authenticity_token, form_authenticity_token %>
|
||
<input type="file" name="import_file" >
|
||
<button class="btn btn-primary" type="submit"><%#= t(:submit) %></button>
|
||
<a class="" href="/admin/journal_papers/download_excel_format.xlsx">Download excel format</a>
|
||
</form>
|
||
</div>
|
||
</div> -->
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="pagination pagination-centered">
|
||
<%= content_tag :div, paginate(@memberlogs), class: "pagination pagination-centered" %>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Modal -->
|
||
<div id="logModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="logModalLabel" aria-hidden="true" style="width:800px ;left:40%">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<h3 id="logModalLabel"><%= t('module_name.memberlog') %></h3>
|
||
</div>
|
||
<div class="modal-body">
|
||
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||
</div>
|
||
</div>
|
||
<script type="text/javascript">
|
||
var logModal = $("#logModal");
|
||
$("a.modal-opener").on("click",function(){
|
||
var el = $(this);
|
||
$.ajax({
|
||
url : el.attr("href"),
|
||
dataType : "html",
|
||
type : "get"
|
||
}).done(function(html){
|
||
logModal.find(".modal-body").html(html);
|
||
logModal.modal("show");
|
||
})
|
||
return false;
|
||
})
|
||
</script>
|
||
<% if params[:error] == "1" %>
|
||
<script type="text/javascript">
|
||
alert("File cannot be imported. File has more than 500 entries. Please seperate the entries in different files.");
|
||
window.location.href = "<%= admin_memberlogs_url %>"
|
||
</script>
|
||
<% end %> |