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

62 lines
3.3 KiB
Plaintext

<% content_for :page_menu do %>
<ul class="list-sidebar">
<li class="item-sidebar"><a class="btn-sidebar" href="/cpanel/sites"><i class="fa fa-home" aria-hidden="true"></i><%= t("client_management.my_sites") %></a></li>
<li class="item-sidebar"><a class="btn-sidebar" href="<%= cpanel_myprofile_path %>"><i class="fa fa-address-card" aria-hidden="true"></i><%= t("client_management.profile") %></a></li>
<li class="item-sidebar active"><a class="btn-sidebar" href="<%= cpanel_myhistory_path %>"><i class="fa fa-history" aria-hidden="true"></i><%= t("client_management.history") %></a></li>
<li class="item-sidebar"><a class="btn-sidebar" href="#"><i class="fa fa-question-circle-o" aria-hidden="true"></i><%= t("client_management.help_and_faq") %></a></li>
<li class="item-sidebar"><a class="btn-sidebar" href="#"><i class="fa fa-user-circle-o" aria-hidden="true"></i><%= t("client_management.get_in_contact") %></a></li>
</ul>
<% end %>
<section class="cp-content col-md-10">
<h2 class="cp-page-title">
History
</h2>
<div class="cp-submenu-box">
<a href="#" class="submenu-item active">Requests</a>
<a href="#" class="submenu-item">Contracts</a>
<a href="#" class="submenu-item">Purchases</a>
<div class="cp-filter-box">
<select name="filter" id="filter" class="form-control">
<option value="1">Purchased</option>
<option value="2">Contract Confirmed</option>
<option value="3">Pending</option>
<option value="4">Requested</option>
</select>
</div>
</div>
<div class="cp-addsite-history">
<div class="box-request-history">
<h3 class="sub-title">Requests</h3>
<% @objects.each do |obj| %>
<div class="item-history">
<% case obj.type %>
<% when "newsite" %>
<span class="site-title-history"><a href="/cpanel/request/<%= obj.uid %>">New Site</a></span>
<% when "existing" %>
<span class="site-title-history"><a href="/cpanel/request/<%= obj.uid %>">New Request for <strong><%= obj.get_site.title %></strong></a></span>
<% when "addsites" %>
<span class="site-title-history"><a href="/cpanel/request/<%= obj.uid %>">Request for adding sites</a></span>
<% end %>
<div class="info-site">
<span class="url-site"><i class="fa fa-hashtag" aria-hidden="true"></i>Request ID: <%= obj.uid %></a></span>
<% if obj.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="status-detail requested">Requested</span>
<span class="action-site">
<% if !obj.completed %>
<a href="#" class="btn btn-warning">Cancel</a>
<% else %>
<% if (obj.type == "newsite" || obj.type == "existing") && !obj.request_contract.nil? %>
<a href="#" class="btn btn-info">Contract</a>
<% end %>
<% end %>
</span>
</div>
<% end %>
</div>
</div>
</section>