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

29 lines
1.2 KiB
Plaintext
Raw Normal View History

<% @contracts.each do |contract| %>
2017-09-19 11:18:45 +00:00
<% site = contract.get_site if contract.site_request.type == "existing" %>
<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 %>
<% 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? %>
<a href="<%= see_contract_admin_client_management_path(contract.id) %>" class="btn btn-info">View</a>
<% end %>
</td>
</tr>
<% end %>