some mods by ika

This commit is contained in:
orbit 2017-04-10 16:21:41 +08:00
parent 2e87baa4dd
commit 3dafdb4016
9 changed files with 117 additions and 66 deletions

View File

@ -8,8 +8,9 @@ h1, h2, h3, h4, h5, h6, label, legend {
background: #fff; background: #fff;
padding: 20px; padding: 20px;
border: 1px solid #ddd; border: 1px solid #ddd;
margin: 30px; margin: 30px 0 30px 15px;
max-width: 1000px; max-width: 1000px;
position: relative;
} }
.sub-title { .sub-title {
color: #337ab7; color: #337ab7;
@ -18,9 +19,36 @@ h1, h2, h3, h4, h5, h6, label, legend {
margin: 50px 0 5px; margin: 50px 0 5px;
padding: 0 0 0 8px; padding: 0 0 0 8px;
} }
.sub-title .label {
padding: 4px 10px 5px;
font-size: 12px;
margin: 0 0 0 10px;
vertical-align: text-top;
}
.page-client > div:first-child .sub-title { .page-client > div:first-child .sub-title {
margin: 20px 0 5px; margin: 20px 0 5px;
} }
.page-client > * {
margin: 0 0 30px;
}
.page-receipts .info-receipts {
overflow-x: auto;
}
.page-receipts table {
margin: 0 0 10px;
}
.page-receipts table .btn {
width: auto;
margin: 0;
}
.page-receipts table th {
width: 15%;
white-space: normal;
vertical-align: top;
}
.page-client > *:last-child {
margin: 0;
}
.line-content { .line-content {
width: 100%; width: 100%;
margin: 0 0 15px; margin: 0 0 15px;
@ -52,6 +80,7 @@ div .line-content:nth-child(1) {
} }
.line-content .header-line label { .line-content .header-line label {
color: #000; color: #000;
font-size: 15px;
font-weight: 500; font-weight: 500;
float: left; float: left;
width: 200px; width: 200px;
@ -82,6 +111,12 @@ div .line-content:nth-child(1) {
margin: 10px 0; margin: 10px 0;
border-radius: 4px; border-radius: 4px;
} }
.line-content.qt div.requirement-text {
background: rgba(0,0,0,0.04);
padding: 10px;
margin: 10px 0;
border-radius: 4px;
}
.line-content.qt ol.custom-module li { .line-content.qt ol.custom-module li {
margin: 5px 0; margin: 5px 0;
} }

View File

@ -52,4 +52,9 @@
<% if @receipt.new_record? %> <% if @receipt.new_record? %>
<%= f.hidden_field :contract_purchase_id, :value => @purchase.id.to_s %> <%= f.hidden_field :contract_purchase_id, :value => @purchase.id.to_s %>
<% end %> <% end %>
<%= f.submit "Submit", :class => "btn btn-primary" %>
<div class="line-content">
<span class="header-line">
<%= f.submit "Submit", :class => "btn btn-primary" %>
</span>
</div>

View File

@ -5,11 +5,14 @@
<%= javascript_include_tag "lib/bootstrap-datetimepicker" %> <%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
<% end %> <% end %>
<div class="info-detail">
<div class="page-contract page-client">
<div class="info-detail">
<div class="info-spec"> <div class="info-spec">
<%= form_for @receipt, :url => {:action => :create_receipt}, :html => {:class => "form-horizontal contract-form"} do |f| %> <%= form_for @receipt, :url => {:action => :create_receipt}, :html => {:class => "form-horizontal contract-form"} do |f| %>
<h3 class="sub-title">Add Receipt</h3> <h3 class="sub-title">Add Receipt</h3>
<%= render :partial => "purchase_form", :locals => {:f => f} %> <%= render :partial => "purchase_form", :locals => {:f => f} %>
<% end %> <% end %>
</div> </div>
</div>
</div> </div>

View File

@ -5,11 +5,13 @@
<%= javascript_include_tag "lib/bootstrap-datetimepicker" %> <%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
<% end %> <% end %>
<div class="info-detail"> <div class="page-contract page-client">
<div class="info-detail">
<div class="info-spec"> <div class="info-spec">
<%= form_for @receipt, :url => {:action => :update_receipt}, :html => {:class => "form-horizontal contract-form"} do |f| %> <%= form_for @receipt, :url => {:action => :update_receipt}, :html => {:class => "form-horizontal contract-form"} do |f| %>
<h3 class="sub-title">Add Receipt</h3> <h3 class="sub-title">Add Receipt</h3>
<%= render :partial => "purchase_form", :locals => {:f => f} %> <%= render :partial => "purchase_form", :locals => {:f => f} %>
<% end %> <% end %>
</div> </div>
</div>
</div> </div>

View File

@ -2,15 +2,15 @@
<%= stylesheet_link_tag "client_management/backend" %> <%= stylesheet_link_tag "client_management/backend" %>
<% end %> <% end %>
<div class="page-contract page-client"> <div class="page-receipts page-client">
<div class="info-contract"> <div class="info-contract">
<h3 class="sub-title"> <h3 class="sub-title">
<% if @purchase.total_amount == (@total_received_amount + @total_adjustable_amount) %>
<span class="label label-success pull-right">Received</span>
<% else %>
<span class="label label-important pull-right">Pending</span>
<% end %>
Purchase Info Purchase Info
<% if @purchase.total_amount == (@total_received_amount + @total_adjustable_amount) %>
<span class="label label-success">Received</span>
<% else %>
<span class="label label-important">Pending</span>
<% end %>
</h3> </h3>
<div class="line-content"> <div class="line-content">
<span class="header-line">Contract Id :</span> <span class="header-line">Contract Id :</span>
@ -37,8 +37,8 @@
<span class="content-line" style="color: red;"><%= @purchase.total_amount - (@total_received_amount + @total_adjustable_amount) %> NTD.</span> <span class="content-line" style="color: red;"><%= @purchase.total_amount - (@total_received_amount + @total_adjustable_amount) %> NTD.</span>
</div> </div>
</div> </div>
</div> <div class="info-receipts">
<table class="table main-list"> <table class="table main-list">
<thead> <thead>
<tr class="sort-header"> <tr class="sort-header">
<% ["client_management.receipt_number", "client_management.amount", "client_management.amount_received", "client_management.amount_pending", "client_management.receipt_status", :actions].each_with_index do |f,i| %> <% ["client_management.receipt_number", "client_management.amount", "client_management.amount_received", "client_management.amount_pending", "client_management.receipt_status", :actions].each_with_index do |f,i| %>
@ -71,11 +71,13 @@
<% end %> <% end %>
</tbody> </tbody>
</table> </table>
<div class="info-contract-buttons"> </div>
<div class="info-contract-buttons">
<div class="line-content button"> <div class="line-content button">
<% if @purchase.total_amount > (@total_received_amount + @total_adjustable_amount) %> <% if @purchase.total_amount > (@total_received_amount + @total_adjustable_amount) %>
<a class="btn btn-info" href="<%= add_receipt_admin_client_management_path(@purchase.id) %>">Add Receipt</a> <a class="btn btn-info" href="<%= add_receipt_admin_client_management_path(@purchase.id) %>">Add Receipt</a>
<% end %> <% end %>
<a class="btn" href="<%= see_contract_admin_client_management_path(@contract.id) %>">Back to Contract</a> <a class="btn" href="<%= see_contract_admin_client_management_path(@contract.id) %>">Back to Contract</a>
</div> </div>
</div>
</div> </div>

View File

@ -108,8 +108,10 @@
<% if !@contract.other.nil? || @contract.other_cost > 0 %> <% if !@contract.other.nil? || @contract.other_cost > 0 %>
<div class="line-content qt"> <div class="line-content qt">
<span class="header-line"> <span class="header-line">
Other Requirements : <br> Other Requirements
<div class="requirement-text">
<%= nl2br(@contract.other) %> <%= nl2br(@contract.other) %>
</div>
</span> </span>
<span class="content-line"><%= @contract.other_cost %></span> <span class="content-line"><%= @contract.other_cost %></span>
</div> </div>

View File

@ -5,13 +5,13 @@
<span class="regdate-server"><i class="fa fa-calendar" aria-hidden="true"></i></i><%= user_site.created_at.strftime("%d %B %Y") %></span> <span class="regdate-server"><i class="fa fa-calendar" aria-hidden="true"></i></i><%= user_site.created_at.strftime("%d %B %Y") %></span>
</div> </div>
<% if !user_site.site_confirmed %> <% if !user_site.site_confirmed %>
<span class="status-server offline"><%= t("registered_sites.site_inactive") %></span><br /> <span class="status-server offline"><%= t("registered_sites.site_inactive") %></span>
<%= t("registered_sites.email_not_confirmed") %> <%= t("registered_sites.email_not_confirmed") %>
<% elsif !user_site.access_granted %> <% elsif !user_site.access_granted %>
<span class="status-server offline"><%= t("registered_sites.site_inactive") %></span><br /> <span class="status-server offline"><%= t("registered_sites.site_inactive") %></span>
<%= t("registered_sites.site_permission_revoked") %> <%= t("registered_sites.site_permission_revoked") %>
<% else %> <% else %>
<span class="status-server online"><%= t("registered_sites.site_active") %></span><br /> <span class="status-server online"><%= t("registered_sites.site_active") %></span>
<% end %> <% end %>
<span class="action-server"> <span class="action-server">
<a href="/cpanel/site/<%= user_site.uid %>" class="btn btn-info">Manage</a> <a href="/cpanel/site/<%= user_site.uid %>" class="btn btn-info">Manage</a>

View File

@ -37,12 +37,12 @@
<%= f.select :site_id, @user_sites, {:prompt => "------Select or Create------"}, {:class => "form-control select-site"} %> <%= f.select :site_id, @user_sites, {:prompt => "------Select or Create------"}, {:class => "form-control select-site"} %>
<div class="box-check-host" id="maintenance-box"> <div class="box-check-host" id="maintenance-box">
<div class="line-check-host"> <div class="line-check-host">
<%= f.label :maintenance, "Renew my maintenance" %>
<%= f.check_box :maintenance %> <%= f.check_box :maintenance %>
<%= f.label :maintenance, "Renew my maintenance" %>
</div> </div>
<div class="line-check-host"> <div class="line-check-host">
<%= f.label :maintenance_years, "Year(s): " %> <%= f.label :maintenance_years, "Year(s): ", :class=>"left" %>
<%= f.select :maintenance_years, options_for_select((1..5).collect{|i|[i,i]}), :class=>"form-control" %> <%= f.select :maintenance_years, options_for_select((1..5).collect{|i|[i,i]}),{}, {class: "form-control left"} %>
</div> </div>
</div> </div>
<div class="box-check-host" id="new-site-box"> <div class="box-check-host" id="new-site-box">

View File

@ -103,8 +103,10 @@
<% if !@contract.other.nil? || @contract.other_cost > 0 %> <% if !@contract.other.nil? || @contract.other_cost > 0 %>
<div class="line-contract qt"> <div class="line-contract qt">
<span class="header-detail"> <span class="header-detail">
Other Requirements : <br> Other Requirements
<div class="requirement-text">
<%= nl2br(@contract.other) %> <%= nl2br(@contract.other) %>
</div>
</span> </span>
<span class="content-detail"><%= @contract.other_cost %></span> <span class="content-detail"><%= @contract.other_cost %></span>
</div> </div>