def render_search(value): if value == None: return '' elif value == '': clear = '<span class="clear"></span>' else: clear = '<span class="clear"><a href="%s"><img src="/static/images/remove_filter.png"></a></span>' % ('/'.join([''] + route + ['clear'])) return '<div class="search">%s</div>' % form_for('<input type="text" class="text_field" id="search_text" name="q" value="%s">%s<input class="search_button" type=submit value="Search">' % (value,clear), method='GET')
def render_search(value): CLEAR_LAYOUT = '<span class="clear"><a href="%s"><img src="/static/dz/images/remove_filter.png"></a></span>' SEARCH_FIELDS = '<input type="text" class="text_field" id="search_text" name="q" value="%s">%s<input class="search_button" type=submit value="Search">' SEARCH_BUTTON = '<input class="search_button" type=submit value="Search">' SEARCH_LAYOUT = '<div class="search">%s</div>' if value == None: return '' elif value == '': clear = '<span class="clear"></span>' else: clear = CLEAR_LAYOUT % ('/'.join([''] + route + ['clear'])) return SEARCH_LAYOUT % form_for(SEARCH_FIELDS % (websafe(value),clear), method='GET')
def render_search(value): CLEAR_LAYOUT = '<span class="clear"><a href="%s"><img src="/static/dz/images/remove_filter.png"></a></span>' SEARCH_FIELDS = '<input type="text" class="text_field" id="search_text" name="q" value="%s">%s<input class="search_button" type=submit value="Search">' SEARCH_BUTTON = '<input class="search_button" type=submit value="Search">' SEARCH_LAYOUT = '<div class="search">%s</div>' if value == None: return '' elif value == '': clear = '<span class="clear"></span>' else: clear = CLEAR_LAYOUT % ('/'.join([''] + route + ['clear'])) return SEARCH_LAYOUT % form_for( SEARCH_FIELDS % (websafe(value), clear), method='GET')