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

87 lines
2.9 KiB
Plaintext

<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "client_management/backend" %>
<% end %>
<div class="page-request page-client">
<div class="info-request">
<h3 class="sub-title">
Request Info
</h3>
<div class="line-content">
<span class="header-line">Request ID :</span>
<span class="content-line"><%= @site_request.uid %></span>
</div>
<div class="line-content">
<span class="header-line">Request type :</span>
<span class="content-line"><%= @site_request.get_request_type %></span>
</div>
</div>
<div class="info-user">
<h3 class="sub-title">User Details</h3>
<% if !@user.fullname.nil? %>
<div class="line-content">
<span class="header-line">Name :</span>
<span class="content-line"><%= @user.fullname %></span>
</div>
<% end %>
<div class="line-content">
<span class="header-line">Email :</span>
<span class="content-line"><%= @site_request.c_panel_user.email %></span>
</div>
<% if !@user.phone_number.nil? %>
<div class="line-content">
<span class="header-line">Phone Number :</span>
<span class="content-line"><%= @user.phone_number %></span>
</div>
<% end %>
<% if !@user.address.nil? %>
<div class="line-content">
<span class="header-line">Address :</span>
<span class="content-line"><%= @user.address %></span>
</div>
<% end %>
<% if !@user.registered_site_ids.empty? %>
<div class="line-content">
<span class="header-line">Registered Sites :</span>
<span class="content-line">
<% @user.registered_sites.each do |rs| %>
<span class="label label-default"><a style="color:#fff;" href="http://<%= rs.site_domain %>" target="_blank"><%= rs.title %></a></span>
<% end %>
</span>
</div>
<% end %>
</div>
<div class="info-site">
<h3 class="sub-title">Request Specifications</h3>
<% case @site_request.type %>
<% when "newsite" %>
<%= render :partial => "site_spec" %>
<% when "existing" %>
<%= render :partial => "site_spec" %>
<% when "addsites" %>
<%= render :partial => "add_site_spec" %>
<% end %>
</div>
<div class="info-button">
<div class="line-content">
<span class="header-line"></span>
<span class="content-line">
<% if @site_request.request_contract.nil? %>
<% case @site_request.type %>
<% when "existing","newsite" %>
<a class="btn btn-primary" href="<%= make_contract_admin_client_management_path(@site_request.id) %>">Make Contract</a>
<% end %>
<% else %>
<% case @site_request.type %>
<% when "existing","newsite" %>
<a class="btn btn-primary" href="<%= see_contract_admin_client_management_path(@site_request.request_contract.id) %>">View Contract</a>
<% end %>
<% end %>
</span>
</div>
</div>
</div>