Mercurial > hg > soundsoftware-site
comparison app/helpers/wiki_helper.rb @ 51:371eac10df0b live
* Merge from "cannam" branch. This includes update to Redmine trunk, plus welcome/tip-of-the-day from luisf branch.
author | Chris Cannam |
---|---|
date | Wed, 24 Nov 2010 12:20:08 +0000 |
parents | 94944d00e43c |
children | 051f544170fe |
comparison
equal
deleted
inserted
replaced
34:09b1d4349da3 | 51:371eac10df0b |
---|---|
22 pages.select {|p| p.parent == parent}.each do |page| | 22 pages.select {|p| p.parent == parent}.each do |page| |
23 attrs = "value='#{page.id}'" | 23 attrs = "value='#{page.id}'" |
24 attrs << " selected='selected'" if selected == page | 24 attrs << " selected='selected'" if selected == page |
25 indent = (level > 0) ? (' ' * level * 2 + '» ') : nil | 25 indent = (level > 0) ? (' ' * level * 2 + '» ') : nil |
26 | 26 |
27 s << "<option value='#{page.id}'>#{indent}#{h page.pretty_title}</option>\n" + | 27 s << "<option #{attrs}>#{indent}#{h page.pretty_title}</option>\n" + |
28 wiki_page_options_for_select(pages, selected, page, level + 1) | 28 wiki_page_options_for_select(pages, selected, page, level + 1) |
29 end | 29 end |
30 s | 30 s |
31 end | 31 end |
32 | 32 |