summaryrefslogtreecommitdiffstats
path: root/tabellio/searchform/docsearch.pt
diff options
context:
space:
mode:
Diffstat (limited to 'tabellio/searchform/docsearch.pt')
-rw-r--r--tabellio/searchform/docsearch.pt34
1 files changed, 32 insertions, 2 deletions
diff --git a/tabellio/searchform/docsearch.pt b/tabellio/searchform/docsearch.pt
index ead9ea1..13984f5 100644
--- a/tabellio/searchform/docsearch.pt
+++ b/tabellio/searchform/docsearch.pt
@@ -23,8 +23,9 @@
<dl class="enableFormTabbing" id="search-tabs">
<dt id="fieldsetlegend-documents">Documents parlementaires</dt>
<dd id="fieldset-documents">
- <form method="post" action="./#resultsbox">
<div class="newsearch"><a href="./#fieldsetlegend-documents">Nouvelle recherche</a></div>
+ <div class="help-page"><a href="./aide-en-ligne">Aide en ligne</a></div>
+ <form method="post" action="./#resultsbox">
<div tal:replace="structure view/document_search_form"/>
</form>
@@ -64,8 +65,9 @@
</dd>
<dt id="fieldsetlegend-dossiers">Dossiers parlementaires</dt>
<dd id="fieldset-dossiers">
- <form method="post" action="./#resultsbox">
<div class="newsearch"><a href="./#fieldsetlegend-dossiers">Nouvelle recherche</a></div>
+ <div class="help-page"><a href="./aide-en-ligne">Aide en ligne</a></div>
+ <form method="post" action="./#resultsbox">
<div tal:replace="structure view/dossier_search_form"/>
</form>
@@ -105,6 +107,7 @@
<dt id="fieldsetlegend-questions">Questions &amp; interpellations</dt>
<dd id="fieldset-questions">
<div class="newsearch"><a href="./#fieldsetlegend-questions">Nouvelle recherche</a></div>
+ <div class="help-page"><a href="./aide-en-ligne">Aide en ligne</a></div>
<form method="post" action="./#resultsbox">
<div tal:replace="structure view/question_search_form"/>
</form>
@@ -183,10 +186,37 @@
<div tal:replace="structure provider:plone.belowcontentbody" />
+<ul id="help-links" style="display: none;">
+<li tal:repeat="link view/get_help_links"><a
+ class="help-link"
+ tal:attributes="href link/absolute_url; id link/id; title link/Description"
+ tal:content="link/Title">help text</a></li>
+</ul>
+
<script type="text/javascript" tal:content="string: var PORTAL_URL='${view/portal_url}';"></script>
<script metal:use-macro="view/js_macros/macros/labelboxes"></script>
<script metal:use-macro="view/js_macros/macros/sorton"></script>
<script metal:use-macro="view/js_macros/macros/droppablecheckboxes"></script>
+<script type="text/javascript">
+function setup_help_link(index, elem)
+{
+ var parts = elem.id.split('-');
+ var fieldname = parts[parts.length-1];
+ var help_link = $('#aide-'+fieldname).clone();
+ console.log('help_link:', help_link);
+ if (help_link.length > 0) {
+ help_link.text('?');
+ $(elem).find('label.horizontal').append(help_link);
+ }
+}
+
+(function($) {
+ $().ready(function() {
+ $('div.field').each(setup_help_link);
+ });
+})(jQuery);
+
+</script>
</tal:block>
</tal:main-macro>