client_management/app/views/client_managements/_contract_partial.html.erb

46 lines
1.9 KiB
Plaintext
Raw Normal View History

<% if !@objects.empty? %>
<% @objects.each do |object| %>
<% obj = object.request_contract %>
<div class="item-history">
<% case object.type %>
<% when "newsite" %>
<span class="site-title-history">
<a href="/cpanel/contract/<%= obj.uid %>">New Site</a>
<% if obj.confirmed %>
<span class="status-detail confirmed">Confirmed</span>
<% else %>
<span class="status-detail pending">Pending</span>
<% end %>
</span>
<% when "existing" %>
<span class="site-title-history">
<a href="/cpanel/contract/<%= obj.uid %>">New Request for <strong><%= obj.get_site.title %></strong></a>
<% if obj.confirmed %>
<span class="status-detail confirmed">Confirmed</span>
<% else %>
<span class="status-detail pending">Pending</span>
<% end %>
</span>
<% end %>
<div class="info-site">
<span class="url-site"><i class="fa fa-hashtag" aria-hidden="true"></i>Contract ID: <%= obj.uid %></a></span>
<% if object.type == "existing" %>
<span class="url-site"><i class="fa fa-laptop" aria-hidden="true"></i><a href="http://<%= obj.get_site.site_domain %>" target="_blank"><%= obj.get_site.site_domain %></a></span>
<% end %>
<span class="time-site"><i class="fa fa-clock-o" aria-hidden="true"></i>Time :&nbsp;&nbsp;<%= obj.created_at.strftime("%d %B %Y - %H:%M") %></span>
</div>
<span class="action-site">
<% if !obj.confirmed && !obj.signed_contract_file.url.nil? %>
<a href="/cpanel/contract/<%= obj.uid %>/confirm?page=<%= params[:page] %>" class="btn btn-success confrim-btn">Confirm</a>
<% end %>
</span>
</div>
<% end %>
<input type="hidden" class="total-pages" value="<%= @objects.total_pages %>">
<% else %>
<div id="error-msg-area" class="cp-message-box">
<div class="message-text">
Sorry, we found nothing.
</div>
</div>
<% end %>