Index: /extensions/ASearchEngine/admin/ase_config.tpl
===================================================================
--- /extensions/ASearchEngine/admin/ase_config.tpl	(revision 7373)
+++ /extensions/ASearchEngine/admin/ase_config.tpl	(revision 7374)
@@ -108,5 +108,5 @@
     </div>
 
-    <div class='cfgBloc'>
+    <div class='cfgBloc' style='display:none;'>
       <label><input type="checkbox" id='iPAApplyLimits' name='fPAApplyLimits' {if $aseConfig.ase_publicAccess_applyLimits}checked{/if}>&nbsp;{'ase_publicAccess_applyLimits'|@translate}</label>
       <input id="iPALimits" name="fPALimits" type="text" maxlength='6' size='6' value="{$aseConfig.ase_publicAccess_limits}">
Index: /extensions/ASearchEngine/ase2.css
===================================================================
--- /extensions/ASearchEngine/ase2.css	(revision 7373)
+++ /extensions/ASearchEngine/ase2.css	(revision 7374)
@@ -53,5 +53,5 @@
 }
 
-.cRequestCriterions { margin-bottom:10px; }
+#iRBCriteriaForm { padding-bottom:10px; }
 
 div#iMenuCriterions ul { margin-top:0px; }
@@ -61,4 +61,31 @@
 .rbResultItemDetail hr { border:none; border-top:1px solid; }
 
+.ui-tag-selector-input { padding:1px; }
+.ui-tag-selector-input input { border:none; background:transparent; }
+.ui-tag-selector-list { margin-top:-1px; }
+.ui-tag-selector-selected-tag-list { list-style:none; margin:0; padding:0; }
+.ui-tag-selector-selected-tag-list li span {
+  font-family:sans;
+  font-size:80%;
+  font-weight:bold;
+  padding:0 3px;
+  position:relative;
+  top:-1px;
+}
+li.ui-tag-selector-list-item, .ui-tag-selector-text { padding:2px; }
+.ui-tag-selector-selected-tag-list li.ui-tag-selector-selected-tag {
+  -moz-border-radius:8px;
+  -webkit-border-radius:8px;
+  -khtml-border-radius:8px;
+  border-radius:8px;
+  float:left;
+  margin-bottom:1px;
+  margin-right:1px;
+  padding:0 4px;
+  cursor:default;
+}
+.ui-tag-selector-selected-tag-list li.ui-tag-selector-selected-tag span { cursor:pointer; }
+
+li.ui-tag-selector-list-item { cursor:pointer; }
 
 /* AMD specific css */
@@ -86,2 +113,8 @@
 
 .waitingResult { margin:30px auto; display:block; }
+
+.iconEdit, .iconDelete, .iconSwitchCondition { width:18px; height:18px; cursor:pointer; display:inline-block; }
+.iconMove { width:18px; height:18px; cursor:move; display:inline-block; }
+.itemContent { padding-left:24px; }
+.cbItemUnique { border:none; }
+.cbItemMultiple { border:1px solid; }
Index: /extensions/ASearchEngine/ase_aip.class.inc.php
===================================================================
--- /extensions/ASearchEngine/ase_aip.class.inc.php	(revision 7373)
+++ /extensions/ASearchEngine/ase_aip.class.inc.php	(revision 7374)
@@ -139,4 +139,5 @@
 
     GPCCore::addHeaderCSS('categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css');
