Updated glossary templates
authorThierry Florac <tflorac@ulthar.net>
Fri, 04 Jan 2019 09:40:01 +0100
changeset 336 5e39ba665e50
parent 335 c8851f79e2a1
child 337 8ff15f47b281
Updated glossary templates
src/pyams_default_theme/features/glossary/templates/glossary.pt
src/pyams_default_theme/features/thesaurus/templates/associated-terms.pt
src/pyams_default_theme/features/thesaurus/templates/footer.pt
src/pyams_default_theme/features/thesaurus/templates/header.pt
--- a/src/pyams_default_theme/features/glossary/templates/glossary.pt	Fri Jan 04 09:39:43 2019 +0100
+++ b/src/pyams_default_theme/features/glossary/templates/glossary.pt	Fri Jan 04 09:40:01 2019 +0100
@@ -14,7 +14,8 @@
 				<div class="clearfix spacer"></div>
 				<tal:loop repeat="term view.thesaurus.terms.values()">
 					<div class="col-md-3 col-sm-4 col-xs-6" tal:condition="term.status == 'published'">
-						<span class="thesaurus-term">${term.alt or term.label}</span>
+						<span data-term="${term.label}"
+							  class="thesaurus-term">${term.alt or term.label}</span>
 					</div>
 				</tal:loop>
 				<div class="clearfix spacer"></div>
--- a/src/pyams_default_theme/features/thesaurus/templates/associated-terms.pt	Fri Jan 04 09:39:43 2019 +0100
+++ b/src/pyams_default_theme/features/thesaurus/templates/associated-terms.pt	Fri Jan 04 09:40:01 2019 +0100
@@ -3,33 +3,38 @@
 	<div tal:condition="term.generic">
 		<strong i18n:translate="">Term family:</strong>
 		<span class="thesaurus-term"
-			  tal:omit-tag="term.status != 'published'">${term.generic.alt or term.generic.label}</span>
+			  data-term="${term.generic.label}"
+			  tal:omit-tag="term.status == 'archived'">${term.generic.alt or term.generic.label}</span>
 	</div>
 	<div tal:condition="term.specifics">
 		<strong i18n:translate="">Specific terms:</strong>
 		<tal:loop repeat="specific term.specifics">
 			<span class="thesaurus-term"
-				  tal:omit-tag="specific.status != 'published'">${specific.alt or specific.label}</span><tal:if condition="not repeat.specific.end()">,</tal:if>
+				  data-term="${specific.label}"
+				  tal:omit-tag="specific.status == 'archived'">${specific.alt or specific.label}</span><tal:if condition="not repeat.specific.end()">,</tal:if>
 		</tal:loop>
 	</div>
 	<div tal:condition="term.associations">
 		<strong i18n:translate="">Associated terms:</strong>
 		<tal:loop repeat="association term.associations">
 			<span class="thesaurus-term"
-				  tal:omit-tag="association.status != 'published'">${association.alt or association.label}</span><tal:if condition="not repeat.association.end()">,</tal:if>
+				  data-term="${association.label}"
+				  tal:omit-tag="association.status == 'archived'">${association.alt or association.label}</span><tal:if condition="not repeat.association.end()">,</tal:if>
 		</tal:loop>
 	</div>
 	<div tal:condition="term.used_for">
 		<strong i18n:translate="">Synonyms:</strong>
 		<tal:loop repeat="synonym term.used_for">
 			<span class="thesaurus-term"
-				  tal:omit-tag="synonym.status != 'published'">${synonym.alt or synonym.label}</span><tal:if condition="not repeat.synonym.end()">,</tal:if>
+				  data-term="${synonym.label}"
+				  tal:omit-tag="synonym.status == 'archived'">${synonym.alt or synonym.label}</span><tal:if condition="not repeat.synonym.end()">,</tal:if>
 		</tal:loop>
 	</div>
 	<div tal:condition="term.usage">
 		<strong i18n:translate="">See:</strong>
 		<span class="thesaurus-term"
-			  tal:omit-tag="term.usage.status != 'published'">${term.usage.alt or term.usage.label}</span>
+			  data-term="${term.usage.label}"
+			  tal:omit-tag="term.usage.status == 'archived'">${term.usage.alt or term.usage.label}</span>
 	</div>
 	<br />
 </tal:var>
\ No newline at end of file
--- a/src/pyams_default_theme/features/thesaurus/templates/footer.pt	Fri Jan 04 09:39:43 2019 +0100
+++ b/src/pyams_default_theme/features/thesaurus/templates/footer.pt	Fri Jan 04 09:40:01 2019 +0100
@@ -6,6 +6,6 @@
 		<strong i18n:translate="">Note</strong>
 	</div>
 	<div class="panel-body">
-		${structure:tales:html(context.note, 'markdown')}
+		${structure:tales:html(context.note, 'markdown;glossary')}
 	</div>
 </div>
\ No newline at end of file
--- a/src/pyams_default_theme/features/thesaurus/templates/header.pt	Fri Jan 04 09:39:43 2019 +0100
+++ b/src/pyams_default_theme/features/thesaurus/templates/header.pt	Fri Jan 04 09:40:01 2019 +0100
@@ -1,3 +1,3 @@
 <div tal:condition="context.definition">
-	${structure:tales:html(context.definition, 'markdown')}
+	${structure:tales:html(context.definition, 'markdown;glossary')}
 </div>
\ No newline at end of file