2014-12-30 11:52:45 +00:00
|
|
|
<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>
|
2015-01-08 11:00:32 +00:00
|
|
|
<td width="20%"><%= rm.name %></td>
|
2014-12-30 11:52:45 +00:00
|
|
|
<% if rm.category.nil? %>
|
2015-01-08 11:00:32 +00:00
|
|
|
<td width="20%">No category assigned.</td>
|
2014-12-30 11:52:45 +00:00
|
|
|
<% else %>
|
2015-01-08 11:00:32 +00:00
|
|
|
<td width="20%"><%= rm.category.title %></td>
|
2014-12-30 11:52:45 +00:00
|
|
|
<% end %>
|
|
|
|
<% user = User.find(rm.create_user_id) %>
|
2015-01-08 11:00:32 +00:00
|
|
|
<td width="20%"><%= user.name rescue user.user_name %></td>
|
2014-12-30 11:52:45 +00:00
|
|
|
<% 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>
|
2015-01-08 11:46:45 +00:00
|
|
|
<a class="btn btn-small edit-btn" href="/admin/admin_modules/approve?module_id=<%= rm.id.to_s %>">Edit</a>
|
2014-12-30 11:52:45 +00:00
|
|
|
</td>
|
|
|
|
<% else %>
|
|
|
|
<td>
|
2015-01-08 12:03:07 +00:00
|
|
|
<a class="btn btn-small btn-primary approve-btn" href="/admin/admin_modules/approve?module_id=<%= rm.id.to_s %>">Approve</button>
|
2014-12-30 11:52:45 +00:00
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
2014-12-30 12:14:41 +00:00
|
|
|
</table>
|
|
|
|
<%=
|
|
|
|
content_tag :div, class: "bottomnav clearfix" do
|
|
|
|
content_tag :div, paginate(@registered_modules), class: "pagination pagination-centered"
|
|
|
|
end
|
|
|
|
%>
|