2017-03-10 06:53:25 +00:00
|
|
|
<% @contracts.each do |contract| %>
|
2017-09-19 11:18:45 +00:00
|
|
|
<% site = contract.get_site if contract.site_request.type == "existing" %>
|
2017-03-10 06:53:25 +00:00
|
|
|
<tr>
|
|
|
|
<td><%= contract.uid %>
|
|
|
|
<td><%= contract.contract_user.name %></td>
|
|
|
|
<td>
|
|
|
|
<% case contract.site_request.type %>
|
|
|
|
<% when "newsite" %>
|
|
|
|
<span class="label label-success">New Site</span>
|
|
|
|
<% when "existing" %>
|
|
|
|
<span class="label label-warning">New Feature</span>
|
2017-09-19 08:52:24 +00:00
|
|
|
<% if !site.nil? %>
|
|
|
|
<div>Requested for : <a href="http://<%= site.site_domain %>" target="_blank"><%= site.title %></a></div>
|
|
|
|
<% else %>
|
|
|
|
Site Deleted
|
|
|
|
<% end %>
|
2017-03-10 06:53:25 +00:00
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td><%= contract.created_at.strftime("%y-%m-%d %H:%M") %></td>
|
|
|
|
<td><%= (contract.confirmed ? "<span class='label label-success'>Yes</span>" : "<span class='label label-important'>No</span>").html_safe %></td>
|
|
|
|
<td>
|
2017-09-19 11:37:24 +00:00
|
|
|
<% if contract.site_request.type == "newsite" %>
|
|
|
|
<a href="<%= see_contract_admin_client_management_path(contract.id) %>" class="btn btn-info">View</a>
|
|
|
|
<% elsif contract.site_request.type == "existing" && !site.nil? %>
|
2017-09-19 11:21:07 +00:00
|
|
|
<a href="<%= see_contract_admin_client_management_path(contract.id) %>" class="btn btn-info">View</a>
|
|
|
|
<% end %>
|
2017-03-10 06:53:25 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|