Add reset search button

This commit is contained in:
Benjamin Renard 2019-06-03 14:26:01 +02:00
parent 6ddcca037d
commit 46a8cfb51d
6 changed files with 45 additions and 32 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

View file

@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: LdapSaisie\n" "Project-Id-Version: LdapSaisie\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-27 18:10+0200\n" "POT-Creation-Date: 2019-06-03 14:24+0200\n"
"PO-Revision-Date: 2019-05-27 18:11+0200\n" "PO-Revision-Date: 2019-06-03 14:24+0200\n"
"Last-Translator: Benjamin Renard <brenard@zionetrix.net>\n" "Last-Translator: Benjamin Renard <brenard@zionetrix.net>\n"
"Language-Team: LdapSaisie <ldapsaisie-users@lists.labs.libre-entreprise." "Language-Team: LdapSaisie <ldapsaisie-users@lists.labs.libre-entreprise."
"org>\n" "org>\n"
@ -57,6 +57,22 @@ msgstr "Recherche approximative"
msgid "Recursive search" msgid "Recursive search"
msgstr "Recherche récursive" msgstr "Recherche récursive"
#: view.php:143 create.php:120 includes/class/class.LSrelation.php:267
msgid "New"
msgstr "Nouveau"
#: view.php:149 import.php:59
msgid "Import"
msgstr "Importer"
#: view.php:156 includes/class/class.LSsession.php:1418
msgid "Refresh"
msgstr "Rafraîchir"
#: view.php:161
msgid "Reset"
msgstr "Réinitialiser"
#: select.php:70 includes/class/class.LSsession.php:1214 #: select.php:70 includes/class/class.LSsession.php:1214
#: includes/class/class.LSsession.php:2284 #: includes/class/class.LSsession.php:2284
msgid "Level" msgid "Level"
@ -74,10 +90,6 @@ msgstr "L'objet a bien été modifié."
msgid "View" msgid "View"
msgstr "Voir" msgstr "Voir"
#: import.php:59
msgid "Import"
msgstr "Importer"
#: create.php:75 #: create.php:75
msgid "Data entry form" msgid "Data entry form"
msgstr "Masque de saisie" msgstr "Masque de saisie"
@ -86,10 +98,6 @@ msgstr "Masque de saisie"
msgid "Object has been added." msgid "Object has been added."
msgstr "L'objet a été ajouté." msgstr "L'objet a été ajouté."
#: create.php:120 includes/class/class.LSrelation.php:267
msgid "New"
msgstr "Nouveau"
#: custom_search_action.php:53 #: custom_search_action.php:53
msgid "" msgid ""
"The custom action %{title} have been successfully execute on this search." "The custom action %{title} have been successfully execute on this search."
@ -769,10 +777,6 @@ msgstr ""
msgid "Your new password has been sent to %{mail}. " msgid "Your new password has been sent to %{mail}. "
msgstr "Votre nouveau mot de passe vous a été envoyé à l'adresse %{mail}." msgstr "Votre nouveau mot de passe vous a été envoyé à l'adresse %{mail}."
#: includes/class/class.LSsession.php:1418
msgid "Refresh"
msgstr "Rafraîchir"
#: includes/class/class.LSsession.php:1434 #: includes/class/class.LSsession.php:1434
msgid "Language" msgid "Language"
msgstr "Langue" msgstr "Langue"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-27 18:09+0200\n" "POT-Creation-Date: 2019-06-03 14:23+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -54,6 +54,22 @@ msgstr ""
msgid "Recursive search" msgid "Recursive search"
msgstr "" msgstr ""
#: view.php:143 create.php:120 includes/class/class.LSrelation.php:267
msgid "New"
msgstr ""
#: view.php:149 import.php:59
msgid "Import"
msgstr ""
#: view.php:156 includes/class/class.LSsession.php:1418
msgid "Refresh"
msgstr ""
#: view.php:161
msgid "Reset"
msgstr ""
#: select.php:70 includes/class/class.LSsession.php:1214 #: select.php:70 includes/class/class.LSsession.php:1214
#: includes/class/class.LSsession.php:2284 #: includes/class/class.LSsession.php:2284
msgid "Level" msgid "Level"
@ -71,10 +87,6 @@ msgstr ""
msgid "View" msgid "View"
msgstr "" msgstr ""
#: import.php:59
msgid "Import"
msgstr ""
#: create.php:75 #: create.php:75
msgid "Data entry form" msgid "Data entry form"
msgstr "" msgstr ""
@ -83,10 +95,6 @@ msgstr ""
msgid "Object has been added." msgid "Object has been added."
msgstr "" msgstr ""
#: create.php:120 includes/class/class.LSrelation.php:267
msgid "New"
msgstr ""
#: custom_search_action.php:53 #: custom_search_action.php:53
msgid "" msgid ""
"The custom action %{title} have been successfully execute on this search." "The custom action %{title} have been successfully execute on this search."
@ -667,10 +675,6 @@ msgstr ""
msgid "Your new password has been sent to %{mail}. " msgid "Your new password has been sent to %{mail}. "
msgstr "" msgstr ""
#: includes/class/class.LSsession.php:1418
msgid "Refresh"
msgstr ""
#: includes/class/class.LSsession.php:1434 #: includes/class/class.LSsession.php:1434
msgid "Language" msgid "Language"
msgstr "" msgstr ""

