backend modified and also frontend changes

This commit is contained in:
orbit 2017-03-21 17:39:48 +08:00
parent 5fd826683b
commit 89e9e7b50a
14 changed files with 1131 additions and 703 deletions

View File

@ -0,0 +1,208 @@
h1, h2, h3, h4, h5, h6, label, legend {
font-family: 'Chivo';
}
#main-wrap .wrap-inner {
padding-bottom: 100px;
}
.page-client {
background: #fff;
padding: 20px;
border: 1px solid #ddd;
margin: 30px;
max-width: 1000px;
}
.sub-title {
color: #337ab7;
font-size: 20px;
font-weight: 400;
margin: 50px 0 5px;
padding: 0 0 0 8px;
}
.page-client > div:first-child .sub-title {
margin: 20px 0 5px;
}
.line-content {
width: 100%;
margin: 0 0 15px;
font-size: 15px;
line-height: 2;
font-weight: 400;
border-top: 1px dashed #dadada;
padding: 15px 10px 0;
box-sizing: border-box;
}
.line-content:after {
content: ".";
display: block;
height: 0px;
clear: both;
visibility: hidden;
}
div .line-content:nth-child(1) {
border-top: 0px dashed #dadada;
}
.line-content.middle {
text-align: center;
}
.line-content .header-line {
color: #000;
font-weight: 500;
float: left;
width: 200px;
}
.line-content .header-line label {
color: #000;
font-weight: 500;
float: left;
width: 200px;
}
.line-content .content-line {
color: #888;
float: right;
width: calc(100% - 220px);
}
.line-content .content-line .label {
margin: 0 2px 0 0;
padding: 5px 10px;
font-size: 13px;
}
.line-content .content-line .label a {
font-size: 13px;
}
.line-content.qt .header-line {
width: calc(100% - 110px);
}
.line-content.qt .content-line {
width: 100px;
text-align: right;
}
.line-content.qt ol.custom-module {
background: rgba(0, 0, 0, 0.04);
padding: 10px 10px 10px 30px;
margin: 10px 0;
border-radius: 4px;
}
.line-content.qt ol.custom-module li {
margin: 5px 0;
}
.line-content.qt.hr {
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: 15px 10px;
}
.line-content.qt.hr .header-line {
font-size: 18px;
}
.line-content.qt.hr .content-line {
color: #333;
font-size: 18px;
}
.line-content input[type="file"] {
height: 30px;
line-height: 8px;
float: left;
font-size: 13px;
margin: 6px 0 0;
}
.line-content.file .btn {
float: right;
width: 100px;
margin: 0;
}
.line-content.button .btn {
margin: 0 5px 10px;
box-sizing: border-box;
width: auto;
min-width: 150px;
}
.line-content .selected-module {
margin: 0;
padding: 0;
list-style: none;
}
.line-content .selected-module:after {
content: ".";
display: block;
height: 0px;
clear: both;
visibility: hidden;
}
.line-content .selected-module li {
margin: 0 10px 10px 0;
float: left;
}
.line-content .selected-module li span {
position: relative;
padding: 5px 10px 5px 20px !important;
}
.line-content .selected-module li span:before {
content: "";
display: block;
width: 6px;
height: 6px;
position: absolute;
left: 7px;
top: 9px;
background: #fff;
border-radius: 50%;
}
.btn, input.btn {
width: 150px;
margin: 20px 0;
}
.btn.flat {
margin: 0;
}
.site_added_item {
margin: 0 0 10px;
position: relative;
padding: 0 0 0 15px;
}
.site_added_item:before {
content: "";
width: 5px;
height: 5px;
border-radius: 50%;
background: #888;
position: absolute;
left: 0;
top: 13px;
}
.site_added_item .label {
background: #d9534f;
margin: 0 5px !important;
}
.site_added_item.success .label {
background: #5cb85c;
margin: 0 5px;
}
@media (max-width: 480px) {
.line-content .header-line {
display: block;
float: none;
width: 100%;
}
.line-content .content-line {
display: block;
float: none;
width: 100%;
}
.line-content.qt .header-line {
float: left;
width: calc(100% - 110px);
}
.line-content.qt .content-line {
float: right;
width: 100px;
text-align: right;
}
.line-content.file .btn {
float: left;
}
.line-content.button .btn {
margin: 0 0 10px;
width: 100%;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -134,128 +134,150 @@
float: none;
width: 100%;
}
/* line 155, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step0 {
width: 100%;
}
/* line 157, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step0 a {
padding: 30px;
}
/* line 159, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step0 a .fa {
top: 30px;
}
/* line 162, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step0 a .fa-sp {
font-size: 180px;
top: -45px;
right: -10px;
}
/* line 167, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step0 a span {
font-size: 20px;
}
/* line 176, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .line-add.box-buttons .btn {
margin: 0 10px;
}
/* line 167, ../sass/rwd.scss */
/* line 184, ../sass/rwd.scss */
.cp-main .cp-content .cp-function-box .cp-search-box {
float: none;
width: 100%;
margin: 0 0 20px;
}
/* line 174, ../sass/rwd.scss */
/* line 191, ../sass/rwd.scss */
.cp-main .cp-content .cp-profile-setting .line-profile {
width: 100%;
}
/* line 176, ../sass/rwd.scss */
/* line 193, ../sass/rwd.scss */
.cp-main .cp-content .cp-profile-setting .line-profile label {
float: none;
width: 100%;
}
/* line 180, ../sass/rwd.scss */
/* line 197, ../sass/rwd.scss */
.cp-main .cp-content .cp-profile-setting .line-profile input {
float: none;
width: 100%;
}
/* line 184, ../sass/rwd.scss */
/* line 201, ../sass/rwd.scss */
.cp-main .cp-content .cp-profile-setting .line-profile textarea {
float: none;
width: 100%;
}
/* line 188, ../sass/rwd.scss */
/* line 205, ../sass/rwd.scss */
.cp-main .cp-content .cp-profile-setting .line-profile .pull-r {
float: none;
width: 100%;
}
}
@media only screen and (max-width: 480px) {
/* line 201, ../sass/rwd.scss */
/* line 218, ../sass/rwd.scss */
.cp-banner .box-banner .item-ba .text-ba {
font-size: 15px;
width: 80%;
text-align: center;
}
/* line 211, ../sass/rwd.scss */
/* line 228, ../sass/rwd.scss */
.cp-main .cp-login-page .cp-login-box {
width: 100%;
}
/* line 213, ../sass/rwd.scss */
/* line 230, ../sass/rwd.scss */
.cp-main .cp-login-page .cp-login-box .line-login {
width: 100%;
max-width: 100vw;
}
/* line 223, ../sass/rwd.scss */
/* line 240, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .form-title {
margin: 0 20px 20px;
}
/* line 226, ../sass/rwd.scss */
/* line 243, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .box-check-host {
float: none;
width: 100%;
}
/* line 231, ../sass/rwd.scss */
/* line 248, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .line-add label {
display: block;
float: none;
width: 100%;
}
/* line 236, ../sass/rwd.scss */
/* line 253, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .line-add .form-control {
float: none;
width: 100%;
}
/* line 240, ../sass/rwd.scss */
/* line 257, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .line-add .title-custom-check {
width: calc(100% - 30px);
}
/* line 244, ../sass/rwd.scss */
/* line 261, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .line-add.box-buttons .btn {
margin: 0 5px;
width: calc(50% - 20px);
font-size: 12px;
}
/* line 252, ../sass/rwd.scss */
/* line 269, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .default-mod-list .item-mod {
width: 100%;
margin: 0 0 10px;
}
/* line 257, ../sass/rwd.scss */
/* line 274, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .box-drop {
display: block;
}
/* line 259, ../sass/rwd.scss */
/* line 276, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .box-drop .additional-mod-list {
width: 100%;
margin: 0 0 20px;
}
/* line 263, ../sass/rwd.scss */
/* line 280, ../sass/rwd.scss */
.cp-main .cp-content .cp-addsite-step1 .box-addsite-forms .box-form .box-drop .selected-mod-list {
width: 100%;
margin: 0;
}
/* line 272, ../sass/rwd.scss */
/* line 289, ../sass/rwd.scss */
.cp-main .cp-content .list-ticket .item-ticket {
padding: 30px 0 0;
}
/* line 274, ../sass/rwd.scss */
/* line 291, ../sass/rwd.scss */
.cp-main .cp-content .list-ticket .item-ticket .subject-ticket {
padding: 10px;
}
/* line 278, ../sass/rwd.scss */
/* line 295, ../sass/rwd.scss */
.cp-main .cp-content .list-ticket .item-ticket .info-ticket span {
display: block;
}
/* line 285, ../sass/rwd.scss */
/* line 302, ../sass/rwd.scss */
.cp-main .cp-content .list-servers .item-servers {
padding: 30px 0 0;
}
/* line 287, ../sass/rwd.scss */
/* line 304, ../sass/rwd.scss */
.cp-main .cp-content .list-servers .item-servers .name-server {
padding: 10px;
}
/* line 293, ../sass/rwd.scss */
/* line 310, ../sass/rwd.scss */
.cp-main .cp-content .cp-function-box .cp-search-box {
float: none;
width: 100%;

View File

@ -1,11 +1,11 @@
<tr>
<th>Sites to add :</th>
<td>
<div class="line-content">
<span class="header-line">Sites to add :</span>
<span class="content-line">
<%= form_for @site_request, :url => {:action => "add_sites"} do |f| %>
<% x = 0 %>
<% @site_request.sites_to_add.each_with_index do |sid,i| %>
<% site = RegisteredSite.where(:site_domain => sid).first rescue nil %>
<div>
<div class="site_added_item">
<% if !site.nil? %>
<% x = 1 %>
<input type="checkbox" name="site_request[sites_added][]" value="<%= site.id %>" id="check_<%= i.to_s %>" >
@ -18,7 +18,7 @@
<% end %>
<% @site_request.sites_added.each_with_index do |sid,i| %>
<% site = RegisteredSite.find(sid) rescue nil %>
<div>
<div class="site_added_item success">
<span><%= site.title %><span class="label label-default">Site Already Added</span></span>
<a href="http://<%= site.site_domain %>" target="_blank"><i class="icons-export"></i></a>
</div>
@ -30,5 +30,5 @@
<a href="<%= complete_request_admin_client_management_path(@site_request.id) %>" class="btn btn-info">Complete Request</a>
<% end %>
<% end %>
</td>
</tr>
</span>
</div>

View File

@ -21,4 +21,4 @@
<% end %>
</td>
</tr>
<% end %>
<% end %>

View File

@ -1,69 +1,70 @@
<% if @site_request.type == "existing" %>
<tr>
<th>Site Title : </th>
<td><%= @site_request.get_site.title %></td>
</tr>
<tr>
<th>Site Domain : </th>
<td><a href="<%= @site_request.get_site.site_domain %>" target="_blank"><%= @site_request.get_site.site_domain %></td>
</tr>
<div class="line-content">
<span class="header-line">Site Title : </span>
<span class="content-line"><%= @site_request.get_site.title %></span>
</div>
<div class="line-content">
<span class="header-line">Site Domain : </span>
<span class="content-line"><a href="<%= @site_request.get_site.site_domain %>" target="_blank"><%= @site_request.get_site.site_domain %></a>
</span>
</div>
<% else %>
<% if @site_request.host_with_rulingdigital %>
<tr>
<th>Host with RulingDigital : </th>
<td><span class="label label-success">Yes</span></td>
</tr>
<div class="line-content">
<span class="header-line">Host with RulingDigital : </span>
<span class="content-line"><span class="label label-success">Yes</span></span>
</div>
<% else %>
<tr>
<th>Host with RulingDigital : </th>
<td><span class="label label-danger">No</span></td>
</tr>
<tr>
<th>Server Details :</th>
<td><%= @site_request.server_details %></td>
</tr>
<div class="line-content">
<span class="header-line">Host with RulingDigital : </span>
<span class="content-line"><span class="label label-danger">No</span></span>
</div>
<div class="line-content">
<span class="header-line">Server Details :</span>
<span class="content-line"><%= @site_request.server_details %></span>
</div>
<% end %>
<% end %>
<% if !@site_request.optional_modules.blank? %>
<tr>
<th>Optional Module :</th>
<td>
<% rsm = RegisteredModule.find(@site_request.optional_modules) %>
<% rsm.each do |mod| %>
<span class="label label-info"><%= mod.name %></span>
<% end %>
</td>
</tr>
<div class="line-content">
<span class="header-line">Optional Module :</span>
<span class="content-line">
<% rsm = RegisteredModule.find(@site_request.optional_modules) %>
<% rsm.each do |mod| %>
<span class="label label-info"><%= mod.name %></span>
<% end %>
</span>
</div>
<% end %>
<% if @site_request.custom_module %>
<tr>
<th>Custom Module Required : </th>
<td><span class="label label-success">Yes</span></td>
</tr>
<tr>
<th>Custom Module Requirements :</th>
<td><%= @site_request.custom_module_details.html_safe %></td>
</tr>
<div class="line-content">
<span class="header-line">Custom Module Required : </span>
<span class="content-line"><span class="label label-success">Yes</span></span>
</div>
<div class="line-content">
<span class="header-line">Custom Module Requirements :</span>
<span class="content-line"><%= @site_request.custom_module_details.html_safe %></span>
</div>
<% end %>
<% if !@site_request.template_number.empty? %>
<tr>
<th>Template Number :</th>
<td><a href="http://www.rulingstyle.net/template/<%= @site_request.template_number %>/" target="_blank"><%= @site_request.template_number %></a></td>
</tr>
<div class="line-content">
<span class="header-line">Template Number :</span>
<span class="content-line"><a href="http://www.rulingstyle.net/template/<%= @site_request.template_number %>/" target="_blank"><%= @site_request.template_number %></a></span>
</div>
<% end %>
<% if @site_request.custom_template %>
<tr>
<th>Custom Template Required : </th>
<td><span class="label label-success">Yes</span></td>
</tr>
<tr>
<th>Custom Template Requirements :</th>
<td><%= @site_request.custom_template_details.html_safe %></td>
</tr>
<div class="line-content">
<span class="header-line">Custom Template Required : </span>
<span class="content-line"><span class="label label-success">Yes</span></span>
</div>
<div class="line-content">
<span class="header-line">Custom Template Requirements :</span>
<span class="content-line"><%= @site_request.custom_template_details.html_safe %></span>
</div>
<% end %>
<% if @site_request.rwd %>
<tr>
<th>RWD : </th>
<td><span class="label label-success">Yes</span></td>
</tr>
<div class="line-content">
<span class="header-line">RWD : </span>
<span class="content-line"><span class="label label-success">Yes</span></span>
</div>
<% end %>

View File

@ -1,111 +1,122 @@
<% if @site_request.type == "existing" %>
<div class="control-group">
<label class="control-label">Site Title :</label>
<div class="controls">
<%= @site_request.get_site.title %>
</div>
</div>
<div class="control-group">
<label class="control-label">Site Domain :</label>
<div class="controls">
<a href="<%= @site_request.get_site.site_domain %>" target="_blank"><%= @site_request.get_site.site_domain %></a>
</div>
</div>
<div class="line-content">
<span class="header-line">Site Title :</span>
<span class="content-line"><%= @site_request.get_site.title %></span>
</div>
<div class="line-content">
<span class="header-line">Site Domain :</span>
<span class="content-line">
<a href="<%= @site_request.get_site.site_domain %>" target="_blank"><%= @site_request.get_site.site_domain %></a>
</span>
</div>
<% else %>
<div class="control-group">
<%= f.label :new_site_cost, "New Site Cost:", :class => "control-label" %>
<div class="controls">
<%= f.number_field :new_site_cost, :min => "0" %>
</div>
<div class="line-content">
<span class="header-line"><%= f.label :new_site_cost, "New Site Cost :"%></span>
<span class="content-line"><%= f.number_field :new_site_cost, :min => "0" %></span>
</div>
<% if @site_request.host_with_rulingdigital %>
<div class="control-group">
<%= f.label :hosting_with_rulingdigital_cost, "Host with RulingDigital:", :class => "control-label" %>
<div class="controls">
<%= f.number_field :hosting_with_rulingdigital_cost, :min => "0" %>
</div>
</div>
<div class="line-content">
<span class="header-line"><%= f.label :hosting_with_rulingdigital_cost, "Host with RulingDigital:" %></span>
<span class="content-line"><%= f.number_field :hosting_with_rulingdigital_cost, :min => "0" %></span>
</div>
<% end %>
<% end %>
<div class="control-group">
<%= f.label :service_cost, "Maintainance Cost:", :class => "control-label" %>
<div class="controls">
<%= f.number_field :service_cost, :min => "0" %>
</div>
<div class="line-content">
<span class="header-line"><%= f.label :service_cost, "Maintainance Cost:" %></span>
<span class="content-line"><%= f.number_field :service_cost, :min => "0" %></span>
</div>
<% if !@site_request.optional_modules.blank? %>
<div class="control-group">
<%= f.label :option_module_cost, "Optional Modules Cost:", :class => "control-label" %>
<div class="line-content">
<span class="header-line"><%= f.label :option_module_cost, "Optional Modules Cost:" %></span>
<% rsm = RegisteredModule.find(@site_request.optional_modules) %>
<div class="controls">
<ul>
<% rsm.each do |mod| %>
<span class="content-line">
<ul class="selected-module">
<% rsm.each do |mod| %>
<li><span class="label label-info"><%= mod.name %></span></li>
<% end %>
<% end %>
</ul>
<%= f.number_field :option_module_cost, :min => "0" %>
</div>
</span>
</div>
<% end %>
<% if @site_request.custom_module %>
<div class="control-group">
<%= f.label :customized_module_cost, "Optional Module Cost:", :class => "control-label" %>
<div class="controls">
<div class="line-content">
<span class="header-line">
<%= f.label :customized_module_cost, "Optional Module Cost:" %>
</span>
<span class="content-line">
<%= f.number_field :customized_module_cost, :min => "0" %>
</div>
</span>
</div>
<% end %>
<% if !@site_request.template_number.empty? %>
<div class="control-group">
<%= f.label :template_cost, "Template Cost:", :class => "control-label" %>
<div class="controls">
<div class="line-content">
<span class="header-line">
<%= f.label :template_cost, "Template Cost:" %>
</span>
<span class="content-line">
<%= f.number_field :template_cost, :min => "0" %>
</div>
</span>
</div>
<% end %>
<% if @site_request.custom_template %>
<div class="control-group">
<%= f.label :customized_template_cost, "Customized Template Cost:", :class => "control-label" %>
<div class="controls">
<div class="line-content">
<span class="header-line">
<%= f.label :customized_template_cost, "Customized Template Cost:" %>
</span>
<span class="content-line">
<%= f.number_field :customized_template_cost, :min => "0" %>
</div>
</span>
</div>
<% end %>
<% if @site_request.rwd %>
<div class="control-group">
<%= f.label :rwd_cost, "RWD Cost:", :class => "control-label" %>
<div class="controls">
<div class="line-content">
<span class="header-line">
<%= f.label :rwd_cost, "RWD Cost:" %>
</span>
<span class="content-line">
<%= f.number_field :rwd_cost, :min => "0" %>
</div>
</span>
</div>
<% end %>
<% if !@contract.contract_file.url.nil? %>
<a href="<%= @contract.contract_file.url %>" target="_blank">Download Contract</a>
<% end %>
<div class="control-group">
<%= f.label :contract_file, "Contract File:", :class => "control-label" %>
<div class="controls">
<%= f.file_field :contract_file %>
<div class="line-content">
<span class="header-line">Contract File :</span>
<span class="content-line"><a href="<%= @contract.contract_file.url %>" target="_blank" class="btn btn-primary flat">Download Contract</a></span>
</div>
<% end %>
<div class="line-content">
<span class="header-line"><%= f.label :contract_file, "Upload Contract File :" %></span>
<span class="content-line"><%= f.file_field :contract_file %></span>
</div>
<div>
<h3>Total Amount : <span id="total-amount"><%= @contract.new_record? ? 0 : @contract.total_amount %></span> NTD.</h3>
<div class="line-content">
<span class="header-line">Total Amount :</span>
<span class="content-line"><%= @contract.new_record? ? 0 : @contract.total_amount %> NTD.</span>
</div>
<% if @contract.new_record? %>
<%= f.hidden_field :site_request, :value => @site_request.id.to_s %>
<% end %>
<%= f.submit "Submit", :class => "btn btn-primary" %>
<a href="<%= see_contract_admin_client_management_path(@contract.id) %>" class="btn">Back</a>
<script type="text/javascript">
var costFields = $("form.contract-form input[type=number]"),
totalAmountDom = $("#total-amount");
costFields.on("change",function(){
var totalAmount = 0;
$.each(costFields,function(){
var amt = ($(this).val() == "" ? 0 : $(this).val());
totalAmount += parseInt(amt);
})
totalAmountDom.text(totalAmount);
})
</script>
<div class="line-content button">
<span class="header-line"></span>
<span class="content-line">
<%= f.submit "Submit", :class => "btn btn-primary" %>
<a href="<%= see_contract_admin_client_management_path(@contract.id) %>" class="btn">Back</a>
<script type="text/javascript">
var costFields = $("form.contract-form input[type=number]"),
totalAmountDom = $("#total-amount");
costFields.on("change",function(){
var totalAmount = 0;
$.each(costFields,function(){
var amt = ($(this).val() == "" ? 0 : $(this).val());
totalAmount += parseInt(amt);
})
totalAmountDom.text(totalAmount);
})
</script>
</span>
</div>

View File

@ -1,48 +1,58 @@
<style type="text/css">
table th{
text-align: right;
padding-right: 15px;
}
</style>
<h2>Site Id : <%= @site_request.uid %></h2>
<h2>Site type : <%= @site_request.get_request_type %></h2>
<table width="100%">
<caption><h3>User Details</h3></caption>
<% if !@user.fullname.nil? %>
<tr>
<th>Name :</th>
<td><%= @user.fullname %></td>
</tr>
<% end %>
<tr>
<th>Email :</th>
<td><%= @site_request.c_panel_user.email %></td>
</tr>
<% if !@user.phone_number.nil? %>
<tr>
<th>Phone Number :</th>
<td><%= @user.phone_number %></td>
</tr>
<% end %>
<% if !@user.address.nil? %>
<tr>
<th>Address :</th>
<td><%= @user.address %></td>
</tr>
<% end %>
<% if !@user.registered_site_ids.empty? %>
<tr>
<th>Registered Sites :</th>
<td>
<% @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 %>
</td>
</tr>
<% end %>
</table>
<hr>
<%= form_for @contract, :url => {:action => :update_contract}, :html => {:class => "form-horizontal contract-form"} do |f| %>
<h3>Request Specifications</h3>
<%= render :partial => "site_spec_form", :locals => {:f => f} %>
<% end %>
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "client_management/backend" %>
<% end %>
<div class="page-contract page-client">
<div class="info-contract">
<h3 class="sub-title">Contract Info</h3>
<div class="line-content">
<span class="header-line">Id :</span>
<span class="content-line"><%= @site_request.uid %></span>
</div>
<div class="line-content">
<span class="header-line">Site type :</span>
<span class="content-line"><%= @site_request.get_request_type %></span>
</div>
</div>
<div class="info-contract-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-contract-detail">
<%= form_for @contract, :url => {:action => :update_contract}, :html => {:class => "form-horizontal contract-form"} do |f| %>
<h3 class="sub-title">Request Specifications</h3>
<%= render :partial => "site_spec_form", :locals => {:f => f} %>
<% end %>
</div>
</div>

View File

@ -1,3 +1,5 @@
<table class="table main-list">
<thead>
<tr class="sort-header">

View File

@ -1,48 +1,60 @@
<style type="text/css">
table th{
text-align: right;
padding-right: 15px;
}
</style>
<h2>Site Id : <%= @site_request.uid %></h2>
<h2>Site type : <%= @site_request.get_request_type %></h2>
<table width="100%">
<caption><h3>User Details</h3></caption>
<% if !@user.fullname.nil? %>
<tr>
<th>Name :</th>
<td><%= @user.fullname %></td>
</tr>
<% end %>
<tr>
<th>Email :</th>
<td><%= @site_request.c_panel_user.email %></td>
</tr>
<% if !@user.phone_number.nil? %>
<tr>
<th>Phone Number :</th>
<td><%= @user.phone_number %></td>
</tr>
<% end %>
<% if !@user.address.nil? %>
<tr>
<th>Address :</th>
<td><%= @user.address %></td>
</tr>
<% end %>
<% if !@user.registered_site_ids.empty? %>
<tr>
<th>Registered Sites :</th>
<td>
<% @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 %>
</td>
</tr>
<% end %>
</table>
<hr>
<%= form_for @contract, :url => {:action => :create_contract}, :html => {:class => "form-horizontal contract-form"} do |f| %>
<h3>Request Specifications</h3>
<%= render :partial => "site_spec_form", :locals => {:f => f} %>
<% end %>
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "client_management/backend" %>
<% end %>
<div class="page-client page-contract">
<div class="info-contract">
<h3 class="sub-title">Site Info</h3>
<div class="line-content">
<span class="header-line">Site Id :</span>
<span class="content-line"><%= @site_request.uid %></span>
</div>
<div class="line-content">
<span class="header-line">Site type :</span>
<span class="content-line"><%= @site_request.get_request_type %></span>
</div>
</div>
<div class="info-detail">
<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-spec">
<%= form_for @contract, :url => {:action => :create_contract}, :html => {:class => "form-horizontal contract-form"} do |f| %>
<h3 class="sub-title">Request Specifications</h3>
<%= render :partial => "site_spec_form", :locals => {:f => f} %>
<% end %>
</div>
</div>

View File

@ -1,109 +1,125 @@
<style type="text/css">
table th{
text-align: right;
padding-right: 15px;
}
</style>
<h2>Contract Id : <%= @contract.uid %></h2>
<h4> <%= @contract.created_at.strftime("%Y-%m-%d") %> </h4>
<h4>Confirmed : <%= (@contract.is_confirmed? ? "<span class='label label-success'>Yes</span>" : "<span class='label label-important'>No</span>").html_safe %></h4>
<table>
<caption>Request</caption>
<tr>
<th>Type :</th>
<td><%= @site_request.get_request_type %></td>
</tr>
</table>
<% if @site_request.type == "existing" %>
<table >
<caption>Site Details</caption>
<tr>
<th>Site ID :</th>
<td><%= @site_request.get_site.uid %></td>
</tr>
<tr>
<th>Site Name : </th>
<td><%= @site_request.get_site.title %></td>
</tr>
<tr>
<th>Site Domain : </th>
<td><%= @site_request.get_site.site_domain %></td>
</tr>
</table>
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "client_management/backend" %>
<% end %>
<table >
<caption>Contract Files</caption>
<% if !@contract.contract_file.url.nil? %>
<tr>
<th>Contract :</th>
<td><a href="<%= @contract.contract_file.url %>" target="_blank">Download</a></td>
</tr>
<% end %>
<% if !@contract.signed_contract_file.url.nil? %>
<tr>
<th>Signed Contract :</th>
<td><a href="<%= @contract.signed_contract_file.url %>" target="_blank">Download</a></td>
</tr>
<% end %>
</table>
<table width="50%">
<caption>Quotaion</caption>
<tr>
<td><b>Item</b></td>
<td><b>Cost in NTD.</b></td>
</tr>
<% total_amount = 0 %>
<% ["new_site_cost","hosting_with_rulingdigital_cost","service_cost","option_module_cost","customized_module_cost","template_cost","customized_template_cost","rwd_cost"].each do |attrib| %>
<% amount = @contract.send(attrib.to_sym) %>
<% if amount > 0 %>
<tr>
<td>
<%= t("client_management.#{attrib}") %>
<% if attrib == "option_module_cost" %>
<ol>
<% rsm = RegisteredModule.find(@site_request.optional_modules) %>
<% rsm.each do |rs|%>
<li><%= rs.name %></li>
<% end %>
</ol>
<% end %>
</td>
<td><%= amount %></td>
</tr>
<% total_amount = total_amount + amount %>
<% end %>
<% end %>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td><strong>Total :</strong></td>
<td><strong><%= total_amount.to_s %> NTD.</strong></td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
</table>
<%= form_for @contract, :url => {:action => "update_contract"}, :html => {:class => "form-horizontal"} do |f| %>
<div class="control-group">
<%= f.label :signed_contract_file, "Signed Contract File:", :class => "control-label" %>
<div class="controls">
<%= f.file_field :signed_contract_file %>
<div class="page-contract page-client">
<div class="info-contract">
<h3 class="sub-title">Contract Info</h3>
<div class="line-content">
<span class="header-line">Contract Id :</span>
<span class="content-line"><%= @contract.uid %></span>
</div>
<div class="line-content">
<span class="header-line">Contract Date :</span>
<span class="content-line"><%= @contract.created_at.strftime("%Y-%m-%d") %></span>
</div>
<div class="line-content">
<span class="header-line">Confirmed :</span>
<span class="content-line">
<%= (@contract.is_confirmed? ? "<span class='label label-success'>Yes</span>" : "<span class='label label-important'>No</span>").html_safe %>
</span>
</div>
</div>
<div class="info-contract-request">
<h3 class="sub-title">Request</h3>
<div class="line-content">
<span class="header-line">Type :</span>
<span class="content-line"><%= @site_request.get_request_type %></span>
</div>
</div>
<%= f.submit "Upload", :class => "btn-small btn-primary" %>
<% end %>
<% if !@contract.is_confirmed? %>
<a href="<%= edit_contract_admin_client_management_path(@contract.id) %>" class="btn btn-warning">Edit Contract</a>
<a href="<%= confirm_contract_admin_client_management_path(@contract.id, :confirm => "true") %>" class="btn btn-success">Confirm Contract</a>
<% else %>
<a href="<%= make_purchase_admin_client_management_path(@contract.id) %>" class="btn btn-warning">Make Purchase</a>
<a href="<%= confirm_contract_admin_client_management_path(@contract.id, :confirm => "false") %>" class="btn btn-danger">Un-Confirm Contract</a>
<% end %>
<a href="#" class="btn btn-info">Export Contract</a>
<a href="<%= admin_client_managements_completed_requests_path(:page => params[:page]) %>" class="btn">Back</a>
<% if @site_request.type == "existing" %>
<div class="info-contract-detail">
<h3 class="sub-title">Site Details</h3>
<div class="line-content">
<span class="header-line">Site ID :</span>
<span class="content-line"><%= @site_request.get_site.uid %></span>
</div>
<div class="line-content">
<span class="header-line">Site Name : </span>
<span class="content-line"><%= @site_request.get_site.title %></span>
</div>
<div class="line-content">
<span class="header-line">Site Domain : </span>
<span class="content-line"><%= @site_request.get_site.site_domain %></span>
</div>
</div>
<% end %>
<div class="info-contract-file">
<h3 class="sub-title">Contract Files</h3>
<% if !@contract.contract_file.url.nil? %>
<div class="line-content">
<span class="header-line">Contract :</span>
<span class="content-line"><a href="<%= @contract.contract_file.url %>" target="_blank">Download</a></span>
</div>
<% end %>
<% if !@contract.signed_contract_file.url.nil? %>
<div class="line-content">
<span class="header-line">Signed Contract :</span>
<span class="content-line"><a href="<%= @contract.signed_contract_file.url %>" target="_blank">Download</a></span>
</div>
<% end %>
</div>
<div class="info-contract-quatation">
<h3 class="sub-title">Quotaion</h3>
<div class="line-content qt">
<span class="header-line">Item</span>
<span class="content-line">Cost in NTD.</span>
</div>
<% total_amount = 0 %>
<% ["new_site_cost","hosting_with_rulingdigital_cost","service_cost","option_module_cost","customized_module_cost","template_cost","customized_template_cost","rwd_cost"].each do |attrib| %>
<% amount = @contract.send(attrib.to_sym) %>
<% if amount > 0 %>
<div class="line-content qt">
<span class="header-line">
<%= t("client_management.#{attrib}") %>
<% if attrib == "option_module_cost" %>
<ol class="custom-module">
<% rsm = RegisteredModule.find(@site_request.optional_modules) %>
<% rsm.each do |rs|%>
<li><%= rs.name %></li>
<% end %>
</ol>
<% end %>
</span>
<span class="content-line"><%= amount %></span>
</div>
<% total_amount = total_amount + amount %>
<% end %>
<% end %>
<div class="line-content qt hr">
<span class="header-line">Total :</span>
<span class="content-line"><%= total_amount.to_s %></span>
</div>
</div>
<div class="info-contract-file-upload">
<div class="line-content file">
<%= form_for @contract, :url => {:action => "update_contract"}, :html => {:class => "form-horizontal"} do |f| %>
<span class="header-line">Signed Contract File :</span>
<span class="content-line">
<%= f.file_field :signed_contract_file, :class => "file-box" %>
<%= f.submit "Upload", :class => "btn btn-primary" %>
</span>
<% end %>
</div>
</div>
<div class="info-contract-buttons">
<div class="line-content button">
<% if !@contract.is_confirmed? %>
<a href="<%= edit_contract_admin_client_management_path(@contract.id) %>" class="btn btn-warning">Edit Contract</a>
<a href="<%= confirm_contract_admin_client_management_path(@contract.id, :confirm => "true") %>" class="btn btn-success">Confirm Contract</a>
<% else %>
<a href="<%= make_purchase_admin_client_management_path(@contract.id) %>" class="btn btn-warning">Make Purchase</a>
<a href="<%= confirm_contract_admin_client_management_path(@contract.id, :confirm => "false") %>" class="btn btn-danger">Un-Confirm Contract</a>
<% end %>
<a href="#" class="btn btn-info">Export Contract</a>
<a href="<%= admin_client_managements_completed_requests_path(:page => params[:page]) %>" class="btn">Back</a>
</div>
</div>
</div>

View File

@ -1,67 +1,86 @@
<style type="text/css">
table th{
text-align: right;
padding-right: 15px;
}
</style>
<h2>Request ID : <%= @site_request.uid %></h2>
<h2>Request type : <%= @site_request.get_request_type %></h2>
<table width="100%">
<caption><h3>User Details</h3></caption>
<% if !@user.fullname.nil? %>
<tr>
<th>Name :</th>
<td><%= @user.fullname %></td>
</tr>
<% end %>
<tr>
<th>Email :</th>
<td><%= @site_request.c_panel_user.email %></td>
</tr>
<% if !@user.phone_number.nil? %>
<tr>
<th>Phone Number :</th>
<td><%= @user.phone_number %></td>
</tr>
<% end %>
<% if !@user.address.nil? %>
<tr>
<th>Address :</th>
<td><%= @user.address %></td>
</tr>
<% end %>
<% if !@user.registered_site_ids.empty? %>
<tr>
<th>Registered Sites :</th>
<td>
<% @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 %>
</td>
</tr>
<% end %>
</table>
<hr>
<table width="100%">
<caption><h3>Request Specifications</h3></caption>
<% case @site_request.type %>
<% when "newsite" %>
<%= render :partial => "site_spec" %>
<% when "existing" %>
<%= render :partial => "site_spec" %>
<% when "addsites" %>
<%= render :partial => "add_site_spec" %>
<% end %>
</table>
<% 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>
<% 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 %>

View File

@ -16,9 +16,17 @@
<div class="sp-text text-center"><a href="/cpanel/sites">My Sites</a></div>
<% else %>
<div class="cp-addsite-step0">
<a href="<%= cpanel_add_new_site_path %>" class="add-new">Add New Site</a>
<div class="sp-text"><span>or</span></div>
<a href="#" class="add-yours">Add site(s) to your account</a>
<a href="<%= cpanel_add_new_site_path %>" class="add-new">
<i class="fa fa-plus-circle" aria-hidden="true"></i>
<span>Add New Site</span>
<i class="fa fa-sp fa-plus-circle" aria-hidden="true"></i>
</a>
<a href="#" class="add-yours">
<i class="fa fa-sitemap" aria-hidden="true"></i>
<span>Add Sites to your account</span>
<i class="fa fa-sitemap fa-sp" aria-hidden="true"></i>
</a>
<div class="box-add-yours">
<form action="/cpanel/addsitestouser" method="post">
<label for="add-info">Site URL(s)</label>

View File

@ -15,6 +15,14 @@
<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">
@ -37,6 +45,7 @@
<% 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>