client_management/app/views/admin/client_managements/_index.html.erb

32 lines
1.2 KiB
Plaintext

<% @site_requests.each do |request| %>
<% site = request.get_site if request.type == "existing" %>
<tr>
<td><%= request.uid %>
<td><%= request.c_panel_user.name %></td>
<td>
<% case request.type %>
<% when "upgrade" %>
<span class="label label-info">Site Upgrade</span>
<% when "newsite" %>
<span class="label label-success">New Site</span>
<% when "existing" %>
<span class="label label-warning">New Feature</span>
<% if !site.nil? %>
<div>Requested for : <a href="http://<%= site.site_domain %>" target="_blank"><%= site.title %></a></div>
<% else %>
Site Deleted
<% end %>
<% when "addsites" %>
<span class="label label-info">Sites Addition</span>
<% end %>
</td>
<td><%= request.created_at.strftime("%y-%m-%d %H:%M") %></td>
<td>
<a href="<%= admin_client_management_path(request.id) %>" class="btn btn-info">Details</a>
<% if request.request_contract != nil %>
<a href="<%= see_contract_admin_client_management_path(request.request_contract.id, :page => params[:page]) %>" class="btn btn-warning">Contract</a>
<% end %>
</td>
</tr>
<% end %>