mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Thesaurus refactor
This commit is contained in:
187
templates/web/thesaurus/accept.html.twig
Normal file
187
templates/web/thesaurus/accept.html.twig
Normal file
@@ -0,0 +1,187 @@
|
||||
{% if dlg %}
|
||||
{% set opener = "window.dialogArguments.win" %}
|
||||
{% else %}
|
||||
{% set opener = "opener" %}
|
||||
{% endif %}
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'thesaurus:: accepter...' %}</title>
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
<style type="text/css">
|
||||
.path_separator
|
||||
{
|
||||
color:#ffff00;
|
||||
}
|
||||
.main_term
|
||||
{
|
||||
font-weight:900;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="/skins/thesaurus/xmlhttp.js"></script>
|
||||
<script type="text/javascript">
|
||||
function loaded()
|
||||
{
|
||||
window.name="ACCEPT";
|
||||
self.focus();
|
||||
}
|
||||
function ok()
|
||||
{
|
||||
as = "";
|
||||
if((n=document.forms[0].as.length) > 0)
|
||||
{
|
||||
for(i=0; i<n && as==""; i++)
|
||||
{
|
||||
if(document.forms[0].as[i].checked)
|
||||
as = document.forms[0].as[i].value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
as = document.forms[0].as.value;
|
||||
}
|
||||
if(as == "TS")
|
||||
{
|
||||
url = "xmlhttp/acceptcandidates.x.php";
|
||||
parms = "bid={{ bid | url_encode }}";
|
||||
parms += "&piv={{ piv | url_encode }}";
|
||||
parms += "&cid[]={{ src | url_encode }}";
|
||||
parms += "&pid={{ tgt | url_encode }}";
|
||||
parms += "&typ=TS";
|
||||
|
||||
ret = loadXMLDoc(url, parms, true);
|
||||
|
||||
refresh = ret.getElementsByTagName("refresh");
|
||||
for(i=0; i<refresh.length; i++)
|
||||
{
|
||||
switch(refresh.item(i).getAttribute("type"))
|
||||
{
|
||||
case "CT":
|
||||
{{ opener }}.reloadCtermsBranch(refresh.item(i).getAttribute("id"));
|
||||
break;
|
||||
case "TH":
|
||||
{{ opener }}.reloadThesaurusBranch(refresh.item(i).getAttribute("id"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
self.close();
|
||||
}
|
||||
else if(as == "SY")
|
||||
{
|
||||
url = "xmlhttp/acceptcandidates.x.php";
|
||||
parms = "bid={{ bid | url_encode }}";
|
||||
parms += "&piv={{ piv | url_encode }}";
|
||||
parms += "&cid[]={{ src | url_encode }}";
|
||||
parms += "&pid={{ tgt | url_encode }}";
|
||||
parms += "&typ=SY";
|
||||
|
||||
ret = loadXMLDoc(url, parms, true);
|
||||
|
||||
refresh = ret.getElementsByTagName("refresh");
|
||||
for(i=0; i<refresh.length; i++)
|
||||
{
|
||||
switch(refresh.item(i).getAttribute("type"))
|
||||
{
|
||||
case "CT":
|
||||
{{ opener }}.reloadCtermsBranch(refresh.item(i).getAttribute("id"));
|
||||
break;
|
||||
case "TH":
|
||||
{{ opener }}.reloadThesaurusBranch(refresh.item(i).getAttribute("id"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
self.close();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body id="desktop" onload="loaded();" class="dialog">
|
||||
|
||||
{% if not cterm_found %}
|
||||
<center>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
{% trans 'thesaurus:: removed_src' %}
|
||||
<br/>
|
||||
<br/>
|
||||
{% trans 'thesaurus:: refresh' %}
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<input style="position:relative; z-index:2; width:100px" type="button" id="cancel_button" value="{% trans 'boutton::fermer' %}" onclick="self.close();">
|
||||
{% else %}
|
||||
{% if not term_found %}
|
||||
<center>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
{% trans 'thesaurus:: removed tgt' %}
|
||||
<br/>
|
||||
<br/>
|
||||
{% trans 'thesaurus:: refresh' %}
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<input style="position:relative; z-index:2; width:100px" type="button" id="cancel_button" value="{% trans 'boutton::fermer' %}" onclick="self.close();">
|
||||
{% else %}
|
||||
{% if acceptable %}
|
||||
<center>
|
||||
<br/>
|
||||
<form method="?" action="?" target="?" onsubmit="return(false);">
|
||||
<input type="hidden" name="bid" value="{{ bid | url_encode }}">
|
||||
<input type="hidden" name="piv" value="{{ piv | url_encode }}">
|
||||
<input type="hidden" name="src" value="{{ src | url_encode }}">
|
||||
<input type="hidden" name="tgt" value="{{ tgt | url_encode }}">
|
||||
<input type="hidden" name="tgt" value="{{ tgt | url_encode }}">
|
||||
{% if nts == 0 %}
|
||||
{% trans 'thesaurus:: Accepter le terme comme' %}
|
||||
<br/><br/><h4>{{ fullpath_src | raw }}</h4><br/><br/>
|
||||
<br/>
|
||||
<input type='radio' name='as' value='TS' checked>{% trans 'thesaurus:: comme terme specifique' %}
|
||||
<br/><br/>
|
||||
<input type='radio' name='as' value='SY'>
|
||||
{% set fullpath_tgt_raw = fullpath_tgt | raw %}
|
||||
{% trans %}
|
||||
thesaurus:: comme synonyme de {{ fullpath_tgt_raw }}
|
||||
{% endtrans %}
|
||||
<br/>
|
||||
{% else %}
|
||||
<br/><br/><h4>{{ fullpath_src | raw }}</h4><br/><br/>
|
||||
{% trans 'thesaurus:: Accepter la branche comme' %}
|
||||
{% trans 'thesaurus:: comme terme specifique' %}
|
||||
<br/><br/><h4>{{ fullpath_tgt | raw }}</h4><br/><br/>
|
||||
<input type='hidden' name='as' value='TS'>
|
||||
{% endif %}
|
||||
<br/>
|
||||
<br/>
|
||||
<input style="position:relative; z-index:2; width:100px" type="button" id="ok_button" value="{% trans 'boutton::valider' %}" onclick="ok();">
|
||||
|
||||
<input style="position:relative; z-index:2; width:100px" type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="self.close();">
|
||||
</form>
|
||||
</center>
|
||||
{% else %}
|
||||
<center>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
{% trans %}
|
||||
thesaurus:: A cet emplacement du thesaurus , un candidat du champ {{ cfield }} ne peut etre accepte
|
||||
{% endtrans %}
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<input style="position:relative; z-index:2; width:100px" type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="self.close();">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
119
templates/web/thesaurus/export-text-dialog.html.twig
Normal file
119
templates/web/thesaurus/export-text-dialog.html.twig
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'thesaurus:: export au format texte' %}</title>
|
||||
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
<script type="text/javascript">
|
||||
var format = "text";
|
||||
|
||||
function clkBut(button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case "submit":
|
||||
document.forms[0].action = "export_" + format + ".php";
|
||||
document.forms[0].submit();
|
||||
break;
|
||||
case "cancel":
|
||||
self.returnValue = null;
|
||||
self.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
function loaded()
|
||||
{
|
||||
chgFormat();
|
||||
}
|
||||
function ckis()
|
||||
{
|
||||
document.getElementById("submit_button").disabled = document.forms[0].t.value=="";
|
||||
}
|
||||
function enable_inputs(o, stat)
|
||||
{
|
||||
if(o.nodeType==1) // element
|
||||
{
|
||||
if(o.nodeName=='INPUT')
|
||||
{
|
||||
if(stat)
|
||||
o.removeAttribute('disabled');
|
||||
else
|
||||
o.setAttribute('disabled', true);
|
||||
}
|
||||
for(var oo=o.firstChild; oo; oo=oo.nextSibling)
|
||||
enable_inputs(oo, stat)
|
||||
}
|
||||
}
|
||||
function chgFormat()
|
||||
{
|
||||
var i, f;
|
||||
url = "./export_"+format+".php?bid={{ bid }}&piv={{ piv }}&id={{ id }}&typ={{ typ }}&dlg=0&smp=1";
|
||||
url += "&osl=" + (document.forms[0].osl[0].checked ? "1" : "0");
|
||||
url += "&iln=" + (document.forms[0].iln.checked ? "1" : "0");
|
||||
url += "&hit=" + (document.forms[0].hit.checked ? "1" : "0");
|
||||
url += "&ilg=" + (document.forms[0].ilg.checked ? "1" : "0");
|
||||
document.getElementById("ifrsample").src = url;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="loaded();" class="dialog">
|
||||
<center>
|
||||
<br/>
|
||||
<form onsubmit="clkBut('submit');return(false);" action="export_topics.php" target="EXPORT2">
|
||||
<input type="hidden" name="bid" value="{{ bid }}" >
|
||||
<input type="hidden" name="piv" value="{{ piv }}" >
|
||||
<input type="hidden" name="id" value="{{ id }}" >
|
||||
<input type="hidden" name="typ" value="{{ typ }}" >
|
||||
<input type="hidden" name="dlg" value="{{ dlg }}" >
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans 'thesaurus:: options d\'export : ' %}</th>
|
||||
<th>{% trans 'thesaurus:: example' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" style="padding:5px">
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='ofm' checked value='text'>
|
||||
{% trans 'thesaurus:: export au format texte' %}
|
||||
</div>
|
||||
<div id='subform_text' style="margin-left:10px;">
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='osl' checked value='1' onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: exporter avec les synonymes sur la meme ligne' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='osl' value='0' onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: exporter avec une ligne par synonyme' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='checkbox' name='iln' value='1' onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: export : numeroter les lignes ' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='checkbox' name='ilg' value='1' onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: export : inclure la langue' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='checkbox' name='hit' value='1' onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: export : inclure les hits' %}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td valign="top" style="padding:10px">
|
||||
<iframe id="ifrsample" frameborder="0" scrolling="No" style="width:400px;height:150px;overflow:hidden;border: 0px solid #b0b0b0; " ></iframe>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<input type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:100px;">
|
||||
|
||||
<input type="button" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');" style="width:100px;">
|
||||
</form>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
18
templates/web/thesaurus/export-text.html.twig
Normal file
18
templates/web/thesaurus/export-text.html.twig
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'thesaurus:: export au format texte' %}</title>
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
<script type="text/javascript">
|
||||
function loaded()
|
||||
{
|
||||
self.focus();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body id="idbody" onload="loaded();" style="background-color:#ffffff" >
|
||||
<pre style='font-size: {% if smp %}9{% else %}12{% endif %}px;'>
|
||||
{{ output }}
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
144
templates/web/thesaurus/export-topics-dialog.html.twig
Normal file
144
templates/web/thesaurus/export-topics-dialog.html.twig
Normal file
@@ -0,0 +1,144 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'thesaurus:: export en topics' %}</title>
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
<script type="text/javascript">
|
||||
var format = '???';
|
||||
function clkBut(button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case "submit":
|
||||
document.forms[0].target = (format == 'tofiles' ? "_self" : "EXPORT2");
|
||||
document.forms[0].submit();
|
||||
break;
|
||||
case "cancel":
|
||||
self.returnValue = null;
|
||||
self.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
function loaded()
|
||||
{
|
||||
chgFormat();
|
||||
}
|
||||
function ckis()
|
||||
{
|
||||
document.getElementById("submit_button").disabled = document.forms[0].t.value=="";
|
||||
}
|
||||
function enable_inputs(o, stat)
|
||||
{
|
||||
if(o.nodeType==1) // element
|
||||
{
|
||||
if(o.nodeName=='INPUT')
|
||||
{
|
||||
if(stat)
|
||||
o.removeAttribute('disabled');
|
||||
else
|
||||
o.setAttribute('disabled', true);
|
||||
}
|
||||
for(var oo=o.firstChild; oo; oo=oo.nextSibling)
|
||||
enable_inputs(oo, stat)
|
||||
}
|
||||
}
|
||||
function chgFormat()
|
||||
{
|
||||
var i, f;
|
||||
for(i=0; i<document.forms[0].ofm.length; i++)
|
||||
{
|
||||
f = document.forms[0].ofm[i].value;
|
||||
if(document.forms[0].ofm[i].checked)
|
||||
{
|
||||
format = f;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="loaded();" class="dialog">
|
||||
<center>
|
||||
<form onsubmit="clkBut('submit');return(false);" action="export_topics.php">
|
||||
<input type="hidden" name="bid" value="{{ bid }}" >
|
||||
<input type="hidden" name="piv" value="{{ piv }}" >
|
||||
<input type="hidden" name="id" value="{{ id }}" >
|
||||
<input type="hidden" name="typ" value="{{ typ }}" >
|
||||
<input type="hidden" name="dlg" value="{{ dlg }}" >
|
||||
<input type="hidden" name="obr" value="{{ obr }}" >
|
||||
|
||||
<div style="padding:10px;">
|
||||
<div class="x3Dbox">
|
||||
<span class="title">{% trans 'thesaurus:: exporter' %}</span>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='ofm' checked value='tofiles' onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: exporter vers topics pour toutes les langues' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='ofm' value='toscreen' onclick="chgFormat();">
|
||||
{% trans %}
|
||||
thesaurus:: exporter a l'ecran pour la langue {{ piv }}
|
||||
{% endtrans %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="x3Dbox">
|
||||
<span class="title">{% trans 'phraseanet:: tri' %}</span>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='checkbox' name='srt' checked onclick="chgFormat();">
|
||||
{% trans 'phraseanet:: tri par date' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="x3Dbox">
|
||||
<span class="title">{% trans 'thesaurus:: recherche' %}</span>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='sth' value="1" checked onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: recherche thesaurus *:"query"' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='sth' value="0" onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: recherche fulltext' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='checkbox' name='sand' onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: question complete (avec operateurs)' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="x3Dbox">
|
||||
<span class="title">{% trans 'thesaurus:: presentation' %}</span>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='obrf' value="from_itf_closable" checked onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: presentation : branches refermables' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='obrf' value="from_itf_static" onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: presentation : branche ouvertes' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='obrf' value="all_opened_closable" onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: tout deployer - refermable' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='obrf' value="all_opened_static" onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: tout deployer - statique' %}
|
||||
</div>
|
||||
<div style="white-space:nowrap">
|
||||
<input type='radio' name='obrf' value="all_closed" onclick="chgFormat();">
|
||||
{% trans 'thesaurus:: tout fermer' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:100px;">
|
||||
|
||||
<input type="button" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');" style="width:100px;">
|
||||
</form>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
43
templates/web/thesaurus/export-topics.html.twig
Normal file
43
templates/web/thesaurus/export-topics.html.twig
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'thesaurus:: export en topics' %}</title>
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
<style>
|
||||
.toscreen
|
||||
{
|
||||
background-color:#ffffff;
|
||||
}
|
||||
.tofiles
|
||||
{
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
function loaded()
|
||||
{
|
||||
self.focus();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body id="idbody" onload="loaded();" class="dialog">
|
||||
<div class="{{ ofm }}">
|
||||
|
||||
{% for lng, export in lngs %}
|
||||
<pre style='font-size: 12px;'>
|
||||
{{ export }}
|
||||
</pre>
|
||||
{% endfor %}
|
||||
|
||||
{% if ofm == 'tofiles' %}
|
||||
<center>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<input type="button" value="{% trans 'boutton::fermer' %}" onclick="self.close();" style="width:100px;">
|
||||
</center>
|
||||
{% endif %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
76
templates/web/thesaurus/import-dialog.html.twig
Normal file
76
templates/web/thesaurus/import-dialog.html.twig
Normal file
@@ -0,0 +1,76 @@
|
||||
{% if dlg is not none %}
|
||||
{% set opener = "window.dialogArguments.win" %}
|
||||
{% else %}
|
||||
{% set opener = "opener" %}
|
||||
{% endif %}
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<base target="_self">
|
||||
<title>{% trans 'thesaurus:: Importer' %}</title>
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
<script type="text/javascript">
|
||||
function clkBut(button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case "submit":
|
||||
document.forms[0].target='IFRIM';
|
||||
document.forms[0].submit();
|
||||
break;
|
||||
case "cancel":
|
||||
self.returnValue = null;
|
||||
self.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
function loaded()
|
||||
{
|
||||
}
|
||||
function importDone(err)
|
||||
{
|
||||
if(!err)
|
||||
{
|
||||
{{ opener }}.reload();
|
||||
self.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(err);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="loaded();" class="dialog">
|
||||
<br/>
|
||||
<form onsubmit="clkBut('submit');return(false);" action="import.php" enctype="multipart/form-data" method="post">
|
||||
<input type="hidden" name="bid" value="{{ bid }}" >
|
||||
<input type="hidden" name="piv" value="{{ piv }}" >
|
||||
<input type="hidden" name="id" value="{{ id }}" >
|
||||
<input type="hidden" name="dlg" value="{{ dlg }}" >
|
||||
<div>
|
||||
<div style="float:right">{% trans 'thesaurus:: langue par default' %} <img src='/skins/icons/flag_18.gif' /> {{ piv }}</div>
|
||||
</div>
|
||||
<br/>
|
||||
{% trans 'Fichier ASCII tabule' %}
|
||||
<input type="file" name="fil" /> (max 16Mo)
|
||||
<br/>
|
||||
|
||||
<div style="text-align:center">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="text-align:left"><input type="checkbox" disabled="disabled" name="dlk" checked="checked">{% trans 'thesaurus:: supprimer les liens des champs tbranch' %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:left"><input type="checkbox" disabled="disabled" name="rdx">{% trans 'thesaurus:: reindexer la base apres l\'import' %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<input type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:100px;">
|
||||
|
||||
<input type="button" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');" style="width:100px;">
|
||||
</div>
|
||||
</form>
|
||||
<iframe style="display:block; height:50px;" name="IFRIM"></iframe>
|
||||
</body>
|
||||
</html>
|
5
templates/web/thesaurus/import.html.twig
Normal file
5
templates/web/thesaurus/import.html.twig
Normal file
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<body onload='parent.importDone("{{ err | e('js') }}");'>
|
||||
</body>
|
||||
</html>
|
58
templates/web/thesaurus/index.html.twig
Normal file
58
templates/web/thesaurus/index.html.twig
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
<title>{{ app['phraseanet.registry'].get('GV_homeTitle') }} - {% trans 'phraseanet:: thesaurus' %}</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/skins/thesaurus/favicon.ico">
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
</head>
|
||||
<body>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<center>
|
||||
{% set count_bases = bases | length %}
|
||||
{% if count_bases > 0 %}
|
||||
|
||||
<form name="fBase" action="/thesaurus/thesaurus.php" method="post">
|
||||
{% trans 'thesaurus:: Editer le thesaurus' %}
|
||||
<select name="bid" onchange="ckok();return(true);">
|
||||
<option value="">{% trans 'phraseanet:: choisir' %}</option>
|
||||
{% for sbas_id, name in bases %}
|
||||
<option value="{{ sbas_id }}">{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<br/>
|
||||
<br/>
|
||||
<script type="text/javascript">
|
||||
function ckok()
|
||||
{
|
||||
ck = false;
|
||||
fl = document.getElementsByName("piv");
|
||||
for(i=0; !ck && i<fl.length; i++)
|
||||
ck = fl[i].checked;
|
||||
ck &= document.forms[0].bid.selectedIndex > 0;
|
||||
document.getElementById("button_ok").disabled = !ck;
|
||||
}
|
||||
</script>
|
||||
<table>
|
||||
<tr>
|
||||
<td>{% trans 'thesaurus:: langue pivot' %}</td>
|
||||
{% for code, language in languages %}
|
||||
<td style="text-align:left">
|
||||
<input type='radio' onclick="ckok();return(true);" value='{{ code }}' name='piv'>
|
||||
<img src='/skins/lng/{{ code }}_flag_18.gif' />( {{ language }} )
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<input disabled="disabled" id="button_ok" type="submit" style="width:80px;" value="{% trans 'boutton::valider' %}" /><br/>
|
||||
</form>
|
||||
{% else %}
|
||||
{% trans 'thesaurus:: Vous n\'avez acces a aucune base' %}
|
||||
{% endif %}
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
66
templates/web/thesaurus/link-field-step1.html.twig
Normal file
66
templates/web/thesaurus/link-field-step1.html.twig
Normal file
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'thesaurus:: Lier la branche de thesaurus au champ' %}</title>
|
||||
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
function ckField()
|
||||
{
|
||||
fields = document.getElementsByName("field[]");
|
||||
changed = false;
|
||||
for(i=0; i<fields.length && !changed; i++)
|
||||
{
|
||||
if( (fields[i].checked?"1":"0") != fields[i].ck0)
|
||||
changed = true;
|
||||
}
|
||||
document.getElementById("submit_button").disabled = !changed;
|
||||
|
||||
return(true);
|
||||
}
|
||||
function clkBut(button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case "submit":
|
||||
// document.forms[0].target="LINKFIELD";
|
||||
document.forms[0].submit();
|
||||
break;
|
||||
case "cancel":
|
||||
self.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
function loaded()
|
||||
{
|
||||
window.name="LINKFIELD";
|
||||
ckField();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="loaded();" class="dialog">
|
||||
<center>
|
||||
<form action="linkfield2.php" method="post" target="LINKFIELD">
|
||||
<input type="hidden" name="piv" value="{{ piv }}">
|
||||
<input type="hidden" name="bid" value="{{ bid }}">
|
||||
<input type="hidden" name="tid" value="{{ tid }}">
|
||||
|
||||
{% set branch = "<br/><b>" ~ fullBranch ~ "</b><br/>" %}
|
||||
{% trans %}
|
||||
thesaurus:: Lier la branche de thesaurus au champ {{ branch }}
|
||||
{% endtrans %}
|
||||
|
||||
<div style="width:70%; height:200px; overflow:scroll;" class="x3Dbox">
|
||||
{% for fieldname, checked in fieldnames %}
|
||||
<input type="checkbox" name="field[]" value="{{ fieldname }}" {% if checked %}checked{% endif %} ck0="{% if checked %}1{% else %}0{% endif %}" onclick="return(ckField());">{{ fieldname }}<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<br/>
|
||||
<input type="button" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');">
|
||||
|
||||
<input type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');">
|
||||
</form>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
79
templates/web/thesaurus/link-field-step2.html.twig
Normal file
79
templates/web/thesaurus/link-field-step2.html.twig
Normal file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'thesaurus:: Lier la branche de thesaurus' %}</title>
|
||||
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
function clkBut(button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case "submit":
|
||||
document.forms[0].submit();
|
||||
break;
|
||||
case "cancel":
|
||||
self.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
function loaded()
|
||||
{
|
||||
window.name="LINKFIELD";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="loaded();" class="dialog">
|
||||
<center>
|
||||
<form action="linkfield3.php" method="post" target="LINKFIELD">
|
||||
<input type="hidden" name="piv" value="{{ piv }}">
|
||||
<input type="hidden" name="bid" value="{{ bid }}">
|
||||
<input type="hidden" name="tid" value="{{ tid }}">
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<div style="width:70%; height:200px; overflow:scroll;" class="x3Dbox">
|
||||
{% for fieldname, branches in oldlinks %}
|
||||
{% if branches['old_branch'] %}
|
||||
{% set old_branch = branches['old_branch'] %}
|
||||
<b>{{ fieldname }}</b>
|
||||
{% trans %}
|
||||
thesaurus:: Ce champ a ete modifie ; ancienne branche : {{ old_branch }}
|
||||
{% endtrans %}
|
||||
<br/>
|
||||
{% endif %}
|
||||
{% trans 'thesaurus:: nouvelle branche' %} : {{ branches['new_branch'] }}
|
||||
<br/>
|
||||
|
||||
{% if branches['old_branch'] is not none and '' == branches['new_branch'] %}
|
||||
<b>{{ fieldname }}</b>{% trans 'thesaurus:: ce champ n\'est plus lie au thesaurus, les termes indexes et candidats seront supprimes' %}
|
||||
<br/>
|
||||
<input type="hidden" name="f2unlk[]" value="{{ fieldname }}">
|
||||
{% endif %}
|
||||
{% if '' != branches['new_branch'] %}
|
||||
{% if '' == branches['old_branch'] %}
|
||||
<b>{{ fieldname }}</b>{% trans 'thesaurus:: ce champ doit etre lie au thesaurus. La reindexation de la base est necessaire' %}
|
||||
{% else %}
|
||||
<b>{{ fieldname }}</b>{% trans 'thesaurus:: le lien au thesaurus doit etre modifie, la reindexation de la base est necessaire' %}
|
||||
{% endif %}
|
||||
<br/>
|
||||
<input type="hidden" name="fbranch[]" value="{{fieldname}}<{{ branches['new_branch'] }}"/>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if need_reindex %}
|
||||
<input type="hidden" name="reindex" value="1">
|
||||
<div style='position:absolute; top:5px; left:0px; width:100%; text-align:center; color:red'>{% trans 'thesaurus:: reindexation necessaire' %}</div>
|
||||
{% else %}
|
||||
<div style='position:absolute; top:5px; left:0px; width:100%; text-align:center; color:green'>{% trans 'thesaurus:: pas de reindexation' %}</div>
|
||||
{% endif %}
|
||||
<br/>
|
||||
<input type="button" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');">
|
||||
|
||||
<input type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');">
|
||||
</form>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
56
templates/web/thesaurus/link-field-step3.html.twig
Normal file
56
templates/web/thesaurus/link-field-step3.html.twig
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'thesaurus:: Lier la branche de thesaurus' %}</title>
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
</head>
|
||||
<body class="dialog">
|
||||
<center>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<form onsubmit="return(false);">
|
||||
<div style="width:70%; height:200px; overflow:scroll;" class="x3Dbox">
|
||||
{% for field in field2del %}
|
||||
{% trans %}
|
||||
thesaurus:: suppression du lien du champ {{ field }}
|
||||
{% endtrans %}
|
||||
<br/>
|
||||
{% endfor %}
|
||||
{% for candidate in candidates2del %}
|
||||
{% set field = candidate2del["field"] %}
|
||||
{% trans %}
|
||||
thesaurus:: suppression de la branche de mot candidats pour le champ {{ field }}
|
||||
{% endtrans %}
|
||||
<br/>
|
||||
{% endfor %}
|
||||
{% for field in branch2del %}
|
||||
{% trans %}
|
||||
thesaurus:: suppression de la branche de mot candidats pour le champ {{ field }}
|
||||
{% endtrans %}
|
||||
<br/>
|
||||
{% endfor %}
|
||||
|
||||
{% if ctchanged %}
|
||||
{% trans 'thesaurus:: enregistrement de la liste modifiee des mots candidats.' %}
|
||||
<br/>
|
||||
{% endif %}
|
||||
|
||||
{% for field in field2del %}
|
||||
{% trans %}
|
||||
thesaurus:: suppression des indexes vers le thesaurus pour le champ {{ field }}
|
||||
{% endtrans %}
|
||||
<br/>
|
||||
{% endfor %}
|
||||
|
||||
{% if reindexed %}
|
||||
{% trans 'thesaurus:: reindexer tous les enregistrements' %}
|
||||
<br/>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br/>
|
||||
<input type="button" value="{% trans 'boutton::fermer' %}" onclick="self.close();">
|
||||
</form>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
43
templates/web/thesaurus/load-thesaurus.html.twig
Normal file
43
templates/web/thesaurus/load-thesaurus.html.twig
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<script language="javascript">
|
||||
|
||||
{% if updated %}
|
||||
alert('{{ 'thesaurus has been updated' | trans | e('js') }}');
|
||||
{% endif %}
|
||||
|
||||
{% if valid_thesaurus %}
|
||||
parent.currentBaseId = {{ bid }};
|
||||
parent.currentBaseName = "{{ name | e('js') }}";
|
||||
parent.document.title = "{{ 'phraseanet:: thesaurus' | trans | e('js') }}";
|
||||
parent.document.getElementById("baseName").innerHTML = "{{ 'phraseanet:: thesaurus' | e('js') }}";
|
||||
parent.thesaurusChanged = false;
|
||||
|
||||
parent.document.getElementById("T0").innerHTML='<DIV class="glossaire" id="CTERMS">' +
|
||||
'' +
|
||||
'<div id="TCE_C" class="s_" style="font-weight:900"><u id="THP_C">-</u>{{ name }}</div>' +
|
||||
'<div id="THB_C" class="OB">' +
|
||||
{% for cterm in cterms %}
|
||||
'<div id="TCE_{{ cterm['id'] }}" class="s_"><u id="THP_{{ cterm['id'] }}">+</u>{{ cterm['field'] }}</div>' +
|
||||
'<div id="THB_{{ cterm['id'] }}" class="ob">' +
|
||||
'</div>'+
|
||||
{% endfor %}
|
||||
'</div></DIV>';
|
||||
|
||||
parent.document.getElementById("T1").innerHTML = '<DIV class="glossaire">' +
|
||||
'<div id="THE_T" class="s_" style="font-weight:900"><u id="THP_T">+</u>{{ name }}</div>' +
|
||||
'<div id="THB_T" class="ob">' +
|
||||
'</div>' +
|
||||
'</DIV>';
|
||||
{% else %}
|
||||
|
||||
if(confirm("{{ "Thesaurus ou CTerms invalide\n effacer (OK) ou quitter (Annuler) ?" | trans | e('js') }}"))
|
||||
{
|
||||
parent.document.forms['fBase'].repair.value = "on";
|
||||
parent.document.forms['fBase'].submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.window.close();
|
||||
}
|
||||
{% endif %}
|
||||
</script>
|
86
templates/web/thesaurus/new-synonym-dialog.html.twig
Normal file
86
templates/web/thesaurus/new-synonym-dialog.html.twig
Normal file
@@ -0,0 +1,86 @@
|
||||
{% if 'TS' == typ %}
|
||||
{% set title = 'thesaurus:: Nouveau terme' | trans %}
|
||||
{% set label = 'thesaurus:: terme' | trans %}
|
||||
{% elseif 'SY' == typ %}
|
||||
{% set title = 'thesaurus:: Nouveau synonyme' | trans %}
|
||||
{% set label = 'thesaurus:: synonyme' | trans %}
|
||||
{% else %}
|
||||
{% set title = '' %}
|
||||
{% set label = '' %}
|
||||
{% endif %}
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
self.returValue = null;
|
||||
function clkBut(button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case "submit":
|
||||
t = document.forms[0].term.value;
|
||||
k = document.forms[0].context.value;
|
||||
if(k != "")
|
||||
t += " ("+k+")";
|
||||
self.returnValue = {"t":t, "lng":null };
|
||||
for(i=0; i<(n=document.getElementsByName("lng")).length; i++)
|
||||
{
|
||||
if(n[i].checked)
|
||||
{
|
||||
self.returnValue.lng = n[i].value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
self.close();
|
||||
break;
|
||||
case "cancel":
|
||||
self.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="dialog" onload="self.document.forms[0].term.focus();">
|
||||
<br/>
|
||||
<form onsubmit="return(false);">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td style="text-align:right; width:80px;">{{ label }} : </td>
|
||||
<td></td>
|
||||
<td><input type="text" style="width:250px;" name="term"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:right">{% trans 'thesaurus:: contexte' %} : </td>
|
||||
<td><b>(</b> </td>
|
||||
<td><input type="text" style="width:250px;" name="context"> <b>)</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom" style="text-align:right">{% trans 'phraseanet:: language' %} : </td>
|
||||
<td></td>
|
||||
<td valign="bottom">
|
||||
{% for code, language in languages %}
|
||||
<span style="display:inline-block">
|
||||
<input type="radio" {% if code == piv %}checked{% endif %} name="lng" value="{{ code }}" id="lng_{{ code }}">
|
||||
<label for="lng_{{ code }}"><img src="/skins/lng/{{ code }}_flag_18.gif" />({{ language }})</label>
|
||||
</span>
|
||||
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<div style="position:absolute; left:0px; bottom:0px; width:100%; text-align:center">
|
||||
<input type="button" style="width:80px;" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:80px">
|
||||
|
||||
<input type="button" style="width:80px;" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');" style="width:80px">
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
205
templates/web/thesaurus/new-term.html.twig
Normal file
205
templates/web/thesaurus/new-term.html.twig
Normal file
@@ -0,0 +1,205 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% if typ == "TS" %}{% trans 'thesaurus:: Nouveau terme specifique' %}{% else %}{% trans 'thesaurus:: Nouveau synonyme' %}{% endif %}</title>
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
<script type="text/javascript" src="/skins//thesaurus/xmlhttp.js"></script>
|
||||
</head>
|
||||
<body onload="loaded();" class="dialog" style="text-align:center">
|
||||
{% if dlg is not none %}
|
||||
{% set opener = 'window.dialogArguments.win' %}
|
||||
{% else %}
|
||||
{% set opener = 'opener' %}
|
||||
{% endif %}
|
||||
|
||||
{% if context is not none %}
|
||||
{% set zterm %}
|
||||
{% trans %}
|
||||
thesaurus:: le terme {{ term }} avec contexte {{ context }}
|
||||
{% endtrans %}
|
||||
{% endset %}
|
||||
{% else %}
|
||||
{% set zterm %}
|
||||
{% trans %}
|
||||
thesaurus:: le terme {{ term }} sans contexte
|
||||
{% endtrans %}
|
||||
{% endset %}
|
||||
{% endif %}
|
||||
|
||||
{% if nb_candidates_ok > 0 %}
|
||||
{% if nb_candidates_ok == 1 %}
|
||||
{% set prop_label = 'thesaurus:: est deja candidat en provenance du champ acceptable : ' | trans %}
|
||||
{% else %}
|
||||
{% set prop_label = 'thesaurus:: est deja candidat en provenance des champs acceptables : ' | trans %}
|
||||
{% endif %}
|
||||
<br/>
|
||||
<br/>
|
||||
{{ zterm }}
|
||||
<br/>
|
||||
<br/>
|
||||
{{ prop_label }}
|
||||
<br/>
|
||||
<center>
|
||||
<form onsubmit="return(false);">
|
||||
<input type="hidden" name="bid" value="{{ bid }} ">
|
||||
<input type="hidden" name="pid" value="{{ pid }}">
|
||||
<div class='x3Dbox' style='margin:15px; height:100px; overflow:auto;'>
|
||||
{% for candidate in candidates %}
|
||||
<input type="radio" name="cid" value="{{ candidate['id'] }}" onclick="return(clkCid());">{{ candidate['field'] }}<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if nb_candidates_ok > 1 %}
|
||||
{{ 'thesaurus:: selectionner la provenance a accepter' | trans }}
|
||||
{% endif %}
|
||||
<br/>
|
||||
<input type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:100px;">
|
||||
|
||||
<input type="button" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');" style="width:100px;">
|
||||
</form>
|
||||
</center>
|
||||
{% else %}
|
||||
{% if nb_candidates_bad > 0 %}
|
||||
// present dans les candidats, mais aucun champ acceptable : on informe
|
||||
{% if nb_candidates_bad == 1 %}
|
||||
{% set prop_label = 'thesaurus:: est candidat en provenance des champs mais ne peut etre accepte a cet emplacement du thesaurus' | trans %}
|
||||
{% else %}
|
||||
{% set prop_label = 'thesaurus:: est candidat en provenance des champs mais ne peut etre accepte a cet emplacement du thesaurus' | trans %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
// pas present dans les candidats
|
||||
{% set prop_label = 'thesaurus:: n\'est pas present dans les candidats' | trans %}
|
||||
{% endif %}
|
||||
<br/>
|
||||
<h3>{% trans 'thesaurus:: attention :' %}</h3>
|
||||
<br/>
|
||||
<br/>
|
||||
{{ zterm }}
|
||||
<br/>
|
||||
<br/>
|
||||
{{ prop_label }}
|
||||
<br/>
|
||||
<form>
|
||||
<center>
|
||||
<div class='x3Dbox' style='margin:15px; height:90px; overflow:auto;'>
|
||||
<input type="radio" name="reindex" value="0" id="rad0" checked><label for="rad0">{% trans 'thesaurus:: Ajouter le terme dans reindexer' %}</label><br/>
|
||||
<br/>
|
||||
<input type="radio" name="reindex" value="1" id="rad1"><label for="rad1">{% trans 'thesaurus:: ajouter le terme et reindexer' %}</label><br/>
|
||||
</div>
|
||||
</center>
|
||||
<input type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:100px;">
|
||||
|
||||
<input type="button" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');" style="width:100px;">
|
||||
</form>
|
||||
{% endif %}
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
{% if nb_candidates_ok > 0 %}
|
||||
function clkCid()
|
||||
{
|
||||
cids = document.getElementsByName("cid");
|
||||
f = false;
|
||||
for(i=0; i<cids.length && !f; i++)
|
||||
{
|
||||
if(cids[i].checked)
|
||||
f = true;
|
||||
}
|
||||
document.getElementById("submit_button").disabled = !f;
|
||||
|
||||
return(true);
|
||||
}
|
||||
function clkBut(button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case "submit":
|
||||
url = "xmlhttp/acceptcandidates.x.php";
|
||||
parms = "bid={{ bid }}";
|
||||
parms += "&pid={{ pid }}";
|
||||
parms += "&typ={{ typ }}";
|
||||
for(i=0; i<(n=document.getElementsByName("cid")).length; i++)
|
||||
{
|
||||
if(n[i].checked)
|
||||
parms += "&cid[]=" + encodeURIComponent(n[i].value);
|
||||
}
|
||||
|
||||
ret = loadXMLDoc(url, parms, true);
|
||||
refresh = ret.getElementsByTagName("refresh");
|
||||
for(i=0; i<refresh.length; i++)
|
||||
{
|
||||
switch(refresh.item(i).getAttribute("type"))
|
||||
{
|
||||
case "CT":
|
||||
{{ opener }}.reloadCtermsBranch(refresh.item(i).getAttribute("id"));
|
||||
break;
|
||||
case "TH":
|
||||
{{ opener }}.reloadThesaurusBranch(refresh.item(i).getAttribute("id"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
self.close();
|
||||
break;
|
||||
case "cancel":
|
||||
self.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
{% else %}
|
||||
function clkCid()
|
||||
{}
|
||||
function clkBut(button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case "submit":
|
||||
{% if typ == "TS" %}
|
||||
url = "xmlhttp/newts.x.php";
|
||||
{% else %}
|
||||
url = "xmlhttp/newsy.x.php";
|
||||
{% endif %}
|
||||
parms = "bid={{ bid }}";
|
||||
parms += "&piv={{ piv }}";
|
||||
parms += "&pid={{ pid }}";
|
||||
parms += "&t={{ term | url_encode }}";
|
||||
{% if context is not none %}
|
||||
parms += "&k={{ context | url_encode }}";
|
||||
{% endif %}
|
||||
parms += "&sylng={{ sylng }}";
|
||||
|
||||
for(i=0; i<(n=document.getElementsByName("reindex")).length; i++)
|
||||
{
|
||||
if(n[i].checked)
|
||||
{
|
||||
parms += "&reindex=" + encodeURIComponent(n[i].value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ret = loadXMLDoc(url, parms, true);
|
||||
refresh = ret.getElementsByTagName("refresh");
|
||||
for(i=0; i<refresh.length; i++)
|
||||
{
|
||||
switch(refresh.item(i).getAttribute("type"))
|
||||
{
|
||||
case "CT":
|
||||
{{ opener }}.reloadCtermsBranch(refresh.item(i).getAttribute("id"));
|
||||
break;
|
||||
case "TH":
|
||||
{{ opener }}.reloadThesaurusBranch(refresh.item(i).getAttribute("id"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
self.close();
|
||||
break;
|
||||
case "cancel":
|
||||
self.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
function loaded()
|
||||
{
|
||||
clkCid();
|
||||
self.focus();
|
||||
}
|
||||
</script>
|
||||
</html>
|
427
templates/web/thesaurus/properties.html.twig
Normal file
427
templates/web/thesaurus/properties.html.twig
Normal file
@@ -0,0 +1,427 @@
|
||||
{% if dlg is not none %}
|
||||
{% set opener = "window.dialogArguments.win" %}
|
||||
{% else %}
|
||||
{% set opener = "opener" %}
|
||||
{% endif %}
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'thesaurus:: Proprietes' %}</title>
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
<style type="text/css">
|
||||
a
|
||||
{
|
||||
text-decoration:none;
|
||||
font-size: 10px;
|
||||
}
|
||||
.path_separator
|
||||
{
|
||||
color:#ffff00;
|
||||
}
|
||||
.main_term
|
||||
{
|
||||
font-weight:900;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="/skins/thesaurus/win.js"></script>
|
||||
<script type="text/javascript" src="/skins/thesaurus/xmlhttp.js"></script>
|
||||
<script type="text/javascript" src="/include/minify/f=include/jslibs/jquery-1.7.1.js,include/jslibs/jquery.sprintf.1.0.3.js"></script>
|
||||
<script type="text/javascript" src="/skins/thesaurus/sprintf.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function loaded()
|
||||
{
|
||||
window.name="PROPERTIES";
|
||||
self.focus();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body id="desktop" onload="loaded();" class="dialog">
|
||||
<div class="menu" id="flagsMenu" style="z-index:50">
|
||||
{% for code, language in languages %}
|
||||
<a id='flagMenu_{{ code }}' href='javascript:void(0)' class=''>
|
||||
<img src='/skins/lng/{{ code }}_flag_18.gif' />{{ language }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="menu" id="syMenu" style="z-index:50">
|
||||
<a href="javascript:void(0)" id="delete_sy">{% trans 'thesaurus::menu: supprimer' %}</a>
|
||||
<a href="javascript:void(0)" id="replace_sy" class="disabled">{% trans 'thesaurus:: remplacer' %}</a>
|
||||
</div>
|
||||
|
||||
<div style='text-align:right'>
|
||||
<b>id:</b> {{ id }}
|
||||
</div>
|
||||
<H4>{{ fullpath | raw }}</H4><br/>
|
||||
{% if typ == "CT" %}
|
||||
<br/>
|
||||
{% elseif typ == "TH" %}
|
||||
{% trans %}
|
||||
thesaurus:: {{ hits }} reponses retournees
|
||||
{% endtrans %}
|
||||
<br/>
|
||||
<br/>
|
||||
{% endif %}
|
||||
<div id="TSY" class="tableContainer" style="margin:10px; position:relative; top:0px; left:0px">
|
||||
<div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; ">
|
||||
<col style="width:40px;" />
|
||||
<col style="width:30px;" />
|
||||
<col style="width:auto;" />
|
||||
<col style="width:40px;" />
|
||||
<col style="width:140px;" />
|
||||
<col style="width:14px;" />
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>{% trans 'thesaurus:: synonymes' %}</th>
|
||||
<th>{% trans 'thesaurus:: hits' %}</th>
|
||||
<th>{% trans 'thesaurus:: ids' %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div style="position:relative; height:150px; overflow:scroll">
|
||||
<div style="position:relative; height:150px; ">
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width:100%;">
|
||||
<col style="width:40px;" />
|
||||
<col style="width:30px;" />
|
||||
<col style="width:auto;" />
|
||||
<col style="width:40px;" />
|
||||
<col style="width:140px;" />
|
||||
<tbody id="LSY" style="">
|
||||
|
||||
{% for data in synonyms %}
|
||||
<tr class='s_' id='SYN_{{ data['id'] }}' hits='{{ data['hits'] }}'>
|
||||
<td style='text-align:center;'>
|
||||
{% if loop.index > 0 %}
|
||||
<img id="BTNU_{{ data['id'] }}" src="/skins/thesaurus/images/up.gif" />
|
||||
{% endif %}
|
||||
{% if not loop.last %}
|
||||
<img id="BTND_{{ data['id'] }}" src="/skins/thesaurus/images/down.gif" />
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if data['lng'] %}
|
||||
<td id='FLG_{{ data['id'] }}'><img src='/skins/lng/{{ data['lng'] }}_flag_18.gif' /></td>
|
||||
{% else %}
|
||||
<td id='FLG_{{ data['id'] }}'><img src='/skins/thesaurus/images/noflag.gif' /></td>
|
||||
{% endif %}
|
||||
<td>{{ data['t'] }}</td>
|
||||
<td>{{ data['hits'] }}</td>
|
||||
<td>{{ data['id'] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<center>
|
||||
<form onsubmit="return(false);">
|
||||
<input style="position:relative; z-index:2" type="button" id="close_button" value="{% trans 'boutton::fermer' %}" onclick="self.close();">
|
||||
</form>
|
||||
</center>
|
||||
<script type="text/javascript">
|
||||
// gui callback du menu des drapeaux
|
||||
var nsy = {{ synonyms | length }};
|
||||
|
||||
function cbME_flags(action, cbParm, menuelem_id)
|
||||
{
|
||||
if(action != "SELECT" || !menuelem_id) {
|
||||
return;
|
||||
}
|
||||
lng = menuelem_id.substr(9,2);
|
||||
|
||||
url = "xmlhttp/changesylng.x.php";
|
||||
parms = "bid={{ bid | url_encode }}";
|
||||
parms += "&typ={{ typ | url_encode }}";
|
||||
parms += "&piv={{ piv | url_encode }}";
|
||||
parms += "&id=" + cbParm.id.substr(4);
|
||||
parms += "&newlng=" + encodeURIComponent(lng);
|
||||
|
||||
ret = loadXMLDoc(url, parms, true);
|
||||
sy_list = ret.getElementsByTagName("sy_list").item(0);
|
||||
|
||||
refresh_sy(sy_list);
|
||||
|
||||
refresh = ret.getElementsByTagName("refresh");
|
||||
|
||||
for(i=0; i<refresh.length; i++)
|
||||
{
|
||||
switch(refresh.item(i).getAttribute("type"))
|
||||
{
|
||||
case "CT":
|
||||
{{ opener }}.reloadCtermsBranch(refresh.item(i).getAttribute("id"));
|
||||
{{ opener }}.myGUI.select({{ opener }}.document.getElementById("THE_{{ id }}"));
|
||||
break;
|
||||
case "TH":
|
||||
{{ opener }}.reloadThesaurusBranch(refresh.item(i).getAttribute("id"));
|
||||
{{ opener }}.myGUI.select({{ opener }}.document.getElementById("THE_{{ id }}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// gui callback du menu des synonymes
|
||||
function cbME_synonym(action, cbParm, menuelem_id)
|
||||
{
|
||||
|
||||
if(action == "INIT")
|
||||
{
|
||||
if(nsy <= 1)
|
||||
{
|
||||
// pas d'action possible s'il ne reste qu'un seul synonyme
|
||||
// alert(nsy);
|
||||
document.getElementById("delete_sy").className = "disabled";
|
||||
// document.getElementById("reject_sy").className = "disabled";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(cbParm && cbParm.hits > 0)
|
||||
{
|
||||
// y'a des hits, on peut pas supprimer
|
||||
// document.getElementById("reject_sy").className = "";
|
||||
document.getElementById("delete_sy").className = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
// pas de hits : on peut supprimer
|
||||
// document.getElementById("reject_sy").className = "";
|
||||
document.getElementById("delete_sy").className = "";
|
||||
}
|
||||
}
|
||||
// si on ne connait pas encore le client mais que start est ouvert, on lui demande
|
||||
// if(!opener.wClient && opener.opener.wClient)
|
||||
// opener.wClient = opener.opener.wClient;
|
||||
// si on connait le client et qu'on peut s'en servir pour chercher, on active l'option dans le menu
|
||||
// if(opener.wClient && opener.wClient.externQuery)
|
||||
// document.getElementById("searchcli_sy").className = "";
|
||||
// else
|
||||
// document.getElementById("searchcli_sy").className = "disabled";
|
||||
return;
|
||||
}
|
||||
|
||||
if(action != "SELECT" || !menuelem_id) {
|
||||
return; // pas d'option de menu : on est sorti du menu sans cliquer
|
||||
}
|
||||
|
||||
switch(menuelem_id)
|
||||
{
|
||||
case "delete_sy": // cbParm = objet 'TR'
|
||||
url = "xmlhttp/getsy.x.php";
|
||||
url += "?bid={{ bid | url_encode }}";
|
||||
url += "&id=" + cbParm.id.substr(4);
|
||||
url += "&typ={{ typ | url_encode }}";
|
||||
ret = loadXMLDoc(url, null, true);
|
||||
// alert(ret);
|
||||
fullpath = ret.getElementsByTagName("fullpath").item(0).firstChild.nodeValue;
|
||||
//alert("delete : cbParm.obj={id:'" + cbParm.id + "'} ; menuelem_id='" + menuelem_id + "'");
|
||||
|
||||
url = "xmlhttp/delsy.x.php";
|
||||
parms = "bid={{ bid | url_encode }}";
|
||||
parms += "&piv={{ piv | url_encode }}";
|
||||
parms += "&typ={{ typ | url_encode }}";
|
||||
parms += "&id=" + cbParm.id.substr(4);
|
||||
|
||||
if(confirm($.sprintf("{{ 'thesaurus:: Confirmer la suppression du terme %s' | trans | e('js') }}","\n\n"+fullpath+"\n\n")))
|
||||
{
|
||||
ret = loadXMLDoc(url, parms, true);
|
||||
|
||||
sy_list = ret.getElementsByTagName("sy_list").item(0);
|
||||
refresh_sy(sy_list);
|
||||
|
||||
refresh = ret.getElementsByTagName("refresh");
|
||||
for(i=0; i<refresh.length; i++)
|
||||
{
|
||||
switch(refresh.item(i).getAttribute("type"))
|
||||
{
|
||||
case "CT":
|
||||
{{ opener }}.reloadCtermsBranch(refresh.item(i).getAttribute("id"));
|
||||
{{ opener }}.myGUI.select({{ opener }}.document.getElementById("THE_{{ id }}"));
|
||||
break;
|
||||
case "TH":
|
||||
{{ opener }}.reloadThesaurusBranch(refresh.item(i).getAttribute("id"));
|
||||
{{ opener }}.myGUI.select({{ opener }}.document.getElementById("THE_{{ id }}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "searchcli_sy": // cbParm = objet 'TR'
|
||||
url = "xmlhttp/getsy.x.php";
|
||||
url += "?bid={{ bid | url_encode }}";
|
||||
url += "&id=" + cbParm.id.substr(4);
|
||||
url += "&typ={{ typ | url_encode }}";
|
||||
ret = loadXMLDoc(url, null, true);
|
||||
t = ret.getElementsByTagName("sy").item(0).getAttribute("t");
|
||||
|
||||
if(opener.wClient && opener.wClient.externQuery)
|
||||
{
|
||||
opener.wClient.focus();
|
||||
opener.wClient.externQuery(opener.currentBaseId, t);
|
||||
}
|
||||
|
||||
break;
|
||||
case "replace_sy":
|
||||
url = "replace.php";
|
||||
url += "?bid={{ bid }}";
|
||||
url += "&piv={{ piv }}";
|
||||
url += "&pid={{ id }}"
|
||||
url += "&id=" + o.id.substr(4);
|
||||
url += "&typ={{ typ | url_encode }}";
|
||||
w = window.open(url, "REPLACE", "directories=no, height=300, width=500, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function refresh_sy(sy_list)
|
||||
{
|
||||
oldtbody = document.getElementById("LSY");
|
||||
tbody = document.createElement("tbody");
|
||||
tbody.setAttribute("id", "LSY");
|
||||
|
||||
for(nsy=0, n=sy_list.firstChild; n; n=n.nextSibling, nsy++)
|
||||
{
|
||||
tr = tbody.appendChild(document.createElement("tr"));
|
||||
// tr.className = n.getAttribute("sel") ? "S_" : "s_";
|
||||
tr.className = "s_";
|
||||
tr.id = "SYN_" + (id=n.getAttribute("id"));
|
||||
|
||||
td = tr.appendChild(document.createElement("td"));
|
||||
td.style.textAlign = "center";
|
||||
if(nsy > 0)
|
||||
{
|
||||
img = td.appendChild(document.createElement("img"));
|
||||
img.id = "BTNU_" + id;
|
||||
img.src = "/skins/thesaurus/images/up.gif";
|
||||
if(n.nextSibling)
|
||||
{
|
||||
td.appendChild(document.createTextNode(" "));
|
||||
}
|
||||
}
|
||||
if(n.nextSibling)
|
||||
{
|
||||
img = td.appendChild(document.createElement("img"));
|
||||
img.id = "BTND_" + id;
|
||||
img.src = "/skins/thesaurus/images/down.gif";
|
||||
}
|
||||
|
||||
td = tr.appendChild(document.createElement("td"));
|
||||
td.id = "FLG_"+(nsy+1);
|
||||
// td.innerText = n.getAttribute("lng");
|
||||
img = td.appendChild(document.createElement("img"));
|
||||
img.setAttribute("src", "/skins/lng/"+n.getAttribute("lng")+"_flag_18.gif");
|
||||
|
||||
td = tr.appendChild(document.createElement("td"));
|
||||
// td.colSpan = "2";
|
||||
// td.setAttribute("colSpan", "3"); // attention au 'S' majuscule !!!
|
||||
td.innerHTML = n.getAttribute("t");
|
||||
|
||||
td = tr.appendChild(document.createElement("td"));
|
||||
td.innerHTML = n.getAttribute("hits");
|
||||
|
||||
td = tr.appendChild(document.createElement("td"));
|
||||
td.innerHTML = n.getAttribute("id");
|
||||
|
||||
if(n.getAttribute("sel")) {
|
||||
myGUI.select(tr);
|
||||
}
|
||||
}
|
||||
|
||||
newtbody = oldtbody.parentNode.replaceChild(tbody, oldtbody);
|
||||
}
|
||||
|
||||
|
||||
function cbDD_TSY(evt, type, eventObj)
|
||||
{
|
||||
ret = true;
|
||||
switch(type)
|
||||
{
|
||||
case "RMOUSEDOWN":
|
||||
if(o = eventObj.Src0)
|
||||
{
|
||||
for(tr=o; tr && (tr.nodeName!="TR" || !tr.id || tr.id.substr(0, 4)!="SYN_"); tr=tr.parentNode)
|
||||
;
|
||||
if(tr)
|
||||
myGUI.select(tr);
|
||||
switch(o.id.substr(0, 4))
|
||||
{
|
||||
case "FLG_": // le drapeau
|
||||
document.getElementById("flagsMenu").runAsMenu( evt, tr );
|
||||
break;
|
||||
case "SYN_": // le synonyme
|
||||
document.getElementById("syMenu").runAsMenu( evt, tr );
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "MOUSEDOWN":
|
||||
if(o = eventObj.Src0)
|
||||
{
|
||||
for(tr=o; tr && (tr.nodeName!="TR" || !tr.id || tr.id.substr(0, 4)!="SYN_"); tr=tr.parentNode)
|
||||
;
|
||||
if(tr)
|
||||
myGUI.select(tr);
|
||||
switch(o.id.substr(0, 5))
|
||||
{
|
||||
case "BTNU_":
|
||||
syChgPos(1);
|
||||
break;
|
||||
case "BTND_":
|
||||
syChgPos(-1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "DBLCLICK":
|
||||
break;
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
function syChgPos(dir)
|
||||
{
|
||||
if(!myGUI.selectedObject || myGUI.selectedObject.id.substr(0, 4)!="SYN_") {
|
||||
return;
|
||||
}
|
||||
|
||||
url = "xmlhttp/changesypos.x.php";
|
||||
parms = "bid={{ bid | url_encode }}";
|
||||
parms += "&piv={{ piv | url_encode }}";
|
||||
parms += "&typ={{ typ | url_encode }}";
|
||||
parms += "&id=" + myGUI.selectedObject.id.substr(4);
|
||||
parms += "&dir=" + dir;
|
||||
|
||||
ret = loadXMLDoc(url, parms, true);
|
||||
|
||||
sy_list = ret.getElementsByTagName("sy_list").item(0);
|
||||
refresh_sy(sy_list);
|
||||
|
||||
refresh = ret.getElementsByTagName("refresh");
|
||||
for(i=0; i<refresh.length; i++)
|
||||
{
|
||||
switch(refresh.item(i).getAttribute("type"))
|
||||
{
|
||||
case "CT":
|
||||
{{ opener }}.reloadCtermsBranch(refresh.item(i).getAttribute("id"));
|
||||
{{ opener }}.myGUI.select({{ opener }}.document.getElementById("THE_{{ id }}"));
|
||||
break;
|
||||
case "TH":
|
||||
{{ opener }}.reloadThesaurusBranch(refresh.item(i).getAttribute("id"));
|
||||
{{ opener }}.myGUI.select({{ opener }}.document.getElementById("THE_{{ id }}"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
myGUI = new GUI("myGUI", "desktop", "FR");
|
||||
myGUI.setClickable("TSY", cbDD_TSY);
|
||||
myGUI.setAsMenu("flagsMenu", cbME_flags);
|
||||
myGUI.setAsMenu("syMenu", cbME_synonym);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
64
templates/web/thesaurus/search.html.twig
Normal file
64
templates/web/thesaurus/search.html.twig
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="{{ app['locale.I18n'] }}">
|
||||
<head>
|
||||
<title>{% trans 'Chercher' %}</title>
|
||||
<link REL="stylesheet" TYPE="text/css" HREF="/skins/thesaurus/thesaurus.css" />
|
||||
<script type="text/javascript">
|
||||
function clkBut(button)
|
||||
{
|
||||
switch(button)
|
||||
{
|
||||
case "submit":
|
||||
m = null;
|
||||
for(i=0; !m && document.forms[0].m[i]; i++)
|
||||
m = document.forms[0].m[i].checked ? document.forms[0].m[i].value : null;
|
||||
self.returnValue = { t:document.forms[0].t.value, method:m };
|
||||
self.close();
|
||||
break;
|
||||
case "cancel":
|
||||
self.returnValue = null;
|
||||
self.close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
function loaded()
|
||||
{
|
||||
document.forms[0].t.focus();
|
||||
}
|
||||
function ckis()
|
||||
{
|
||||
document.getElementById("submit_button").disabled = document.forms[0].t.value=="";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="loaded();" class="dialog">
|
||||
<center>
|
||||
<br/>
|
||||
<br/>
|
||||
<form onsubmit="clkBut('submit');return(false);">
|
||||
<table>
|
||||
<tr>
|
||||
<td>{% trans 'thesaurus:: le terme' %}</td>
|
||||
<td><input type="radio" name="m" value="equal">{% trans 'thesaurus:: est egal a ' %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td />
|
||||
<td><input type="radio" checked name="m" value="begins">{% trans 'thesaurus:: commence par' %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td />
|
||||
<td><input type="radio" name="m" value="contains">{% trans 'thesaurus:: contient' %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<input type="text" name="t" value="" style="width:200px" onkeyup="ckis();return(true);">
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<input type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:80px;">
|
||||
|
||||
<input type="button" id="submit_button" value="{% trans 'boutton::chercher' %}" onclick="clkBut('submit');" disabled style="width:80px;">
|
||||
</form>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
1403
templates/web/thesaurus/thesaurus.html.twig
Normal file
1403
templates/web/thesaurus/thesaurus.html.twig
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user