2017-12-26 13:07:35 +00:00
|
|
|
|
<span id="index_table">
|
|
|
|
|
<table class="table main-list">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr class="sort-header">
|
2018-01-19 09:08:40 +00:00
|
|
|
|
<th><%= t("recruitment.title") %></th>
|
2017-12-26 13:07:35 +00:00
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<% @industries.each do |industry| %>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<%= industry.industry_title_translations["en"] %> / <%= industry.industry_title_translations["zh_tw"] %>
|
|
|
|
|
<div class="quick-edit">
|
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
|
<li><a href="<%= editindustry_admin_recruitment_path(industry) %>" class="industryBtn"><%= t(:edit) %></a></li>
|
|
|
|
|
<li><a href="<%= deleteindustry_admin_recruitment_path(industry) %>" class="delete text-error" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</span>
|
|
|
|
|
<div class="bottomnav clearfix">
|
|
|
|
|
<div class="pull-right">
|
2018-01-19 09:08:40 +00:00
|
|
|
|
<a href="<%= addindustry_admin_recruitments_path %>" id="addIndustryBtn" class="btn btn-primary industryBtn"><%= t("recruitment.add_industry") %></a>
|
2017-12-26 13:07:35 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Modal -->
|
|
|
|
|
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
2018-01-19 09:08:40 +00:00
|
|
|
|
<h3 id="myModalLabel"><%= t("recruitment.industry_title") %></h3>
|
2017-12-26 13:07:35 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body"></div>
|
|
|
|
|
<div class="modal-footer">
|
2018-01-19 09:08:40 +00:00
|
|
|
|
<button class="btn" data-dismiss="modal" aria-hidden="true"><%= t("close") %></button>
|
|
|
|
|
<button class="btn btn-primary" id="save-btn"><%= t("save") %></button>
|
2017-12-26 13:07:35 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var modal = $("#myModal");
|
|
|
|
|
$(".industryBtn").on("click",function(){
|
|
|
|
|
var url = $(this).attr("href");
|
|
|
|
|
$.ajax({
|
|
|
|
|
url : url,
|
|
|
|
|
type : "get",
|
|
|
|
|
dataType : "html"
|
|
|
|
|
}).done(function(html){
|
|
|
|
|
modal.find(".modal-body").html(html);
|
|
|
|
|
modal.modal("show");
|
|
|
|
|
})
|
|
|
|
|
return false;
|
|
|
|
|
})
|
|
|
|
|
$("#save-btn").on("click",function(){
|
|
|
|
|
$("#industry_form").submit();
|
|
|
|
|
})
|
|
|
|
|
</script>
|