Commits

magicrebirth committed 2f2c34b

Minor UI changes

  • Participants
  • Parent commits 5e739bc

Comments (0)

Files changed (8)

File demoproject/apps/djfacet/templates/djfacet/base.html

 				toggle_facets();
 				toggle_history();
 				
+				close_history();
+				
 				{% if ajaxflag %}
 					
-					// DEFAULT: all panels are created open - then (eg if ajax) they get closed at load time via js
+					// DEFAULT: all panels are created open - then they get closed at load time via js					
+					close_facets();
 					
-					close_facets();
-					close_history();
-
 					$(".openclosefacet").bind( "click", function(event, ui) {
 					  // alert("clicked" + $(this)); 
 					updateFacetValues($(this));

File demoproject/apps/djfacet/templates/djfacet/components/control_available.html

 
 
 <div class="filtersAvailable">
-	<h3>Filters available</h3>
+	{# <h3>Filters available</h3> #}
 	<h5>Choose more filters in order to narrow down your query further:</h5>
 </div>
 

File demoproject/apps/djfacet/templates/djfacet/components/control_bar.html

+{% load djf_tags %}
+
 <!-- result type starts -->
 <div class="line resultType">
     <ul class="inline">
 		</li>
 		
 		
+		{% if query_filtersBuffer %}
+		
+		<!-- CASE 2 :: SINGLE_FACET PAGE IN THE MIDDLE OF A SEARCH  -->
+			{# &nbsp;&nbsp;&nbsp;&nbsp; #}
+			{# <br /> #}
+			
+		    <li>Current filter{{ query_filtersBuffer|pluralize }}:
+
+				{% for facetValue in  query_filtersBuffer %}
+
+					<span class="activeFilter">
+						{% if facetValue.father %}
+							<a title="Select the parent filter" href="?resulttype={{result_typeObj.uniquename}}&amp;filter={{facetValue.father}}
+								{% for fv in query_filtersBuffer %}
+									{% ifnotequal fv.id  facetValue.id  %}
+										&amp;filter={{fv.id}}
+									{% endifnotequal %}
+								{% endfor %}"		
+							class="fatherfacet">{{facetValue|extract_father}}</a> &gt;&gt;
+						{% endif %}
+						<b>{{facetValue.displayname}}</b> ({{facetValue.facet.name}})</span>&nbsp;
+						<a id="remove_button" title="Remove this filter" href="?resulttype={{result_typeObj.uniquename}}
+							{% for fv in query_filtersBuffer %}
+								{% ifnotequal fv.id  facetValue.id  %}
+									&amp;filter={{fv.id}}
+								{% endifnotequal %}
+							{% endfor %}">[remove]</a>
+					{% if not forloop.last %}
+						<br />
+						 &amp;&amp;  
+					{% endif %}
+
+				{% endfor %}
+							
+			</li>
+		                                   
+			
+		{% endif  %}
+			
+				
 		{# {% if not djfacet_splashpage %} #}
-		{% if djfacet_singlefacet %}
-		
-			{% if not query_filtersBuffer %}
-				<!-- CASE 1 :: IT'S THE SINGLE_FACET PAGE WITH NO ARGS  -->
-			
-				<br /><br />	
-				<li>Select one of the options below or <a href="{{url_prefix}}?resulttype={{result_typeObj.uniquename}}&amp;ordering={{ordering}}{{newurl_stub}}">go back</a></li>
-		
-			{% else %}
-
-				<!-- CASE 2 :: SINGLE_FACET PAGE IN THE MIDDLE OF A SEARCH  -->
-					&nbsp;&nbsp;&nbsp;&nbsp;
-				    <li>Current filter{{ query_filtersBuffer|pluralize }}:
-
-						{% for facetValue in  query_filtersBuffer %}
-
-							<span class="activeFilter"><b>{{facetValue.displayname}}</b> ({{facetValue.facet.name}})</span>&nbsp;
-							{% if not forloop.last %}
-								 &amp;&amp;  
-							{% endif %}
-
-						{% endfor %}
-									
-					</li>
-				                                    
-					 <br /><br />
-					<li>Add another filter by selecting one of the options below or <a href="{{url_prefix}}?resulttype={{result_typeObj.uniquename}}&amp;ordering={{ordering}}{{newurl_stub}}">go back</a>.</li>			                                      
-
-
-			{% endif  %}		
-		
-		{% endif  %}		
+		{# {% if djfacet_singlefacet %} #}
+		{#  #}
+		{# 	{% if not query_filtersBuffer %} #}
+		{# 		<!-- CASE 1 :: IT'S THE SINGLE_FACET PAGE WITH NO ARGS  --> #}
+		{# 	 #}
+		{# 		<br /><br />	 #}
+		{# 		<li>Select one of the options below or <a href="{{url_prefix}}?resulttype={{result_typeObj.uniquename}}&amp;ordering={{ordering}}{{newurl_stub}}">go back</a></li> #}
+		{#  #}
+		{# 	{% else %} #}
+		{#  #}
+		{# 		<!-- CASE 2 :: SINGLE_FACET PAGE IN THE MIDDLE OF A SEARCH  --> #}
+		{# 			&nbsp;&nbsp;&nbsp;&nbsp; #}
+		{# 		    <li>Current filter{{ query_filtersBuffer|pluralize }}: #}
+		{#  #}
+		{# 				{% for facetValue in  query_filtersBuffer %} #}
+		{#  #}
+		{# 					<span class="activeFilter"><b>{{facetValue.displayname}}</b> ({{facetValue.facet.name}})</span>&nbsp; #}
+		{# 					{% if not forloop.last %} #}
+		{# 						 &amp;&amp;   #}
+		{# 					{% endif %} #}
+		{#  #}
+		{# 				{% endfor %} #}
+		{# 							 #}
+		{# 			</li> #}
+		{# 		                                     #}
+		{# 			 <br /><br /> #}
+		{# 			<li>Add another filter by selecting one of the options below or <a href="{{url_prefix}}?resulttype={{result_typeObj.uniquename}}&amp;ordering={{ordering}}{{newurl_stub}}">go back</a>.</li>			                                       #}
+		{#  #}
+		{#  #}
+		{# 	{% endif  %}		 #}
+		{#  #}
+		{# {% endif  %}	 #}	
 		
 	
 

File demoproject/apps/djfacet/templates/djfacet/facetedbrowser.html

             <div class="mod facetedNavigation">  
    
 
-				{% include "djfacet/components/control_selected.html" %}
+				{# {% include "djfacet/components/control_selected.html" %} #}
 
 
 				{% if not single_item %}

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

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

File demoproject/mytemplates/index.html

-Hello there
-<br /><br />
-This is a demo of DJFacet - a faceted search engine built on top of Django.
-<br /><br />
-- Ok <a href="djfacet/">let's take a look!</a>
-<br /><br />
-- Mmm too early, I'd better <a href="http://michelepasin.org/support/djfacet/docs/">browse the docs</a> first.
+<h2>Hello world...</h2>
+<h3>This is a demo of DjFacet - a faceted search engine built on top of Django.</h3>
+<li>Ok <a href="djfacet/">let's take a look!</a></li>
+<li>Mmm too early, I'd better <a href="http://michelepasin.org/support/djfacet/docs/">browse the docs</a> first.</li>
 
 
 
 <br /><br /><br /><br />
 <hr />
-<h3>Currently active Djfacet options:</h3>
+<h3>Currently Active DjFacet Options:</h3>
 
 
 

File demoproject/settings.py

 
 # ======= DJFACET options: showing all of them for description =======
 
-DJF_CACHE = True   # default value = False
+DJF_CACHE = False   # default value = False
 DJF_AJAX = False  	# default value = 'vertical' 
 DJF_MAXRES_PAGE = 50  # default value = 50
 DJF_MAXRES_FACET = 5  # default value = 5 
 
 DJFACET: A faceted browser search engine built on top of Django. 
 
-VERSION: 0.9.9.5
+VERSION: 0.9.9.6
 
 ==+==
 
 
 The DJFacet engine itself can be found in the folder demoproject/apps/djfacet: https://bitbucket.org/magicrebirth/djfacet/src/tip/demoproject/apps/djfacet
 
+This is what you need to include in your own project if you want to use the djfacet app.
+
 -----------------------------------------
 
 Source code available on BitBucket: https://bitbucket.org/magicrebirth/djfacet/
 To access the admin login as: usr: test / psw: test 
 (you'll have administrator rights)
 
-
+DJFacet is mounted on http://127.0.0.1:8000/djfacet/
 
 
 
 =============
 ===============
 
+
+
+2012-05-29
+-----------------------------------------
+* facetedbrowser.html: removed controls_selected 
+* control-bar.html: updated the way selected facet values are presented
+* single-facet: updated breadcrumbds rendering
+
+
 2012-05-23
 -----------------------------------------
 * fixed bug that prevented mptt hierarchy navigation when using cached values