Mercurial > hg > soundsoftware-site
comparison app/helpers/application_helper.rb @ 144:09910262eb0b live
Bug #60:
+ the "jump to project" input box is now below the search box
+ the project ancestors are displayed in a separate line
author | luisf |
---|---|
date | Wed, 12 Jan 2011 17:06:18 +0000 |
parents | 6a2f8e88344e |
children | e47742d68d2d |
comparison
equal
deleted
inserted
replaced
137:637d05516475 | 144:09910262eb0b |
---|---|
379 concat('</p>') | 379 concat('</p>') |
380 end | 380 end |
381 | 381 |
382 def page_header_title | 382 def page_header_title |
383 if @project.nil? || @project.new_record? | 383 if @project.nil? || @project.new_record? |
384 h(Setting.app_title) | 384 a = [h(Setting.app_title), ''] |
385 else | 385 |
386 else | |
387 pname = [] | |
386 b = [] | 388 b = [] |
387 ancestors = (@project.root? ? [] : @project.ancestors.visible) | 389 ancestors = (@project.root? ? [] : @project.ancestors.visible) |
388 if ancestors.any? | 390 if ancestors.any? |
389 root = ancestors.shift | 391 root = ancestors.shift |
390 b << link_to_project(root, {:jump => current_menu_item}, :class => 'root') | 392 b << link_to_project(root, {:jump => current_menu_item}, :class => 'root') |
391 if ancestors.size > 2 | 393 if ancestors.size > 2 |
392 b << '…' | 394 b << '…' |
393 ancestors = ancestors[-2, 2] | 395 ancestors = ancestors[-2, 2] |
394 end | 396 end |
395 b += ancestors.collect {|p| link_to_project(p, {:jump => current_menu_item}, :class => 'ancestor') } | 397 b += ancestors.collect {|p| link_to_project(p, {:jump => current_menu_item}, :class => 'ancestor') } |
396 end | 398 b = b.join(' » ') |
397 b << h(@project) | 399 b << (' »') |
398 b.join(' » ') | 400 end |
401 | |
402 pname << h(@project) | |
403 | |
404 a = [pname, b] | |
405 | |
399 end | 406 end |
400 end | 407 end |
401 | 408 |
402 def html_title(*args) | 409 def html_title(*args) |
403 if args.empty? | 410 if args.empty? |