← Back to team overview

team4alfanous team mailing list archive

[Branch ~team4alfanous/alfanous/alfanous-git] Rev 548: Show derivations of each query keyword in the WUI

 

------------------------------------------------------------
revno: 548
committer: Assem Chelli <assem.ch@xxxxxxxxx>
timestamp: Fri 2013-02-01 23:46:00 +0100
message:
  Show derivations of each query keyword in the WUI
modified:
  src/alfanous-django/templates/aya_results.html
  src/alfanous-django/wui/static/css/screen.css


--
lp:alfanous
https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git

Your team Alfanous team is subscribed to branch lp:alfanous.
To unsubscribe from this branch go to https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git/+edit-subscription
=== modified file 'src/alfanous-django/templates/aya_results.html'
--- src/alfanous-django/templates/aya_results.html	2013-01-29 21:26:42 +0000
+++ src/alfanous-django/templates/aya_results.html	2013-02-01 22:46:00 +0000
@@ -58,6 +58,7 @@
 							<div class='details_label word_stat1'> {{ _("ayates") }} |  {{ wordstat.nb_ayas }} </div>
 							
 							<br />
+							<div class='word_extra_details'>
 							<div class='details_label word_vocalization_nb'> {{ _("vocalizations") }} | {{ wordstat.nb_vocalizations }} </div>
 							{% for vocalization in wordstat.vocalizations %} 
 								{% with bidi.fields.aya_|add:":"|add:vocalization|add:"" as new_query %}
@@ -66,6 +67,7 @@
 								<div class='details_label word_vocalization clickable quran'> {{ vocalization }} </div></a>
 							{% endfor %}
 							
+							
 							{% ifnotequal wordstat.nb_synonyms 0 %}
 								<br />
 								<div class='details_label word_synonym_nb'> {{ _("synonyms") }} | {{ wordstat.nb_synonyms }} </div>
@@ -76,12 +78,23 @@
 								{% with "~"|add:wordstat.word as new_query %}
 									<a class='no_decoration' href="?{% build_search_link params  new_query 1 False %}"> 
 								{% endwith %}
-								<div class='details_label word_synonym clickable quran'> {{ _("ALL") }} | ~{{ wordstat.word }}  </div></a>
-							{% endifnotequal %}
-							
-						
-							<br />
-							<div class='details_label word_derivation_nb'> {{ _("derivations") }} | {{ wordstat.nb_derivations }} </div>
+								<div class='details_label word_synonym clickable quran'>  ~  </div></a>
+							{% endifnotequal %}
+							
+			
+							{% ifnotequal wordstat.nb_derivations 0 %}
+								<br />
+								<div class='details_label word_derivation_nb'> {{ _("derivations") }} | {{ wordstat.nb_derivations }} </div> 
+								{% for derivation in wordstat.derivations %} 
+									<a class='no_decoration' href="?{% build_search_link params derivation 1 False %}"> 
+									<div class='details_label word_derivation clickable quran'> {{ derivation }} </div></a>
+								{% endfor %}
+								{% with ">"|add:wordstat.word as new_query %}
+									<a class='no_decoration' href="?{% build_search_link params  new_query 1 False %}"> 
+								{% endwith %}
+								<div class='details_label word_derivation clickable quran'>  >  </div></a>
+							{% endifnotequal %}
+							
 							
 						{% for annotation_word, parts in wordstat.annotations.items %}
 							{% for part_order, annotation_detail in parts.items %} 
@@ -142,6 +155,7 @@
 							{% endfor %}
 						{% endfor %}
 						   </div>
+						   </div>
 					 	  </p>	
 				{% endfor %}
 				</div> 

=== modified file 'src/alfanous-django/wui/static/css/screen.css'
--- src/alfanous-django/wui/static/css/screen.css	2013-01-20 14:45:50 +0000
+++ src/alfanous-django/wui/static/css/screen.css	2013-02-01 22:46:00 +0000
@@ -480,7 +480,7 @@
 	display: inline;
 	font-size: 12px;
 	padding: 1px 5px 2px 5px;
-	margin: 1px 1px 0px 2px;
+	margin: 1px 1px 1px 2px;
 }
 
 .word_item {
@@ -552,6 +552,13 @@
 	color: #FFF;
 }
 
+.word_derivation {
+	background-color: #FFF;
+	color: #A90;
+	padding: 5px 2px 4px 2px;
+	/* font-size:100%;*/
+}
+
 
 
 .word_annotation_nb {
@@ -670,10 +677,16 @@
 .term9, .term19 { color: #5C3; }
 
 
-.word_details, .sura_details, .aya_details, .sura_stat_details, .theme_details {
+.word_details,  .sura_details, .aya_details, .sura_stat_details, .theme_details {
 	margin: 8px 5px 2px 20px;
 }
 
+.word_extra_details {
+	margin: 5px 5px 10px 40px;
+	padding: 3px 1px 1px 1px;
+}
+
+
 .aya_stat0, .sura_stat1 {
 	background-color: #00A;
 	color: #FFF;