Add controls on shortcuts handing
authorThierry Florac <thierry.florac@onf.fr>
Wed, 07 May 2014 17:56:55 +0200
changeset 8 81038d891303
parent 7 88003e3442fc
child 9 f5fda123ea09
Add controls on shortcuts handing
src/ztfy/myams/templates/layout.pt
--- a/src/ztfy/myams/templates/layout.pt	Wed May 07 12:14:01 2014 +0200
+++ b/src/ztfy/myams/templates/layout.pt	Wed May 07 17:56:55 2014 +0200
@@ -82,12 +82,14 @@
 					</div>
 					<!-- END AJAX-DROPDOWN -->
 
-					<a href="#" id="show-shortcut" tal:omit-tag="not:static/include_user_shortcuts">
-						<span class="login-name" tal:content="request/principal/title">FLORAC Thierry</span>
-						<i class="fa fa-angle-down" tal:condition="static/include_user_shortcuts"></i>
-					</a>
-					<div id="shortcut" tal:condition="static/include_user_shortcuts"
-						 tal:content="structure provider:myams.shortcuts"></div>
+					<tal:var define="shortcuts provider:myams.shortcuts;
+									 display_shortcuts python:shortcuts and static.include_user_shortcuts">
+						<a href="#" id="show-shortcut" tal:omit-tag="not:display_shortcuts">
+							<span class="login-name" tal:content="request/principal/title">FLORAC Thierry</span>
+							<i class="fa fa-angle-down" tal:condition="display_shortcuts"></i>
+						</a>
+						<div id="shortcut" tal:condition="display_shortcuts" tal:content="structure shortcuts"></div>
+					</tal:var>
 				</span>
 
 			</div>