Subversion Repositories wimsdev

Rev

Rev 14734 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! --------- fichier copiƩ depuis scripts/adm/search_engine. ---------
  2. !! --------- a mettre ailleurs ? ---------
  3.  
  4. !read adm/search_engine/completion.phtml
  5.  
  6. !set wims_ref_anchor=#searchform
  7.  
  8. <div class="search_box wims_widget_box medium_size float_left" id="searchform">
  9.   !set wims_form_method=post
  10.   !form new
  11.     <input type="hidden" name="module" value="home">
  12.  
  13.     !if $wims_accessright!=$empty
  14.       !read adm/search_engine/search_accessright.phtml
  15.     !endif
  16.  
  17.     <div class="title_box">
  18.       <h2 class="wims_title">$name_search_all</h2>
  19.       <div class="aide_recherche">
  20.        !set wims_ref_class=wims_button_help
  21.        !href module=adm/light&phtml=search_engine.phtml.$lang $wims_name_help
  22.       </div>
  23.       <br class="clearall">
  24.     </div>
  25.  
  26.     <div class="box_content">
  27.       <div class="input-group">
  28.         <label class="show-for-sr" id="keywords_label" for="search_keywords">$name_search_all</label>
  29.         <input type="search"
  30.                size="16"
  31.                name="search_keywords"
  32.                value="$search_keywords"
  33.                class="wims_home_form multicomplete input-group-field"
  34.                placeholder="$name_keywords_enter"
  35.                autosave="search_keywords"
  36.                results="5"
  37.                aria-labelledby="keywords_label">
  38.         <div class="input-group-button">
  39.           <button class="wims_button icon_button" type="submit">
  40.             <span class="Searching">$N_Search</span>
  41.           </button>
  42.         </div>
  43.       </div>
  44.  
  45.       <div class="float_right">
  46.         !set wims_ref_class=text_icon browse
  47.         !href module=adm/browse $wims_name_browse
  48.       </div>
  49.  
  50.       !if $jquery_defined=yes
  51.         <script>
  52.           jQuery(function($$){
  53.             // Get in sessionStorage if affined_search was previously uncollapsed
  54.             var affined_search_state = sessionStorage.getItem("affined_search_state");
  55.             //console.log("affined_search_state="+affined_search_state);
  56.             affined_search_state = !affined_search_state ? false : Number(affined_search_state);
  57.             // Display all affined search fields in a collapsible way
  58.             $$("#affined_search").accordion({
  59.               collapsible: true,
  60.               active: affined_search_state,
  61.               heightStyle: "content",
  62.               activate : function( event, ui ) {
  63.                   affined_search_state = $$("#affined_search").accordion("option", "active");
  64.                   sessionStorage.setItem("affined_search_state", affined_search_state);
  65.                   //console.log("affined_search_state="+affined_search_state);
  66.               }
  67.             });
  68.           } );
  69.         </script>
  70.       !endif
  71.  
  72.       <fieldset id="affined_search">
  73.         <legend>$name_search_filters</legend>
  74.  
  75.         <div class="accordion-content">
  76.           <div class="input-group">
  77.             !!-- search type -->
  78.             <label class="input-group-label" for="search_category">$wims_name_Type</label>
  79.             !formselect search_category list $slist prompt $plist
  80.           </div>
  81.           <div class="input-group">
  82.             !!-- search lang -->
  83.             <label class="input-group-label" for="search_lang">$wims_name_Language</label>
  84.             !default search_lang=$lang
  85.             !set L_language=!words2items $wims_site_languages
  86.             !formselect search_lang list $L_language
  87.           </div>
  88.           <div class="input-group">
  89.             !!-- search method -->
  90.             <label class="input-group-label" for="search_and">$name_search_method</label>
  91.             !default search_and=no
  92.             !formselect search_and list yes,no prompt $name_search_and
  93.           </div>
  94.  
  95.           <div class="wimscenter">
  96.             <strong>$wims_name_level</strong>
  97.             !if $jquery_defined=yes
  98.               !read adm/search_engine/level_form.phtml
  99.             !else
  100.               <div class="search_level_list">
  101.                 !formcheckbox search_level list $listlevel prompt $Listlevel
  102.               </div>
  103.             !endif
  104.           </div>
  105.         </div>
  106.       </fieldset>
  107.     </div>
  108.   !formend
  109.  
  110.   <script src="scripts/js/interface/search_engine.js"></script>
  111.  
  112.   !set srchl=$search_keywords
  113.   !reset search_category, search_keywords
  114.  
  115. </div>
  116.  
  117.  
  118.