View file

@ -22,7 +22,7 @@
<ul class='LSview-actions'> <ul class='LSview-actions'>
{foreach from=$LSview_actions item=item} {foreach from=$LSview_actions item=item}
{if is_array($item)} {if is_array($item)}
<li class='LSview-actions'><a href='{$item.url}' class='LSview-actions'><img src='{img name=$item.action}' alt='{tr msg=$label}' title='{tr msg=$label}' /> {tr msg=$item.label}</a></li> <li class='LSview-actions'><a href='{$item.url}' class='LSview-actions'><img src='{img name=$item.action}' alt='{$item.label|escape:"htmlall"}' title='{$item.label|escape:"htmlall"}' /> {$item.label|escape:"htmlall"}</a></li>
{/if} {/if}
{/foreach} {/foreach}
</ul> </ul>

View file

@ -112,7 +112,7 @@ if(LSsession :: startLSsession()) {
$object = new $LSobject(); $object = new $LSobject();
LStemplate :: assign('pagetitle',$object -> getLabel()); LStemplate :: assign('pagetitle',$object -> getLabel());
$LSsearch = new LSsearch($LSobject,'LSview'); $LSsearch = new LSsearch($LSobject, 'LSview', null, (isset($_REQUEST['reset'])));
$LSsearch -> setParam('extraDisplayedColumns',True); $LSsearch -> setParam('extraDisplayedColumns',True);
$LSsearch -> setParamsFormPostData(); $LSsearch -> setParamsFormPostData();
@ -140,23 +140,28 @@ if(LSsession :: startLSsession()) {
$LSview_actions=array(); $LSview_actions=array();
if(LSsession :: canCreate($LSobject)) { if(LSsession :: canCreate($LSobject)) {
$LSview_actions['create'] = array ( $LSview_actions['create'] = array (
'label' => 'New', 'label' => _('New'),
'url' => 'create.php?LSobject='.$LSobject, 'url' => 'create.php?LSobject='.$LSobject,
'action' => 'create' 'action' => 'create'
); );
if ($object -> listValidIOformats()) { if ($object -> listValidIOformats()) {
$LSview_actions['import'] = array ( $LSview_actions['import'] = array (
'label' => 'Import', 'label' => _('Import'),
'url' => 'import.php?LSobject='.$LSobject, 'url' => 'import.php?LSobject='.$LSobject,
'action' => 'import' 'action' => 'import'
); );
} }
} }
$LSview_actions['refresh'] = array ( $LSview_actions['refresh'] = array (
'label' => 'Refresh', 'label' => _('Refresh'),
'url' => 'view.php?LSobject='.$LSobject.'&amp;refresh', 'url' => 'view.php?LSobject='.$LSobject.'&amp;refresh',
'action' => 'refresh' 'action' => 'refresh'
); );
$LSview_actions['reset'] = array (
'label' => _('Reset'),
'url' => 'view.php?LSobject='.$LSobject.'&amp;reset',
'action' => 'reset'
);
/*$LSview_actions['purge'] = array ( /*$LSview_actions['purge'] = array (
'label' => 'Purge the cache', 'label' => 'Purge the cache',
'url' => 'view.php?LSobject='.$LSobject.'&amp;LSsearchPurgeSession', 'url' => 'view.php?LSobject='.$LSobject.'&amp;LSsearchPurgeSession',