2014-05-17 18:57:03 +00:00
|
|
|
<h1 class='index'>
|
|
|
|
Metacode Sets
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
<div class='blackBox'>
|
|
|
|
<%= render :partial => 'admin/adminpanel' %>
|
|
|
|
<br />
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th class='metacodeSetsDescription'>Description</th>
|
|
|
|
<th>Metacodes</th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% @metacode_sets.each do |metacode_set| %>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<%= metacode_set.name %><br />
|
|
|
|
<%= link_to 'Edit', edit_metacode_set_path(metacode_set) %><br />
|
|
|
|
<%= link_to 'Delete', metacode_set, method: :delete, data: { confirm: 'Are you sure?' } %>
|
|
|
|
</td>
|
2014-06-11 00:22:35 +00:00
|
|
|
<td class='metacodeSetDesc'><%= metacode_set.desc %></td>
|
|
|
|
<td>
|
2014-05-17 18:57:03 +00:00
|
|
|
<% metacode_set.metacodes.each_with_index do |metacode, index| %>
|
2014-06-11 00:22:35 +00:00
|
|
|
<img class='metacodeSetImage' src='<%= metacode.icon %>' />
|
2014-05-17 18:57:03 +00:00
|
|
|
<% if (index+1)%4 == 0 %>
|
|
|
|
<div class='clearfloat'></div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<div class='clearfloat'></div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
2014-06-11 00:22:35 +00:00
|
|
|
$('.blackBox').height( (parseInt($('body').height()) - 40) ).mCustomScrollbar({
|
|
|
|
mouseWheelPixels: 200,
|
|
|
|
advanced: { updateOnContentResize: true }
|
|
|
|
});
|
2014-05-17 18:57:03 +00:00
|
|
|
});
|
|
|
|
</script>
|