+    GPCCore::addHeaderCSS('tagSelector', 'plugins/GrumPluginClasses/css/tagSelector_'.$template->get_themeconf('name').'.css');
 
 
Index: /extensions/ASearchEngine/ase_rb_callback_tag.class.inc.php
===================================================================
--- /extensions/ASearchEngine/ase_rb_callback_tag.class.inc.php	(revision 7374)
+++ /extensions/ASearchEngine/ase_rb_callback_tag.class.inc.php	(revision 7374)
@@ -0,0 +1,201 @@
+<?php
+/* -----------------------------------------------------------------------------
+  Plugin     : Advanced Search Engine
+  Author     : Grum
+    email    : grum@piwigo.org
+    website  : http://photos.grum.fr
+
+    << May the Little SpaceFrog be with you ! >>
+  ------------------------------------------------------------------------------
+  See main.inc.php for release information
+
+
+  --------------------------------------------------------------------------- */
+
+  if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+  include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php');
+
+load_language('plugin.lang', ASE_PATH);
+
+class RBCallBackASETag extends GPCSearchCallback {
+
+  /**
+   * the getImageId returns the name of the image id attribute
+   * return String
+   */
+  static public function getImageId()
+  {
+    return(" ase_pitt.image_id ");
+  }
+
+  /**
+   * the getSelect function must return an attribute list separated with a comma
+   *
+   * "att1, att2, att3, att4"
+   */
+  static public function getSelect($param="")
+  {
+    $returned=" ase_ptt.name AS tagName, ase_ptt.id AS tagId ";
+    return($returned);
+  }
+
+  /**
+   * the getFrom function must return a tables list separated with a comma
+   *
+   * "table1, (table2 left join table3 on table2.key = table3.key), table4"
+   */
+  static public function getFrom($param="")
+  {
+    global $prefixeTable;
+
+    return(IMAGE_TAG_TABLE." ase_pitt
+            JOIN ".TAGS_TABLE." ase_ptt
+            ON ase_ptt.id = ase_pitt.tag_id ");
+  }
+
+  /**
+   * the getWhere function must return a ready to use where clause
+   *
+   * "(att1 = value0 OR att2 = value1) AND att4 LIKE value2 "
+   */
+  static public function getWhere($param="")
+  {
+    global $user;
+
+    $returned='';
+    if($param['method']=='OR')
+    {
+      $list=array();
+      foreach($param['tags'] as $tag)
+      {
+        $list[]=$tag['id'];
+      }
+      $returned=" ase_pitt.tag_id IN (".implode(',', $list).")";
+    }
+    return($returned);
+  }
+
+
+  /**
+   * the getHaving function return a ready to user HAVING clause
+   *
+   * " FIND_IN_SET(value0, GROUP_CONCAT(DISTINCT att1 SEPARATOR ',')) AND
+   *   FIND_IN_SET(value0, GROUP_CONCAT(DISTINCT att1 SEPARATOR ',')) "
+   *
+   */
+  static public function getHaving($param="")
+  {
+    $returned='';
+    if($param['method']=='AND')
+    {
+      $tmp=array();
+      foreach($param['tags'] as $tag)
+      {
+        $tmp[]=" FIND_IN_SET(".$tag['id'].", GROUP_CONCAT(DISTINCT ase_pitt.tag_id SEPARATOR ',')) ";
+      }
+      $returned=implode(' AND ', $tmp);
+    }
+    return($returned);
+  }
+
+
+  /**
+   * the getJoin function must return a ready to use where allowing to join the
+   * IMAGES table (key : id) with given conditions
+   *
+   * "att3 = pit.id "
+   */
+  static public function getJoin($param="")
+  {
+    return("ase_pitt.image_id = pit.id");
+  }
+
+
+  /**
+   * the getFilter function must return a ready to use where clause
+   * this where clause is used to filter the cache when the used tables can
+   * return more than one result
+   *
+   * the filter can be empty, can be equal to the where clause, or can be equal
+   * to a sub part of the where clause
+   *
+   */
+  static public function getFilter($param="")
+  {
+    return("");
+  }
+
+  /**
+   * this function is called by the request builder, allowing to display plugin
+   * data with a specific format
+   *
+   * @param Array $attributes : array of ('attribute_name' => 'attribute_value')
+   * @return String : HTML formatted value
+   */
+  static public function formatData($attributes)
+  {
+    /* attributes is an array :
+     *    Array(
+     *      'csColors' => 'color1,color2,color3,...,colorN',
+     *      'csColorsPct' => 'pct1,pct2,pct3,...,pctN'
+     *    );
+     */
+    $returned="<span style='font-weight:bold;'>".l10n('ase_tags')."</span>&nbsp;:&nbsp;";
+    $attributes['tagName']=str_replace('#sep#', ', ', $attributes['tagName']);
+    $returned.=$attributes['tagName'];
+
+    return($returned);
+  }
+
+
+
+  /**
+   * this function is called by the request builder to make the search page, and
+   * must return the HTML & JS code of the dialogbox used to select criterion
+   *
+   * Notes :
+   *  - the dialogbox is a JS object with a public method 'show'
+   *  - when the method show is called, one parameter is given by the request
+   *    builder ; the parameter is an object defined as this :
+   *      {
+   *        cBuilder: an instance of the criteriaBuilder object used in the page,
+   *        eventOK : a callback function, called when the OK button is pushed
+   *        id:
+   *      }
+   *
+   *
+   *
+   *
+   * @param String $mode : can take 'admin' or 'public' values, allowing to
+   *                       return different interface if needed
+   * @return String : HTML formatted value
+   */
+  static public function getInterfaceContent($mode='admin')
+  {
+    return(ASE_functions::dialogBoxASETag());
+  }
+
+  /**
+   * this function returns the label displayed in the criterion menu
+   *
+   * @return String : label displayed in the criterions menu
+   */
+  static public function getInterfaceLabel()
+  {
+    return(l10n('ase_add_tag'));
+  }
+
+  /**
+   * this function returns the name of the dialog box class
+   *
+   * @return String : name of the dialogbox class
+   */
+  static public function getInterfaceDBClass()
+  {
+    return('dialogChooseASETagBox');
+  }
+
+}
+
+?>
Index: /extensions/ASearchEngine/ase_root.class.inc.php
===================================================================
--- /extensions/ASearchEngine/ase_root.class.inc.php	(revision 7373)
+++ /extensions/ASearchEngine/ase_root.class.inc.php	(revision 7374)
@@ -141,17 +141,4 @@
 
 
-    /**
-     *  return all HTML&JS code necessary to display a dialogbox to choose
-     *  tags
-     */
-    static public function dialogBoxASETags()
-    {
-      global $template;
-
-      $template->set_filename('ase_tag_choose',
-                    dirname(__FILE__).'/templates/ase_dialog_tag_choose.tpl');
-
-      return($template->parse('ase_tag_choose', true));
-    }
 
 
@@ -230,4 +217,18 @@
     }
 
+    /**
+     *  return all HTML&JS code necessary to display a dialogbox to choose
+     *  tags on picture
+     */
+    static public function dialogBoxASETag()
+    {
+      global $template;
+
+      $template->set_filename('ase_tag_choose',
+                    dirname(__FILE__).'/templates/ase_dialog_tag_choose.tpl');
+
+      return($template->parse('ase_tag_choose', true));
+    }
+
   } //ASE_functions
 
