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

88 lines
2.9 KiB
Plaintext
Raw Normal View History

2017-02-13 17:27:57 +00:00
<div class="alert alert-error">
<% @dayoffs.each do |b| %>
<% if @now <= b.end_dayoff.to_date %>
<ul>
<%= b.member_profile.name %>
【<%= b.dayoff_description %>】
2017-02-22 07:35:03 +00:00
<%= b.start_dayoff.strftime('%Y/%m/%d') %>~
<%= b.end_dayoff.strftime('%Y/%m/%d') %>
2017-02-13 17:27:57 +00:00
</ul>
<% end %>
<% end %>
</div>
<table class="table main-list">
<thead>
<tr>
2017-02-22 07:35:03 +00:00
<th class="span1"><%= t('memberlog.staff') %></th>
<th class="span3"><%= t('memberlog.date') %></th>
<th class="span2"><%= t('memberlog.checkin') %></th>
2017-02-13 17:27:57 +00:00
<th class="span2"><%= t('memberlog.checkout') %></th>
2017-02-22 07:35:03 +00:00
<th class="span2"><%= t('memberlog.todo') %></th>
<th class="span5"><%= t('memberlog.excuse') %></th>
2017-02-13 17:27:57 +00:00
</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 %>