Source

DJFacet / demoproject / apps / djfacet / templates / djfacet / single_facet.html

Full commit
{% extends "djfacet/base.html" %}
{% load djf_tags %}

{% block header %}
	
	
		{# HEADER INFORMATION #}
		
					
			{% include "djfacet/components/header.html" %}
			
			
			{% include "djfacet/components/navbar.html" %}

	
	
			{% include "djfacet/components/control_bar.html" %}
			
			
          {# END OF  HEADER  #}
			
			
	
{% endblock %}




{% block contents %}
		
		
		
		{% with facetvalues|fvlist_formatter2 as facetvalues_formatted  %}
		
		
	    <div class="line contentSection AtoZ">



			{# CLICKABLE HEADER  #}
		
			{% if tree %}
				<h2><a href="{{url_prefix}}allfacets/?resulttype={{result_typeObj.uniquename}}">All</a> >> {{facet.group.label|title}} >> <a href="?resulttype={{result_typeObj.uniquename}}&amp;ordering={{ordering}}{{newurl_stub}}">{{facet.name|title}}</a> >> 			{% for v in tree %}
						{% if not forloop.last %}
							 <a href="?resulttype={{result_typeObj.uniquename}}&amp;ordering={{ordering}}&amp;showsubs={{v.id}}{{newurl_stub}}">{{v.name|title}}</a> >>  
						{% else %}
							{{v.name|title}}
						{% endif %}
					{% endfor %}
				</h2>
			{% else %}
				<h2><a href="{{url_prefix}}allfacets/?resulttype={{result_typeObj.uniquename}}">All</a> >> {{facet.group.label|title}} >> {{facet.name|title}}</h2>
			{% endif %}




			{# ALPHA INDEX  #}
			
	        <section>
	            <ul class="inline">
		
					{% for initial, valuesgroup in facetvalues_formatted  %}
	                	<li><a class="ctrl" title="Beginning with {{initial}}" href="#{{initial}}">{{initial}}</a></li>	
						{# ADD SELECTED ROUTINE! 	#}
						{# 	<li><a class="ctrl selected" title="Beginning with B" href="#B">B</a></li>	#}
					{% endfor %}

	            </ul>
	        </section>
	
	
	
		
			{# CONTENTS: FACETVALUES LIST  #}
			

			{% for initial, valuesgroup in facetvalues_formatted  %}

			
				<div class="line" id="{{initial}}"> <!-- {{initial}} starts -->
		            <h2 class="border">{{initial}}</h2>
				
				{% for group in valuesgroup  %}
					<div class="unit size1of2">
			        <ul>
					{% for facetvalue in group  %}
					
						{% ifnotequal facetvalue.howmany  totitems  %}
											
			            <li>{% if facetvalue.father %}<span class="fatherfacet">{{facetvalue|extract_father}}</span> &gt; {% endif %} 
					<a href="{{url_prefix}}?filter={{facetvalue.id}}&amp;resulttype={{result_typeObj.uniquename}}&amp;ordering={{ordering}}{{newurl_stub}}"  id="{{facetgroup.uniquename}}_{{facetvalue.id}}" class="{{facet.name}} active" 
							title="{% if facetvalue.subspreview  %}Subcategories:{% for e in facetvalue.subspreview %}&#13;{{e.name}}{% endfor %}	
									{% else %}No subcategories{% endif %}">{{facetvalue.displayname|capfirst|default:"---"}} ({{facetvalue.howmany|default:"0"}})</a> 
					{% if facetvalue.subspreview  %}<a href="?resulttype={{result_typeObj.uniquename}}&amp;ordering={{ordering}}&amp;showsubs={{facetvalue.id}}{{newurl_stub}}" title="Subcategories:{% for e in facetvalue.subspreview %}&#13;{{e.name}}{% endfor %}"><span class="graytext">&rarr; show subs</span></a>{% endif %}</li>
						
						{% else %}	
						
							<li><a href="#" class="inactive" title="Filter inactive because your search already produced {{totitems}} results">{{facetvalue.displayname|capfirst|default:"---"}} ({{facetvalue.howmany|default:"0"}})</a></li>							

						{% endifnotequal %}
			
					{% endfor %}
					
					</ul>
					</div><!-- column ends -->	
			
				{% endfor %}


				</div><!-- {{initial}} ends -->


			{% endfor %}
			

	</div>  <!-- A TO Z DIV ENDS -->

	{% endwith %}



	{# END OF CONTENTS #}


{% endblock %}