Index: /extensions/ASearchEngine/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/ASearchEngine/language/en_UK/plugin.lang.php	(revision 7374)
+++ /extensions/ASearchEngine/language/en_UK/plugin.lang.php	(revision 7374)
@@ -0,0 +1,132 @@
+<?php
+
+$lang['To install this plugin, you need to install Grum Plugin Classes %s before']="Pour installer ce plugin, vous devez au préalable installer le plugin Grum Plugin Classes %s";
+
+$lang['ase_release']='r';
+
+$lang['ASETag']="Advanced Search Engine - Tags";
+$lang['ASERate']="Advanced Search Engine - Average rate";
+$lang['ASEDate']="Advanced Search Engine - Dates";
+$lang['ASECategory']="Advanced Search Engine - Categories";
+$lang['ASEKeyword']="Advanced Search Engine - Keywords";
+$lang['ASEHD']="Advanced Search Engine - HD Pictures";
+
+$lang['ase_search']='Search';
+$lang['ase_config']='Configuration';
+
+$lang['ase_search_with_multiple_criteria']="Multi-criterion search";
+
+$lang['ase_ok']="Ok";
+$lang['ase_cancel']="Cancel";
+
+$lang['ase_add_category']="Add one or more categories";
+$lang['ase_add_date']="Add a period";
+$lang['ase_add_keyword']="Add a keyword";
+$lang['ase_add_HD']="Add the presence of an HD picture";
+$lang['ase_add_rate']="Add a rate";
+$lang['ase_add_tag']="Add one or more tags";
+
+
+$lang['ase_choose_categories']="Search to one or more categories";
+$lang['ase_choose_date']="Search over a given period";
+$lang['ase_search_keyword']="Search on a keyword";
+$lang['ase_search_HD']="Search on the presence of an HD picture";
+$lang['ase_search_tags']="Search by tags";
+$lang['ase_choose_rate']="Search by rate";
+
+$lang['ase_categories']="Categories";
+$lang['ase_category']="Category";
+$lang['ase_y']='Yes';
+$lang['ase_n']='No';
+$lang['ase_one_category_must_be_selected']="A category should be selected";
+$lang['ase_searching_in_subcat']="Search in subcategories";
+$lang['ase_with_search_in_subcat']="with search in subcategories";
+
+$lang['ase_search_on_date']="Search on date";
+$lang['ase_date_between']="Between";
+$lang['ase_date_to']="and";
+$lang['ase_image_availability']="availability in gallery";
+$lang['ase_image_shot']="picture's shot";
+$lang['ase_the_date']="Date";
+$lang['ase_is_between']="is between"; // the date is between ... and ...
+$lang['ase_is_between_and']="and"; // the date is between ... and ...
+$lang['ase_is_greater_or_equal']="is greater than or equal to"; //the date is greater or equal than ...
+$lang['ase_is_less_or_equal']="is earlier than or equal to"; // the date is earlier or equal ...
+$lang['ase_is_equal_to']="is equal to"; // the date is ...
+
+$lang['ase_dateCreation']="Shot date";
+$lang['ase_dateAvailable']="Available date";
+
+$lang['ase_error_date_from']="The start date for period is not valid";
+$lang['ase_error_date_to']="The end date for period is not valid";
+$lang['ase_error_date']="Date is not valid";
+$lang['ase_error_period']="The period is invalid: the start date of the period must be earlier or equal to the period end date";
+
+$lang['ase_keyword']="Keywords to found";
+$lang['ase_ignore_case']="Ignore case";
+$lang['ase_whole_words_only']="Whole words only";
+$lang['ase_search_into']="Search into";
+$lang['ase_picture_name']="the picture's name";
+$lang['ase_picture_desc']="the picture's comment";
+$lang['ase_picture_filename']="the picture's file name";
+
+$lang['ase_error_keyword_length']="Keyword to find is too small !";
+$lang['ase_error_no_target']="Search should be made in at least one photo properties";
+$lang['ase_optName']="Name";
+$lang['ase_optDesc']="Comment";
+$lang['ase_optFileName']="File name";
+$lang['ase_search_the_keyword']="Search keyword";
+$lang['ase_search_into_name']="In the picture's name";
+$lang['ase_search_into_desc']="In the picture's comment";
+$lang['ase_search_into_filename']="In the picture's filename";
+$lang['ase_search_with_case_ignored']="Character case is ignored";
+$lang['ase_search_with_whole_words']="On whole words only";
+
+$lang['ase_search_hd']="Search HD pictures";
+
+$lang['ase_the_picture_has_HD']="Présence d'une photo HD";
+$lang['ase_the_picture']="Picture";
+$lang['ase_picture_with_hd']="have a HD picture";
+$lang['ase_picture_without_hd']="don't have a HD picture";
+
+$lang['ase_the_rate']="Rate";
+$lang['ase_dont_have_rate']="picture is not rated";
+$lang['ase_Dont_have_rate']="Picture is not rated"; // with first letter in uppercase
+$lang['ase_average_rate']="Average rate";
+
+$lang['ase_error_rate_range']="The interval is invalid: the minimum rate must be less than or equal to the maximum rate";
+$lang['ase_is_between2']="is between"; // rate is between ... and ...
+$lang['ase_is_between_and2']="and"; // the rate is between ... and ...
+$lang['ase_is_greater_or_equal2']="is greater than or equal to"; // rate is greater or equal than ...
+$lang['ase_is_less_or_equal2']="is less than or equal to"; // rate is less or equal ...
+$lang['ase_is_equal2']="equals"; // rate equals...
+
+
+$lang['ase_config']="Configuration";
+$lang['ase_gallery_integration']="Integration into the gallery";
+$lang['ase_keyword_module']="Module 'Keywords'";
+
+$lang['ase_publicAccess_active']="Replace the Piwigo's search page by <i>Advanced Search Engine</i> search page";
+$lang['ase_publicAccess_allowedPlugins']="Modules available:";
+$lang['ase_publicAccess_applyLimits']="Limit the number of items returned";
+$lang['ase_keyword_minLength']="Minimum number of characters required to accept a search on a keyword";
+
+$lang['ase_error_limit_must_be_integer_gt_0']="The number of items returned must be an integer greater than 0";
+$lang['ase_error_key_word_min_length_must_be_integer_gt_0']="The minimum number of characters must be an integer greater than 0";
+$lang['ase_error_no_module_checked']="If the Piwigo's search page is to be replaced, at least one module must be selected";
+
+$lang['ase_apply']="Apply";
+$lang['ase_config_saved']="The configuration is saved";
+
+$lang['ase_tags']="Tags";
+$lang['ase_tag_start_to_type_text']="Start to type...";
+$lang['ase_tag_x_tags_display']="%s tags displayed";
+$lang['ase_tag_x_tags_found']="%s tags found";
+$lang['ase_tag_method_and']="All selected tags must be present";
+$lang['ase_tag_method_or']="One of the selected tag must be present";
+$lang['ase_tag_method_and_text']="All tags must be present:";
+$lang['ase_tag_method_or_text']="One tag must be present:";
+$lang['ase_error_no_tag_selected']="At least one tag must be selected";
+
+
+?>
Index: /extensions/ASearchEngine/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/ASearchEngine/language/fr_FR/plugin.lang.php	(revision 7373)
+++ /extensions/ASearchEngine/language/fr_FR/plugin.lang.php	(revision 7374)
@@ -5,4 +5,5 @@
 $lang['ase_release']='v';
 
