Mercurial > hg > soundsoftware-site
comparison app/helpers/wiki_helper.rb @ 37:94944d00e43c
* Update to SVN trunk rev 4411
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 19 Nov 2010 13:24:41 +0000 |
parents | 513646585e45 |
children | 051f544170fe |
comparison
equal
deleted
inserted
replaced
22:40f7cfd4df19 | 37:94944d00e43c |
---|---|
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 |