Mercurial > hg > soundsoftware-site
changeset 159:4e485928a26b cannam-pre-20110113-merge
* Simplify table construction, with name and description in the same cell and some layout tidying. Eliminates minor bug that made name and description highlight separately on mouseover.
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 28 Jan 2011 11:01:43 +0000 |
parents | e7c03e1738fb |
children | 496f1cf46503 |
files | app/helpers/projects_helper.rb public/themes/soundsoftware/stylesheets/application.css |
diffstat | 2 files changed, 16 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/app/helpers/projects_helper.rb Mon Jan 24 14:12:44 2011 +0000 +++ b/app/helpers/projects_helper.rb Fri Jan 28 11:01:43 2011 +0000 @@ -195,8 +195,17 @@ classes = (ancestors.empty? ? 'root' : 'child') s << "<tr class='#{oddeven} #{classes} level#{level}'>" - s << "<td class='firstcol name hosted_here'>" << link_to_project(project, {}, :class => "project #{User.current.member_of?(project) ? 'my-project' : nil}") << "</td>" - s << "<td class='managers' rowspan=2 align=top>" + s << "<td class='firstcol' align=top><div class='name hosted_here" + s << " no_description" if project.description.blank? + s << "'>" << link_to_project(project, {}, :class => "project #{User.current.member_of?(project) ? 'my-project' : nil}"); + s << "</div>" + unless project.description.blank? + s << "<div class='wiki description'>" + s << textilizable(project.short_description, :project => project) + s << "</div>" + end + + s << "<td class='managers' align=top>" u = project.users_by_role if u @@ -216,15 +225,10 @@ end s << "</td>" - s << "<td class='created_on' rowspan=2 align=top>" << format_date(project.created_on) << "</td>" - s << "<td class='updated_on' rowspan=2 align=top>" << format_date(project.updated_on) << "</td>" + s << "<td class='created_on' align=top>" << format_date(project.created_on) << "</td>" + s << "<td class='updated_on' align=top>" << format_date(project.updated_on) << "</td>" s << "</tr>" - s << "<tr class='#{oddeven} #{classes}'>" - s << "<td class='firstcol wiki description'>" - s << textilizable(project.short_description, :project => project) unless project.description.blank? - s << "</td>" - s << "</tr>" ancestors << project end
--- a/public/themes/soundsoftware/stylesheets/application.css Mon Jan 24 14:12:44 2011 +0000 +++ b/public/themes/soundsoftware/stylesheets/application.css Fri Jan 28 11:01:43 2011 +0000 @@ -69,8 +69,9 @@ table.projects th { text-align: left; } table.projects th.managers { color: #3e442c; } -table.projects .root .name { font-size: 1.2em; } -table.projects .root .description { padding-bottom: 0.5em; } +table.projects .root .name { font-size: 1.2em; padding-top: 0.3em; } +table.projects .description { padding-bottom: 0.5em; } +table.projects .no_description { padding-bottom: 0.5em; } table.projects .hosted_here { font-weight: bold; } table.projects .child .name { font-weight: normal; } table.projects .child .description { font-size: 0.95em; }