add dedicated wiki page search

This commit is contained in:
albert
2013-02-21 13:27:01 -05:00
parent b071cabc76
commit fef8597564
5 changed files with 31 additions and 2 deletions

View File

@@ -105,7 +105,12 @@ module ApplicationHelper
def search_field(method, options = {})
name = options[:label] || method.titleize
raw '<div class="input"><label for="search_' + method + '">' + name + '</label><input type="text" name="search[' + method + ']" id="search_' + method + '"></div>'
string = '<div class="input"><label for="search_' + method + '">' + name + '</label><input type="text" name="search[' + method + ']" id="search_' + method + '">'
if options[:hint]
string += '<p class="hint">' + options[:hint] + '</p>'
end
string += '</div>'
string.html_safe
end
protected