[#6636] CSS and class cleanup to better match the comp design
This commit is contained in:
@@ -22,38 +22,38 @@
|
||||
<% deliverable.billable_time_entry_activities.each do |activity| %>
|
||||
|
||||
<% content_tag_for(:tr, activity, :class => 'labor ' + cycle('even','')) do %>
|
||||
<td class="labor">
|
||||
<td class="">
|
||||
<%= h(activity.name) %>
|
||||
</td>
|
||||
<td class="spent-amount labor <%= overage_class(deliverable.spent_for_activity(activity), deliverable.budget_for_activity(activity)) %>">
|
||||
<td class="financial spent-amount <%= overage_class(deliverable.spent_for_activity(activity), deliverable.budget_for_activity(activity)) %>">
|
||||
<%= number_to_currency(deliverable.spent_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="total-amount labor">
|
||||
<td class="financial total-amount">
|
||||
<%= number_to_currency(deliverable.budget_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="spent-hours labor <%= overage_class(deliverable.hours_spent_for_activity(activity), deliverable.hours_budget_for_activity(activity)) %>">
|
||||
<td class="numeric spent-hours <%= overage_class(deliverable.hours_spent_for_activity(activity), deliverable.hours_budget_for_activity(activity)) %>">
|
||||
<%= number_with_precision(deliverable.hours_spent_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="total-deliverable-hours labor">
|
||||
<td class="numeric total-deliverable-hours">
|
||||
<%= number_with_precision(deliverable.hours_budget_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<tr class="total summary-row labor">
|
||||
<td class="labor">
|
||||
<td class="">
|
||||
Totals
|
||||
</td>
|
||||
<td class="spent-amount labor <%= overage_class(deliverable.labor_budget_spent, deliverable.labor_budget_total) %>">
|
||||
<td class="financial spent-amount <%= overage_class(deliverable.labor_budget_spent, deliverable.labor_budget_total) %>">
|
||||
<%= number_to_currency(deliverable.labor_budget_spent, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="total-amount labor">
|
||||
<td class="financial total-amount">
|
||||
<%= number_to_currency(deliverable.labor_budget_total, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="spent-hours labor <%= overage_class(deliverable.labor_hours_spent_total, deliverable.labor_budget_hours) %>">
|
||||
<td class="numeric spent-hours <%= overage_class(deliverable.labor_hours_spent_total, deliverable.labor_budget_hours) %>">
|
||||
<%= number_with_precision(deliverable.labor_hours_spent_total, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="total-deliverable-hours labor">
|
||||
<td class="numeric total-deliverable-hours">
|
||||
<%= number_with_precision(deliverable.labor_budget_hours, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -72,38 +72,38 @@
|
||||
<% deliverable.non_billable_time_entry_activities.each do |activity| %>
|
||||
|
||||
<% content_tag_for(:tr, activity, :class => 'overhead ' + cycle('even','')) do %>
|
||||
<td class="overhead">
|
||||
<td class="">
|
||||
<%= h(activity.name) %>
|
||||
</td>
|
||||
<td class="spent-amount overhead <%= overage_class(deliverable.spent_for_activity(activity), deliverable.budget_for_activity(activity)) %>">
|
||||
<td class="financial spent-amount <%= overage_class(deliverable.spent_for_activity(activity), deliverable.budget_for_activity(activity)) %>">
|
||||
<%= number_to_currency(deliverable.spent_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="total-amount overhead">
|
||||
<td class="financial total-amount">
|
||||
<%= number_to_currency(deliverable.budget_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="spent-hours overhead <%= overage_class(deliverable.hours_spent_for_activity(activity), deliverable.hours_budget_for_activity(activity)) %>">
|
||||
<td class="numeric spent-hours <%= overage_class(deliverable.hours_spent_for_activity(activity), deliverable.hours_budget_for_activity(activity)) %>">
|
||||
<%= number_with_precision(deliverable.hours_spent_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="total-deliverable-hours overhead">
|
||||
<td class="numeric total-deliverable-hours">
|
||||
<%= number_with_precision(deliverable.hours_budget_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<tr class="total summary-row overhead">
|
||||
<td class="overhead">
|
||||
<td class="">
|
||||
Totals
|
||||
</td>
|
||||
<td class="spent-amount overhead <%= overage_class(deliverable.overhead_spent, deliverable.overhead_budget_total) %>">
|
||||
<td class="financial spent-amount <%= overage_class(deliverable.overhead_spent, deliverable.overhead_budget_total) %>">
|
||||
<%= number_to_currency(deliverable.overhead_spent, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="total-amount overhead">
|
||||
<td class="financial total-amount">
|
||||
<%= number_to_currency(deliverable.overhead_budget_total, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="spent-hours overhead <%= overage_class(deliverable.overhead_hours_spent_total, deliverable.overhead_budget_hours) %>">
|
||||
<td class="numeric spent-hours <%= overage_class(deliverable.overhead_hours_spent_total, deliverable.overhead_budget_hours) %>">
|
||||
<%= number_with_precision(deliverable.overhead_hours_spent_total, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="total-deliverable-hours overhead">
|
||||
<td class="numeric total-deliverable-hours">
|
||||
<%= number_with_precision(deliverable.overhead_budget_hours, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -127,26 +127,26 @@
|
||||
<% deliverable.users_with_billable_time.sort.each do |user| %>
|
||||
|
||||
<% content_tag_for(:tr, user, :class => 'labor ' + cycle('even','')) do %>
|
||||
<td class="labor">
|
||||
<td class="">
|
||||
<%= h(user.name) %>
|
||||
</td>
|
||||
<td class="amount-cost labor">
|
||||
<td class="financial amount-cost">
|
||||
<%= number_to_currency(deliverable.spent_for_user(user, true), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="time-cost labor">
|
||||
<td class="numeric time-cost">
|
||||
<%= number_with_precision(deliverable.hours_spent_for_user(user, true), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<tr class="total summary-row labor">
|
||||
<td class="labor">
|
||||
<td class="">
|
||||
Totals
|
||||
</td>
|
||||
<td class="amount-cost labor">
|
||||
<td class="financial amount-cost">
|
||||
<%= number_to_currency(deliverable.labor_budget_spent, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="time-cost labor">
|
||||
<td class="numeric time-cost">
|
||||
<%= number_with_precision(deliverable.labor_hours_spent_total, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -165,26 +165,26 @@
|
||||
<% deliverable.users_with_non_billable_time.sort.each do |user| %>
|
||||
|
||||
<% content_tag_for(:tr, user, :class => 'overhead ' + cycle('even','')) do %>
|
||||
<td class="overhead">
|
||||
<td class="">
|
||||
<%= h(user.name) %>
|
||||
</td>
|
||||
<td class="amount-cost overhead">
|
||||
<td class="financial amount-cost">
|
||||
<%= number_to_currency(deliverable.spent_for_user(user, false), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="time-cost overhead">
|
||||
<td class="numeric time-cost">
|
||||
<%= number_with_precision(deliverable.hours_spent_for_user(user, false), :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<tr class="total summary-row overhead">
|
||||
<td class="overhead">
|
||||
<td class="">
|
||||
Totals
|
||||
</td>
|
||||
<td class="amount-cost overhead">
|
||||
<td class="financial amount-cost">
|
||||
<%= number_to_currency(deliverable.overhead_spent, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
<td class="time-cost overhead">
|
||||
<td class="numeric time-cost">
|
||||
<%= number_with_precision(deliverable.overhead_hours_spent_total, :precision => Deliverable::ViewPrecision) %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -51,10 +51,8 @@ padding-left: 0px; /* Don't pad submit buttons */
|
||||
|
||||
.deliverable_finance_table td { padding-left: 0px; }
|
||||
|
||||
input.financial{
|
||||
text-align: right;
|
||||
width: 65px;
|
||||
}
|
||||
.financial, .numeric { text-align: right; }
|
||||
input.financial{ width: 65px; }
|
||||
|
||||
table.striped-contract-style { border-collapse: collapse; }
|
||||
|
||||
@@ -535,3 +533,4 @@ div.fixed-budget-form {padding: 5px 0;}
|
||||
.deliverable-finance-report { float: left; padding: 0 5px; }
|
||||
#finance-summary { font-size: 1.2em; color: #666666; }
|
||||
#finance-summary span { padding: 0; font-weight: bold; color: #000000; }
|
||||
table.striped-contract-style td.financial, table.striped-contract-style td.numeric { text-align: right; }
|
||||
|
||||
@@ -80,20 +80,20 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
|
||||
|
||||
should "render the labor activities table for the deliverable" do
|
||||
assert_select "table#deliverable-labor-activities" do
|
||||
assert_select "tr" do
|
||||
assert_select "td.labor", :text => /#{@billable_activity.name}/
|
||||
assert_select "td.spent-amount.labor", :text => /\$200/
|
||||
assert_select "td.total-amount.labor", :text => /\$300/
|
||||
assert_select "td.spent-hours.labor", :text => /2/
|
||||
assert_select "td.total-deliverable-hours.labor", :text => /30/ # 3 month retainer * 10
|
||||
assert_select "tr.labor" do
|
||||
assert_select "td", :text => /#{@billable_activity.name}/
|
||||
assert_select "td.spent-amount", :text => /\$200/
|
||||
assert_select "td.total-amount", :text => /\$300/
|
||||
assert_select "td.spent-hours", :text => /2/
|
||||
assert_select "td.total-deliverable-hours", :text => /30/ # 3 month retainer * 10
|
||||
end
|
||||
|
||||
assert_select "tr.summary-row" do
|
||||
assert_select "td.labor", :text => /Totals/
|
||||
assert_select "td.spent-amount.labor", :text => /\$200/
|
||||
assert_select "td.total-amount.labor", :text => /\$300/
|
||||
assert_select "td.spent-hours.labor", :text => /2/
|
||||
assert_select "td.total-deliverable-hours.labor", :text => /30/
|
||||
assert_select "tr.summary-row.labor" do
|
||||
assert_select "td", :text => /Totals/
|
||||
assert_select "td.spent-amount", :text => /\$200/
|
||||
assert_select "td.total-amount", :text => /\$300/
|
||||
assert_select "td.spent-hours", :text => /2/
|
||||
assert_select "td.total-deliverable-hours", :text => /30/
|
||||
end
|
||||
|
||||
end
|
||||
@@ -101,20 +101,20 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
|
||||
|
||||
should "render the overhead activities table for the deliverable" do
|
||||
assert_select "table#deliverable-overhead-activities" do
|
||||
assert_select "tr" do
|
||||
assert_select "td.overhead", :text => /#{@non_billable_activity.name}/
|
||||
assert_select "td.spent-amount.overhead", :text => /\$500/
|
||||
assert_select "td.total-amount.overhead", :text => /\$600/
|
||||
assert_select "td.spent-hours.overhead", :text => /5/
|
||||
assert_select "td.total-deliverable-hours.overhead", :text => /30/ # 3 month retainer * 10
|
||||
assert_select "tr.overhead" do
|
||||
assert_select "td", :text => /#{@non_billable_activity.name}/
|
||||
assert_select "td.spent-amount", :text => /\$500/
|
||||
assert_select "td.total-amount", :text => /\$600/
|
||||
assert_select "td.spent-hours", :text => /5/
|
||||
assert_select "td.total-deliverable-hours", :text => /30/ # 3 month retainer * 10
|
||||
end
|
||||
|
||||
assert_select "tr.summary-row" do
|
||||
assert_select "td.overhead", :text => /Totals/
|
||||
assert_select "td.spent-amount.overhead", :text => /\$500/
|
||||
assert_select "td.total-amount.overhead", :text => /\$600/
|
||||
assert_select "td.spent-hours.overhead", :text => /5/
|
||||
assert_select "td.total-deliverable-hours.overhead", :text => /30/
|
||||
assert_select "tr.summary-row.overhead" do
|
||||
assert_select "td", :text => /Totals/
|
||||
assert_select "td.spent-amount", :text => /\$500/
|
||||
assert_select "td.total-amount", :text => /\$600/
|
||||
assert_select "td.spent-hours", :text => /5/
|
||||
assert_select "td.total-deliverable-hours", :text => /30/
|
||||
end
|
||||
|
||||
end
|
||||
@@ -122,16 +122,16 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
|
||||
|
||||
should "render the labor finances for each user for the deliverable" do
|
||||
assert_select "table#deliverable-labor-users" do
|
||||
assert_select "tr" do
|
||||
assert_select "td.labor", :text => /#{@manager.name}/
|
||||
assert_select "td.amount-cost.labor", :text => /\$200/
|
||||
assert_select "td.time-cost.labor", :text => /2/
|
||||
assert_select "tr.labor" do
|
||||
assert_select "td", :text => /#{@manager.name}/
|
||||
assert_select "td.amount-cost", :text => /\$200/
|
||||
assert_select "td.time-cost", :text => /2/
|
||||
end
|
||||
|
||||
assert_select "tr.summary-row" do
|
||||
assert_select "td.labor", :text => /Totals/
|
||||
assert_select "td.amount-cost.labor", :text => /\$200/
|
||||
assert_select "td.time-cost.labor", :text => /2/
|
||||
assert_select "td", :text => /Totals/
|
||||
assert_select "td.amount-cost", :text => /\$200/
|
||||
assert_select "td.time-cost", :text => /2/
|
||||
end
|
||||
|
||||
end
|
||||
@@ -139,16 +139,16 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
|
||||
|
||||
should "render the overhead finances for each user for the deliverable" do
|
||||
assert_select "table#deliverable-overhead-users" do
|
||||
assert_select "tr" do
|
||||
assert_select "td.overhead", :text => /#{@manager.name}/
|
||||
assert_select "td.amount-cost.overhead", :text => /\$500/
|
||||
assert_select "td.time-cost.overhead", :text => /5/
|
||||
assert_select "tr.overhead" do
|
||||
assert_select "td", :text => /#{@manager.name}/
|
||||
assert_select "td.amount-cost", :text => /\$500/
|
||||
assert_select "td.time-cost", :text => /5/
|
||||
end
|
||||
|
||||
assert_select "tr.summary-row" do
|
||||
assert_select "td.overhead", :text => /Totals/
|
||||
assert_select "td.amount-cost.overhead", :text => /\$500/
|
||||
assert_select "td.time-cost.overhead", :text => /5/
|
||||
assert_select "tr.summary-row.overhead" do
|
||||
assert_select "td", :text => /Totals/
|
||||
assert_select "td.amount-cost", :text => /\$500/
|
||||
assert_select "td.time-cost", :text => /5/
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user