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