orbit4-5/app/views/admin/role_statuses/_index.html.erb

34 lines
818 B
Plaintext

<table class="table main-list">
<thead>
<tr class="sort-header">
<th class="span3 active"><a href="#">Key<b class="icons-arrow-down-4"></b></a></th>
<% @site_in_use_locales.each do |locale| %>
<th><%= t(locale.to_s) %></th>
<% end %>
<th class="span1"></th>
</tr>
</thead>
<tbody>
<%= render :partial => 'role_status', :collection => @role_statuses %>
</tbody>
</table>
<script type="text/javascript">
$("document").ready(function(){
$(".role_status_checked").on("click",function(){
var el = $(this);
$.ajax({
url : el.data("path"),
type : "post"
})
})
$("input.toggle-check").each(function(){
var el = $(this),
parent = el.parent();
if(el.val() == "1"){
parent.removeClass("disable");
}
})
})
</script>