From f7f53e4ac1b235d4ce95961ba28b683e3ae5b4cd Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Thu, 13 Oct 2011 13:33:47 -0700 Subject: [PATCH] [#6636] Style change on the finance report to be horizontal --- app/helpers/contracts_helper.rb | 12 +++++++++++- app/views/deliverables/_finances.html.erb | 4 ++-- assets/stylesheets/redmine_contracts.css | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/helpers/contracts_helper.rb b/app/helpers/contracts_helper.rb index b511a0a..52ac5c3 100644 --- a/app/helpers/contracts_helper.rb +++ b/app/helpers/contracts_helper.rb @@ -180,5 +180,15 @@ module ContractsHelper '' end end - + + # Simple calculator to dynamically figure out the css width % + # to fill a container. <100% is used to allow some padding. + def css_width_calculator(number_of_elements) + case number_of_elements + when 2 + " width: 48%" + when 3 + " width: 31%" + end + end end diff --git a/app/views/deliverables/_finances.html.erb b/app/views/deliverables/_finances.html.erb index 4f7b7f8..826fccc 100644 --- a/app/views/deliverables/_finances.html.erb +++ b/app/views/deliverables/_finances.html.erb @@ -7,7 +7,7 @@

<%= h(deliverable.title) %>

-
+

Activities

@@ -113,7 +113,7 @@ <%# /div#activities %> -
+

Users

diff --git a/assets/stylesheets/redmine_contracts.css b/assets/stylesheets/redmine_contracts.css index 426d4d1..08698e7 100644 --- a/assets/stylesheets/redmine_contracts.css +++ b/assets/stylesheets/redmine_contracts.css @@ -532,3 +532,4 @@ table.striped-contract-style tr.summary-row { div.fixed-budget-form {padding: 5px 0;} .deliverable-action-link { font-weight: bold; } +.deliverable-finance-report { float: left; padding: 0 5px; }