2014-10-27 11:01:37 +00:00
|
|
|
|
|
|
|
<table class="table main-list">
|
|
|
|
<thead>
|
|
|
|
<tr class="sort-header">
|
|
|
|
<% @table_fields.each do |f| %>
|
|
|
|
<%= thead(f) %>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @registeredsites.each do |site| %>
|
|
|
|
<tr>
|
2014-12-02 12:21:20 +00:00
|
|
|
<td>
|
|
|
|
<a href="http://<%= site.site_domain %>/" target="_blank"><%= site.title.nil? ? site.site_domain : site.title %></a>
|
|
|
|
<div class="quick-edit">
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
<% if can_edit_or_delete?(site) %>
|
|
|
|
<li><a href="/admin/registered_sites/<%= site.id.to_s %>/edit"><%= t(:edit) %></a></li>
|
|
|
|
<% end %>
|
2017-02-06 07:54:26 +00:00
|
|
|
<li><a href="/admin/registered_sites/<%= site.id.to_s %>/progress"><%= t("registered_sites.progress") %></a></li>
|
2014-12-02 12:21:20 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
2014-10-27 11:01:37 +00:00
|
|
|
<td><%= site.admin_email %></td>
|
|
|
|
<td>
|
2017-04-12 10:29:23 +00:00
|
|
|
<% if !site.site_confirmed %>
|
2014-12-02 12:21:20 +00:00
|
|
|
<span class="badge badge-important"><%= t("registered_sites.site_inactive") %></span><br />
|
2014-10-27 11:01:37 +00:00
|
|
|
<%= t("registered_sites.email_not_confirmed") %>
|
|
|
|
<% elsif !site.access_granted %>
|
2014-12-02 12:21:20 +00:00
|
|
|
<span class="badge badge-important"><%= t("registered_sites.site_inactive") %></span><br />
|
2014-10-27 11:01:37 +00:00
|
|
|
<%= t("registered_sites.site_permission_revoked") %>
|
|
|
|
<% else %>
|
2014-12-02 12:21:20 +00:00
|
|
|
<span class="badge badge-success"><%= t("registered_sites.site_active") %></span><br />
|
2014-10-27 11:01:37 +00:00
|
|
|
<% end %>
|
|
|
|
</td>
|
2014-12-02 13:15:21 +00:00
|
|
|
<td><%= site.category.nil? ? "Category not assigned." : "<span class='label label-info'>#{site.category.title}</span>".html_safe %></td>
|
2014-12-02 12:21:20 +00:00
|
|
|
<td>
|
|
|
|
<% site.tags.each do |tag| %>
|
|
|
|
<span class="label">
|
|
|
|
<%= tag.name %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2014-10-27 11:01:37 +00:00
|
|
|
<td>
|
|
|
|
<% if !site.site_confirmed %>
|
|
|
|
<a class="btn btn-success" disabled="disabled"> Grant </a>
|
|
|
|
<% elsif !site.access_granted %>
|
2015-08-28 09:30:12 +00:00
|
|
|
<a href="/admin/registered_site/change_access/<%= site.site_token %>?status=grant<%= "&page=#{params[:page]}" if params[:page]%><%= "&keywords=#{params[:keywords]}" if params[:keywords] %>" class="btn btn-success" data-remote="true">Grant</a>
|
2014-10-27 11:01:37 +00:00
|
|
|
<% else %>
|
2015-08-28 09:30:12 +00:00
|
|
|
<a href="/admin/registered_site/change_access/<%= site.site_token %>?status=revoke<%= "&page=#{params[:page]}" if params[:page]%><%= "&keywords=#{params[:keywords]}" if params[:keywords] %>" class="btn btn-warning" data-remote="true">Revoke</a>
|
2014-10-27 11:01:37 +00:00
|
|
|
<% end %>
|
2015-08-28 09:33:12 +00:00
|
|
|
<% if current_user.is_admin? %>
|
|
|
|
<a href="/admin/registered_sites/<%= site.id.to_s %>?s=s<%= "&page=#{params[:page]}" if params[:page]%><%= "&keywords=#{params[:keywords]}" if params[:keywords] %>" class="btn btn-danger" data-remote="true" data-method="delete" data-confirm="Are you sure?"><i class="icons-trash"></i></a>
|
|
|
|
<% end %>
|
2014-10-27 11:01:37 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
2014-12-30 13:37:58 +00:00
|
|
|
</table>
|
|
|
|
|
|
|
|
<%=
|
|
|
|
content_tag :div, class: "bottomnav clearfix" do
|
|
|
|
content_tag :div, paginate(@registeredsites), class: "pagination pagination-centered"
|
|
|
|
end
|
|
|
|
%>
|