48 lines
1.9 KiB
Plaintext
48 lines
1.9 KiB
Plaintext
<table class="table main-list">
|
|
<thead>
|
|
<tr class="sort-header">
|
|
<% @table_fields.each_with_index do |f,i| %>
|
|
<%= thead(f) %>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% if @registered_modules.blank? %>
|
|
<tr>
|
|
<td colspan="<%= @table_fields.length %>" style="text-align:center;">
|
|
No completed modules, ask developers to complete them fast.
|
|
</td>
|
|
</tr>
|
|
<% else %>
|
|
<% @registered_modules.each do |rm| %>
|
|
<tr>
|
|
<td><%= rm.name %></td>
|
|
<% if rm.category.nil? %>
|
|
<td>No category assigned.</td>
|
|
<% else %>
|
|
<td><%= rm.category.title %></td>
|
|
<% end %>
|
|
<% user = User.find(rm.create_user_id) %>
|
|
<td><%= user.name rescue user.user_name %></td>
|
|
<% if rm.approved %>
|
|
<td>
|
|
<a class="btn btn-small btn-info action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/install_site_list?id=<%= rm.id.to_s %>" for="installation">Install</a>
|
|
<a class="btn btn-small btn-danger action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/uninstall_site_list?id=<%= rm.id.to_s %>" for="uninstallation">Uninstall</a>
|
|
<a class="btn btn-small btn-warning action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/revokelist?id=<%= rm.id.to_s %>" for="revoke_access">Revoke Access</a>
|
|
<a class="btn btn-small btn-success action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/grantlist?id=<%= rm.id.to_s %>" for="grant_access">Grant Access</a>
|
|
</td>
|
|
<% else %>
|
|
<td>
|
|
<a class="btn btn-small btn-primary" href="/admin/admin_modules/approve?module_id=<%= rm.id.to_s %>" data-toggle="modal" data-target="#approveModal">Approve</button>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<%=
|
|
content_tag :div, class: "bottomnav clearfix" do
|
|
content_tag :div, paginate(@registered_modules), class: "pagination pagination-centered"
|
|
end
|
|
%> |