+$lang['ASETag']="Advanced Search Engine - Tags";
 $lang['ASERate']="Advanced Search Engine - Note moyenne";
 $lang['ASEDate']="Advanced Search Engine - Dates";
@@ -24,4 +25,5 @@
 $lang['ase_add_HD']="Ajouter la présence d'une photo HD";
 $lang['ase_add_rate']="Ajouter une note";
+$lang['ase_add_tag']="Ajouter un ou des tags";
 
 
@@ -30,4 +32,5 @@
 $lang['ase_search_keyword']="Recherche sur un mot-clef";
 $lang['ase_search_HD']="Recherche sur la présence d'une photo HD";
+$lang['ase_search_tags']="Recherche par tags";
 $lang['ase_choose_rate']="Recherche par note";
 
@@ -106,8 +109,8 @@
 $lang['ase_publicAccess_active']="Remplacer la page de recherche de Piwigo par celle d'<i>Advanced Search Engine</i>";
 $lang['ase_publicAccess_allowedPlugins']="Modules accessibles :";
-$lang['ase_publicAccess_applyLimits']="Limiter le nombre d'élements restitués";
+$lang['ase_publicAccess_applyLimits']="Limiter le nombre d'éléments restitués";
 $lang['ase_keyword_minLength']="Nombre minimum de caractères requis pour un accepter la recherche sur un mot-clef";
 
-$lang['ase_error_limit_must_be_integer_gt_0']="Le nombre d'élements restitués doit être un entier supérieur à 0";
+$lang['ase_error_limit_must_be_integer_gt_0']="Le nombre d'éléments restitués doit être un entier supérieur à 0";
 $lang['ase_error_key_word_min_length_must_be_integer_gt_0']="Le nombre minimum de caractères doit être un entier supérieur à 0";
 $lang['ase_error_no_module_checked']="Si la page de recherche Piwigo est à remplacer, au moins un module doit être sélectionné";
@@ -116,3 +119,14 @@
 $lang['ase_config_saved']="La configuration est enregistrée";
 
+$lang['ase_tags']="Tags";
+$lang['ase_tag_start_to_type_text']="Commencez votre saisie...";
+$lang['ase_tag_x_tags_display']="%s tags affichés";
+$lang['ase_tag_x_tags_found']="%s tags trouvés";
+$lang['ase_tag_method_and']="Tous les tags sélectionnés doivent être présents";
+$lang['ase_tag_method_or']="Au moins un des tags sélectionnés doit être présent";
+$lang['ase_tag_method_and_text']="Tous les tags doivent être présents :";
+$lang['ase_tag_method_or_text']="Au moins un des tags doit être présent :";
+$lang['ase_error_no_tag_selected']="Au moins un tag doit être sélectionné";
+
+
 ?>
