79 lines
2.9 KiB
Plaintext
79 lines
2.9 KiB
Plaintext
|
|
<table class="table main-list">
|
|
<thead>
|
|
<tr class="sort-header">
|
|
<th class="s0" style="width: 5%;">
|
|
<input type="checkbox">
|
|
</th>
|
|
<% @table_fields.zip(['20%','10%','15%','15%']).each do |f| %>
|
|
<th style="width:<%= f[1] %>;"><%= t(f[0]) %></th>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @registeredsites.each_with_index do |site,index1| %>
|
|
<% status = site.is_hidden == true ? 'is_hidden' : site.bundle_update_logs.first.status
|
|
if status == 'failed'
|
|
status = 'error'
|
|
elsif status == 'finish'
|
|
status = 'success'
|
|
end
|
|
%>
|
|
<tr id="<%= site.id %>" class="<%= status %>">
|
|
<td class="s0" style="">
|
|
<% if site.is_hidden != true %>
|
|
<input type="checkbox" class='checkbox_site'>
|
|
<% end %>
|
|
</td>
|
|
<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 %>
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<button onclick="bundle_update('<%= site.id %>')">
|
|
<%= t("registered_sites.update") %>
|
|
</button>
|
|
<button onclick="get_detail('<%= site.id %>')">
|
|
<%= t("registered_sites.get_detail") %>
|
|
</button>
|
|
<button onclick="check_site('<%= site.id %>')">
|
|
check site
|
|
</button>
|
|
</td>
|
|
<td class="bundle_update_logs">
|
|
<% if !site.site_confirmed %>
|
|
<span class="badge badge-important"><%= t("registered_sites.site_inactive") %></span><br />
|
|
<%= t("registered_sites.email_not_confirmed") %>
|
|
<% elsif !site.access_granted %>
|
|
<span class="badge badge-important"><%= t("registered_sites.site_inactive") %></span><br />
|
|
<%= t("registered_sites.site_permission_revoked") %>
|
|
<% else %>
|
|
<span class="badge badge-success"><%= t("registered_sites.site_active") %></span><br />
|
|
<% end %>
|
|
<% ['last_time','status'].each do |log_t| %>
|
|
<span>
|
|
<a class="<%= log_t %>" title='<%= t("registered_sites.#{log_t}") %>'><%= site.bundle_update_logs.first.send(log_t) rescue '' %></a>
|
|
</span>
|
|
<br>
|
|
<% end %>
|
|
</td>
|
|
<td><%= site.category.nil? ? "Category not assigned." : "<span class='label label-info'>#{site.category.title}</span>".html_safe %></td>
|
|
<td>
|
|
<span class="last_message"><%=site.bundle_update_logs.first.last_message.html_safe rescue '' %></span>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%=
|
|
content_tag :div, class: "bottomnav clearfix" do
|
|
content_tag :div, paginate(@registeredsites), class: "pagination pagination-centered"
|
|
end
|
|
%> |