comparison app/helpers/projects_helper.rb @ 140:4272e09f4b5f cannam-pre-20110113-merge

Allow list of managers, if more than one row, to overlap with description rather than pushing description down
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 20 Jan 2011 10:01:33 +0000
parents 1890a968b404
children 4e485928a26b
comparison
equal deleted inserted replaced
139:ddcedb549d4e 140:4272e09f4b5f
194 194
195 classes = (ancestors.empty? ? 'root' : 'child') 195 classes = (ancestors.empty? ? 'root' : 'child')
196 196
197 s << "<tr class='#{oddeven} #{classes} level#{level}'>" 197 s << "<tr class='#{oddeven} #{classes} level#{level}'>"
198 s << "<td class='firstcol name hosted_here'>" << link_to_project(project, {}, :class => "project #{User.current.member_of?(project) ? 'my-project' : nil}") << "</td>" 198 s << "<td class='firstcol name hosted_here'>" << link_to_project(project, {}, :class => "project #{User.current.member_of?(project) ? 'my-project' : nil}") << "</td>"
199 s << "<td class='managers'>" 199 s << "<td class='managers' rowspan=2 align=top>"
200 200
201 u = project.users_by_role 201 u = project.users_by_role
202 if u 202 if u
203 u.keys.each do |r| 203 u.keys.each do |r|
204 if r.allowed_to?(:edit_project) 204 if r.allowed_to?(:edit_project)
214 end 214 end
215 end 215 end
216 end 216 end
217 217
218 s << "</td>" 218 s << "</td>"
219 s << "<td class='created_on'>" << format_date(project.created_on) << "</td>" 219 s << "<td class='created_on' rowspan=2 align=top>" << format_date(project.created_on) << "</td>"
220 s << "<td class='updated_on'>" << format_date(project.updated_on) << "</td>" 220 s << "<td class='updated_on' rowspan=2 align=top>" << format_date(project.updated_on) << "</td>"
221 221
222 s << "</tr>" 222 s << "</tr>"
223 s << "<tr class='#{oddeven} #{classes}'>" 223 s << "<tr class='#{oddeven} #{classes}'>"
224 s << "<td class='firstcol wiki description'>" 224 s << "<td class='firstcol wiki description'>"
225 s << textilizable(project.short_description, :project => project) unless project.description.blank? 225 s << textilizable(project.short_description, :project => project) unless project.description.blank?
226 s << "</td>" 226 s << "</td>"
227 s << "<td colspan=3>&nbsp;</td>"
228 s << "</tr>" 227 s << "</tr>"
229 228
230 ancestors << project 229 ancestors << project
231 end 230 end
232 231