Index: /extensions/ASearchEngine/templates/ase_dialog_category_choose.tpl
===================================================================
--- /extensions/ASearchEngine/templates/ase_dialog_category_choose.tpl	(revision 7373)
+++ /extensions/ASearchEngine/templates/ase_dialog_category_choose.tpl	(revision 7374)
@@ -244,10 +244,11 @@
 
 
+    content+="<div style='font-style:italic;padding-left:15px;'>"
     for(i=0;i<list.length;i++)
     {
-      content+="<br>&nbsp;-&nbsp;"+list[i];
-    }
-
-    content+="</div>";
+      content+=list[i]+"<br>";
+    }
+
+    content+="</div></div>";
 
 
Index: /extensions/ASearchEngine/templates/ase_dialog_date_choose.tpl
===================================================================
--- /extensions/ASearchEngine/templates/ase_dialog_date_choose.tpl	(revision 7373)
+++ /extensions/ASearchEngine/templates/ase_dialog_date_choose.tpl	(revision 7374)
@@ -324,14 +324,14 @@
     {
       case 'eq':
-        content+="{/literal}{'ase_is_equal_to'|@translate}{literal} "+dialogOptions.values.from;
+        content+="{/literal}{'ase_is_equal_to'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.from+'</span>';
         break;
       case 'bt':
-        content+="{/literal}{'ase_is_between'|@translate}{literal} "+dialogOptions.values.from+" {/literal}{'ase_is_between_and'|@translate}{literal} "+dialogOptions.values.to;
+        content+="{/literal}{'ase_is_between'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.from+"</span> {/literal}{'ase_is_between_and'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.to+"</span>";
         break;
       case 'gt':
-        content+="{/literal}{'ase_is_greater_or_equal'|@translate}{literal} "+dialogOptions.values.from;
+        content+="{/literal}{'ase_is_greater_or_equal'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.from+"</span>";
         break;
       case 'lt':
-        content+="{/literal}{'ase_is_less_or_equal'|@translate}{literal} "+dialogOptions.values.to;
+        content+="{/literal}{'ase_is_less_or_equal'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.to+"</span>";
         break;
     }
Index: /extensions/ASearchEngine/templates/ase_dialog_keyword_choose.tpl
===================================================================
--- /extensions/ASearchEngine/templates/ase_dialog_keyword_choose.tpl	(revision 7373)
+++ /extensions/ASearchEngine/templates/ase_dialog_keyword_choose.tpl	(revision 7374)
@@ -232,5 +232,5 @@
     var content="<div>{/literal}{'ase_search_the_keyword'|@translate}{literal}&nbsp;";
 
-    content+="\"<span style='font-weight:bold'>"+dialogOptions.values.keyword+"</span>\"&nbsp:";
+    content+="<span style='font-style:italic;text-decoration:underline;'>"+dialogOptions.values.keyword+"</span>&nbsp:";
 
     if(dialogOptions.values.searchName=='y') content+="<br>&nbsp;-&nbsp;{/literal}{'ase_search_into_name'|@translate}{literal}";
Index: /extensions/ASearchEngine/templates/ase_dialog_rate_choose.tpl
===================================================================
--- /extensions/ASearchEngine/templates/ase_dialog_rate_choose.tpl	(revision 7373)
+++ /extensions/ASearchEngine/templates/ase_dialog_rate_choose.tpl	(revision 7374)
@@ -265,14 +265,14 @@
         break;
       case 'eq':
-        content+="{/literal}{'ase_is_equal2'|@translate}{literal} "+dialogOptions.values.minValue;
+        content+="{/literal}{'ase_is_equal2'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.minValue+"</span>";
         break;
       case 'bt':
-        content+="{/literal}{'ase_is_between2'|@translate}{literal} "+dialogOptions.values.minValue+" {/literal}{'ase_is_between_and'|@translate}{literal} "+dialogOptions.values.maxValue;
+        content+="{/literal}{'ase_is_between2'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.minValue+"</span> {/literal}{'ase_is_between_and2'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.maxValue+"</span>";
         break;
       case 'gt':
-        content+="{/literal}{'ase_is_greater_or_equal2'|@translate}{literal} "+dialogOptions.values.minValue;
+        content+="{/literal}{'ase_is_greater_or_equal2'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.minValue+"</span>";
         break;
       case 'lt':
-        content+="{/literal}{'ase_is_less_or_equal2'|@translate}{literal} "+dialogOptions.values.maxValue;
+        content+="{/literal}{'ase_is_less_or_equal2'|@translate}{literal} <span style='font-style:italic;'>"+dialogOptions.values.maxValue+"</span>";
         break;
     }
Index: /extensions/ASearchEngine/templates/ase_dialog_tag_choose.tpl
===================================================================
--- /extensions/ASearchEngine/templates/ase_dialog_tag_choose.tpl	(revision 7374)
+++ /extensions/ASearchEngine/templates/ase_dialog_tag_choose.tpl	(revision 7374)
@@ -0,0 +1,300 @@
+{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
+{known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
+{known_script id="gpc.tagSelector" src=$ROOT_URL|@cat:"plugins/GrumPluginClasses/js/ui.tagSelector.packed.js"}
+
+{literal}
+
+<script type="text/javascript">
+/**
+ * include this template in a page and use dialogChooseASETagBox.show({options}) to display
+ * the dialog box
+ *
+ */
+dialogChooseASETagBox = function()
+{
+  var dialogOptions = {
+      id:'',
+      eventOk:null,
+      cBuilder:null,
+
+      values: {
+        tags:[],
+        method:'AND'
+      },
+    };
+
+  /**
+   * initialize the dialog box
+   */
+  var initDialogBox = function()
+  {
+    $("#iDialogASETagChoose")
+    .dialog(
+      {
+        autoOpen: false,
+        resizable: false,
+        width:550,
+        height:200,
+        modal: true,
+        draggable:true,
+        dialogClass: 'gcBgTabSheet gcBorder',
+        title: '{/literal}{"ase_search_tags"|@translate}{literal}',
+        open: function(event, ui)
+        {
+        },
+        buttons:
+        {
+          '{/literal}{"ase_ok"|@translate}{literal}':
+            function()
+            {
+              if(checkValidity())
+              {
+                dialogOptions.values.tags=$("#iBDTagTags").tagSelector('value');
+                dialogOptions.values.method=$('[name=fBDTagMethod]:checked').val();
+
+                if(dialogOptions.cBuilder!=null)
+                {
+                  setCBuilderItem(dialogOptions.id, dialogOptions.values);
+                }
+
+                if(dialogOptions.eventOk!=null)
+                {
+                  dialogOptions.eventOk(dialogOptions.id, dialogOptions.values);
+                }
+                $(this).dialog('close');
+              }
+            },
+          '{/literal}{"ase_cancel"|@translate}{literal}':
+            function()
+            {
+              $(this).dialog('close');
+            }
+        }
+      }
+    );
+
+    $("#iBDTagTags").tagSelector(
+      {
+        listMaxWidth:400,
+        listMaxHeight:350,
+        maximumTagLoaded:150,
+        filter:'affected',
+        {/literal}
+        textStart:"{'ase_tag_start_to_type_text'|@translate}",
+        textDisplay:"{'ase_tag_x_tags_display'|@translate}",
+        textFound:"{'ase_tag_x_tags_found'|@translate}",
+          {if is_admin()}
+        mode:'admin',
+          {else}
+        mode:'public',
+          {/if}
+        {literal}
+      }
+    );
+
+  }
+
+  /**
+   * check the validity of the condition
+   * return Boolean : true if OK, otherwise false
+   */
+  var checkValidity = function ()
+  {
+    $(".error").removeClass('error');
+    returned=true;
+
+    if($('#iBDTagTags').tagSelector('numberOfTags')==0)
+    {
+      $('#iBDTagTags').addClass('error');
+      returned=false;
+      alert("{/literal}{'ase_error_no_tags_selected'|@translate}{literal}");
+    }
+    return(returned);
+  }
+
+
+  /**
+   * the show() function display and manage a dialog box to choose categories
+   * and the kind of test to apply
+   *
+   * @param options : properties to manage the dialog box
+   *                  - id : a string to identify a DOM object ; this parameter
+   *                         is given to the callback when the OK button is pushed
+   *                  - values : an object with 3 properties
+   *                               - withHD : with our without HD picture
+   *                  - eventOK : a callback function, with 2 parameters : id of
+   *                              the given DOM object and values parameted
+   *                  - cBuilder : a criteriaBuilder object
+   *                               if set, the dialog box manage automaticaly
+   *                               the criteria builder interface
+   */
+  this.show = function (options)
+  {
+    showDialog(options);
+  }
+
+  /**
+   * private function used to show the dialog box
+   */
+  var showDialog = function(options)
+  {
+    if(options.id!=null)
+    {
+      dialogOptions.id=options.id;
+    }
+    else
+    {
+      dialogOptions.id='';
+    }
+
+    if(options.eventOk!=null)
+    {
+      dialogOptions.eventOk=options.eventOk;
+    }
+
+    if(options.cBuilder!=null)
+    {
+      dialogOptions.cBuilder=options.cBuilder;
+      dialogOptions.cBuilder.doAction('setOptions',
+        {
+          onEdit:function (e) { editCB(e.data); },
+          onDelete:function (e) { deleteCB(e.data); },
+        }
+      );
+    }
+
+    if(options.values!=null)
+    {
+      dialogOptions.values=jQuery.extend(dialogOptions.values, options.values);
+    }
+    else
+    {
+      dialogOptions.values.tags=[];
+      dialogOptions.values.method='AND';
+    }
+
+    $("#iBDTagTags").tagSelector('value', 'clear').tagSelector('value', dialogOptions.values.tags);
+    $('#iBDTagMethodAND').attr('checked', dialogOptions.values.method=='AND');
+    $('#iBDTagMethodOR').attr('checked', dialogOptions.values.method=='OR');
+
+    $("#iDialogASETagChoose").dialog('open');
+  }
+
+
+
+  /**
+   * manage the 'edit' button from criteria builder interface
+   * @param String itemId : the itemId
+   */
+  var editCB = function (itemId)
+  {
+    extraData=dialogOptions.cBuilder.doAction('getExtraData', itemId);
+    showDialog(
+      {
+        id:itemId,
+        values:
+          {
+            tags:extraData.param.tags,
+            method:extraData.param.method,
+          },
+      }
+    );
+  }
+
+  /**
+   * manage the 'delete' button from criteria builder interface
+   * @param String itemId : the itemId
+   */
+  var deleteCB = function (itemId)
+  {
+    dialogOptions.cBuilder.doAction('delete', itemId);
+  }
+
+  /**
+   * set the content for the cBuilder item
+   */
+  var setCBuilderItem = function(id)
+  {
+    var content="";
+
+    for(var i=0;i<dialogOptions.values.tags.length;i++)
+    {
+      if(content!='') content+=', ';
+      content+=dialogOptions.values.tags[i].name;
+    }
+
+
+    if(dialogOptions.values.method=='AND')
+    {
+      content="<div>{/literal}{'ase_tag_method_and_text'|@translate}{literal}&nbsp;<span style='font-style:italic;'>"+content+"</span>";
+    }
+    else
+    {
+      content="<div>{/literal}{'ase_tag_method_or_text'|@translate}{literal}&nbsp;<span style='font-style:italic;'>"+content+"</span>";
+    }
+
+    content+="</div>";
+
+    if(id=='')
+    {
+      //no id:add a new item in the list
+      dialogOptions.cBuilder.doAction(
+        'add',
+        content,
+        criteriaBuilder.makeExtendedData(
+          'ASETag',
+          {
+            tags:dialogOptions.values.tags,
+            method:dialogOptions.values.method,
+          }
+        )
+      );
+    }
+    else
+    {
+      // update item
+      dialogOptions.cBuilder.doAction(
+        'edit',
+        id,
+        content,
+        criteriaBuilder.makeExtendedData(
+          'ASETag',
+          {
+            tags:dialogOptions.values.tags,
+            method:dialogOptions.values.method,
+          }
+        )
+      );
+    }
+  }
+
+  initDialogBox();
+}
+
+
+</script>
+{/literal}
+
+<div id="iDialogASETagChoose" style='display:none;'>
+
+  <table class="formtable">
+    <tr>
+      <td>{'ase_tags'|@translate}</td>
+      <td>
+        <div id="iBDTagTags" style="width:400px;"></div>
+      </td>
+    </tr>
+
+    <tr>
+      <td></td>
+      <td>
+        <label><input type='radio' id='iBDTagMethodAND' name='fBDTagMethod' value="AND">&nbsp;{'ase_tag_method_and'|@translate}</label><br>
+        <label><input type='radio' id='iBDTagMethodOR' name='fBDTagMethod' value="OR">&nbsp;{'ase_tag_method_or'|@translate}</label><br>
+      </td>
+    </tr>
+
+  </table>
+
+</div>
+
+
Index: /extensions/ASearchEngine/themes/Sylvia/ASESylvia.css
===================================================================
--- /extensions/ASearchEngine/themes/Sylvia/ASESylvia.css	(revision 7373)
+++ /extensions/ASearchEngine/themes/Sylvia/ASESylvia.css	(revision 7374)
@@ -14,13 +14,14 @@
 .gcBorder    { border: 1px solid #FF3363; }            /* used for borders */
 .gcBorder2   { border: 1px solid #666666; }            /* used for widgets borders */
-.gcBorderInput { border: 1px solid #666666; }           /* used for inputs */
+.gcBorderInput { border: #666666; }           /* used for inputs */
 .cPnDisabled { cursor:default; color:#666666; }
 .pnInactive:hover { background:#999999; color:#444444; }
 .pnActive { background:#999999; color:#444444; font-weight:bold; }
 div.cbOperatorBg { background:#333333; }
-.ui-datepicker, .ui-category-selector, .ui-category-selector-list {
+.ui-datepicker, .ui-category-selector, .ui-category-selector-list,
+.ui-tag-selector-list, .ui-tag-selector-input {
   background-color:#444444;
   color:#999999;
-  border-color:#666666;
+  border:1px solid #666666;
 }
 .ui-datepicker .ui-datepicker-header { background-color:#222222; }
@@ -28,5 +29,5 @@
 .ui-datepicker td.ui-datepicker-current-day { background-color:#222222; }
 .ui-category-selector-arrow { color:#FF3333; }
-li.ui-category-selector-item:hover { background-color:#303030; }
+li.ui-category-selector-item:hover, li.ui-tag-selector-list-item:hover { background-color:#303030; }
 .ui-category-selector-selected-item { background-color:#777777; }
 .ui-category-selector-expandable-item { background-image:url(expand.png); }
@@ -34,5 +35,28 @@
 li.ui-category-selector-item div.ui-category-selector-check { background-image:url(check_notchecked.png); }
 li.ui-category-selector-selected-item div.ui-category-selector-check { background-image:url(check_checked.png); }
-
+.ui-tag-selector-text {
+  font-style:italic;
+  font-size:80%;
+  border-top:1px dotted #666666;
+  background:#444444;
+  color:#999999;
+}
+.ui-tag-selector-selected-tag-list li.ui-tag-selector-selected-tag {
+  background:#666666;
+  color:#999999;
+  margin-top:1px;
+  padding-top:1px;
+}
+.ui-tag-selector-highlight {
+  color:#FF7700;
+  font-weight:bold;
+  background:#666666;
+}
+.iconEdit { background:url(edit.png) no-repeat 0 0 transparent; }
+.iconDelete { background:url(./../../../../themes/Sylvia/icon/delete.png) no-repeat 0 0 transparent; }
+.iconMove { background:url(move.png) no-repeat 0 0 transparent; }
+.iconSwitchCondition  { background:url(switch.png) no-repeat 0 0 transparent; }
+.cbItemMultiple { border:1px solid #666666; }
+.cbItemOverGroup { border:1px dotted #666666; }
 
 /* AMD specific CSS */
Index: /extensions/ASearchEngine/themes/clear/ASEclear.css
===================================================================
--- /extensions/ASearchEngine/themes/clear/ASEclear.css	(revision 7373)
+++ /extensions/ASearchEngine/themes/clear/ASEclear.css	(revision 7374)
@@ -12,5 +12,5 @@
 .gcBorder    { border: 1px solid gray; }            /* used for borders */
 .gcBorder2   { border: 1px solid #666666; }            /* used for widgets borders */
-.gcBorderInput { border: 1px solid gray; }           /* used for inputs */
+.gcBorderInput { border: gray; }           /* used for inputs */
 .cPnDisabled { cursor:default; color:#666666; }
 .pnInactive:hover { background:#999999; color:#F5F5F5; }
@@ -18,8 +18,9 @@
 div.cbOperatorBg { background:#D3D3D3; color:#005E89; }
 .ui-dialog { border-width:3px; }
-.ui-datepicker, .ui-category-selector-list {
+.ui-datepicker, .ui-category-selector-list,
+.ui-tag-selector-list, .ui-tag-selector-input {
   background-color:#F5F5F5;
   color:#000000;
-  border-color:gray;
+  border:1px solid gray;
 }
 .ui-category-selector {
@@ -32,5 +33,5 @@
 .ui-datepicker td.ui-datepicker-current-day { background-color:#D3D3D3; }
 .ui-category-selector-arrow { color:#005E89; }
-li.ui-category-selector-item:hover { background-color:#EEEEEE; color:#858460; }
+li.ui-category-selector-item:hover, li.ui-tag-selector-list-item:hover { background-color:#EEEEEE; color:#858460; }
 .ui-category-selector-selected-item { background-color:#D3D3D3; }
 .ui-category-selector-expandable-item { background-image:url(expand.png); }
@@ -38,5 +39,27 @@
 li.ui-category-selector-item div.ui-category-selector-check { background-image:url(check_notchecked.png); }
 li.ui-category-selector-selected-item div.ui-category-selector-check { background-image:url(check_checked.png); }
-
+.ui-tag-selector-text {
+  font-style:italic;
+  font-size:80%;
+  border-top:1px dotted gray;
+  background:#F5F5F5;
+  color:#000000;
+}
+.ui-tag-selector-selected-tag-list li.ui-tag-selector-selected-tag {
+  background:#D3D3D3;
+  margin-top:1px;
+  padding-top:1px;
+}
+.ui-tag-selector-highlight {
+  color:#005E89;
+  font-weight:bold;
+  background:#EEEEEE;
+}
+.iconEdit { background:url(./../../../../themes/default/icon/edit.png) no-repeat 0 0 transparent; }
+.iconDelete { background:url(./../../../../themes/default/icon/delete.png) no-repeat 0 0 transparent; }
+.iconMove { background:url(move.png) no-repeat 0 0 transparent; }
+.iconSwitchCondition  { background:url(switch.png) no-repeat 0 0 transparent; }
+.cbItemMultiple { border:1px solid #999999; }
+.cbItemOverGroup { border:1px dotted #999999; }
 
 /* AMD specific CSS */
Index: /extensions/ASearchEngine/themes/dark/ASEdark.css
===================================================================
--- /extensions/ASearchEngine/themes/dark/ASEdark.css	(revision 7373)
+++ /extensions/ASearchEngine/themes/dark/ASEdark.css	(revision 7374)
@@ -12,5 +12,5 @@
 .gcBorder    { border: 1px solid gray; }            /* used for borders */
 .gcBorder2   { border: 1px solid #666666; }            /* used for widgets borders */
-.gcBorderInput { border: 1px solid gray; }           /* used for inputs */
+.gcBorderInput { border: gray; }           /* used for inputs */
 .cPnDisabled { cursor:default; color:#666666; }
 .pnInactive:hover { background:gray; color:#fff48e; }
@@ -18,8 +18,9 @@
 div.cbOperatorBg { background:gray; color:#FFF48E; }
 .ui-dialog { border-width:3px; }
-.ui-datepicker, .ui-category-selector-list {
+.ui-datepicker, .ui-category-selector-list,
+.ui-tag-selector-list, .ui-tag-selector-input {
   background-color:#F5F5F5;
   color:#000000;
-  border-color:gray;
+  border:1px solid gray;
 }
 .ui-category-selector {
@@ -33,5 +34,5 @@
 .ui-datepicker td.ui-datepicker-current-day { background-color:#505050; color:#fff48e; }
 .ui-category-selector-arrow { color:#000000; }
-li.ui-category-selector-item:hover { background-color:gray; color:#fff48e; }
+li.ui-category-selector-item:hover, li.ui-tag-selector-list-item:hover  { background-color:gray; color:#fff48e; }
 .ui-category-selector-selected-item { background-color:#505050; color:#fff48e; }
 .ui-category-selector-expandable-item { background-image:url(expand_b.png); }
@@ -41,4 +42,28 @@
 li.ui-category-selector-item div.ui-category-selector-check { background-image:url(check_notchecked.png); }
 li.ui-category-selector-selected-item div.ui-category-selector-check { background-image:url(check_checked.png); }
+
+.ui-tag-selector-text {
+  font-style:italic;
+  font-size:80%;
+  border-top:1px dotted gray;
+  background:#F5F5F5;
+  color:#000000;
+}
+.ui-tag-selector-selected-tag-list li.ui-tag-selector-selected-tag {
+  background:#D3D3D3;
+  margin-top:1px;
+  padding-top:1px;
+}
+.ui-tag-selector-highlight {
+  color:#000000;
+  font-weight:bold;
+  background:#D3D3D3;
+}
+.iconEdit { background:url(./../../../../themes/default/icon/edit.png) no-repeat 0 0 transparent; }
+.iconDelete { background:url(./../../../../themes/default/icon/delete.png) no-repeat 0 0 transparent; }
+.iconMove { background:url(move.png) no-repeat 0 0 transparent; }
+.iconSwitchCondition  { background:url(switch.png) no-repeat 0 0 transparent; }
+.cbItemMultiple { border:1px solid gray; }
+.cbItemOverGroup { border:1px dotted gray; }
 
 .cbButtons { color:#000000; border:1px solid gray; z-index:510; }
