solreyes / templates / search-summary.mako

<div class="search_constraints">
% for facet, values in c['results'].get_search_constraints().iteritems():
   
    % if facet in c['config'].facet_ranges.keys():
        <div class="search_constraint">
            ${c['config'].get_facet_display(facet)} : 
    
            % if c['results'].get_selected_range_end(facet) != -1:
                ${c['results'].get_selected_range_start(facet)} - ${c['results'].get_selected_range_end(facet)}
            % else:
                <em>${c['results'].get_selected_range_start(facet)}+
            % endif
            &nbsp;&nbsp;<a href="${c['url_manager'].get_delete_url(facet)}">x</a>
        </div>
            
    % elif facet in c['config'].facet_dates.keys():
        <div class="search_constraint">
            ${c['config'].get_facet_display(facet)} : 
            % if c['results'].get_selected_range_end(facet) != -1:
                ${c['config'].get_value_display(facet, str(c['results'].get_selected_range_start(facet)))}
                % if c['config'].display_upper(facet, str(c['results'].get_selected_range_start(facet)), str(c['results'].get_selected_range_end(facet))):
                    - 
                    ${c['config'].get_value_display(facet, str(c['results'].get_selected_range_end(facet)))}
                % endif
            % else:
                ${c['config'].get_value_display(facet, str(c['results'].get_selected_range_start(facet)))}+
            % endif
            &nbsp;&nbsp;<a href="${c['url_manager'].get_delete_url(facet)}">x</a>
        </div>

    % else:
        % for value in values:
            <div class="search_constraint">
                ${c['config'].get_facet_display(facet)} : 
                ${c['config'].get_value_display(facet, value)}
                &nbsp;&nbsp;<a href="${c['url_manager'].get_delete_url(facet, value)}">x</a>
            </div>
        % endfor
    % endif
% endfor
</div>


    
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.