SHARE
TWEET

Untitled

josegar74 Jun 25th, 2018 (edited) 138 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. GeoNetwork 3.2.1 filter by categories in home page
  2. ==================================================
  3.  
  4. WEB-INF/config-summary.xml
  5. --------------------------
  6.  
  7.  <summaryType name="details" format="DIMENSION">
  8.       <item facet="type" translator="codelist:gmd:MD_ScopeCode"/>
  9.       <item facet="topicCat" translator="codelist:gmd:MD_TopicCategoryCode" max="20"/>
  10.       <item facet="category" max="99" sortBy="value"
  11.             translator="db:org.fao.geonet.repository.MetadataCategoryRepository:findOneByName"/>
  12.  
  13.   ...
  14.  
  15.   <summaryType name="hits">
  16.      <item facet="type" translator="codelist:gmd:MD_ScopeCode"/>
  17.      <item facet="topicCat" translator="codelist:gmd:MD_TopicCategoryCode" max="20"/>
  18.      <item facet="category" max="99" sortBy="value"
  19.            translator="db:org.fao.geonet.repository.MetadataCategoryRepository:findOneByName"/>
  20.  
  21.  
  22.  
  23. catalog/views/default/templates/home.html
  24. -----------------------------------------
  25.  
  26.  <div class="row" data-ng-show="searchInfo.count > 0">
  27.     <div class="col-sm-8" data-ng-show="browse !== ''">
  28.       <span data-translate="">browseBy</span>
  29.       <span
  30.         data-ng-show="(searchInfo.facet['inspireThemes'].length > 0 && searchInfo.facet['topicCats'].length > 0) ||
  31.                       (searchInfo.facet['inspireThemes'].length > 0 && searchInfo.facet['categories'].length > 0) ||
  32.                       (searchInfo.facet['topicCats'].length > 0 && searchInfo.facet['categories'].length > 0)">
  33.         <label data-ng-show="searchInfo.facet['inspireThemes'].length > 0">
  34.           <input type="radio" name="browse" value="inspire" data-ng-model="browse"/>
  35.           <span data-translate="">inspireThemes</span>
  36.         </label>
  37.         <label data-ng-show="searchInfo.facet['topicCats'].length > 0">
  38.           <input type="radio" name="browse" value="topics" data-ng-model="browse"/>
  39.           <span data-translate="">topics</span>
  40.         </label>
  41.           <label data-ng-show="searchInfo.facet['categories'].length > 0">
  42.           <input type="radio" name="browse" value="categories" data-ng-model="browse"/>
  43.           <span data-translate="">categories</span>
  44.         </label>
  45.       </span>
  46.       <label
  47.         data-ng-show="searchInfo.facet['inspireThemes'].length > 0 && searchInfo.facet['topicCats'].length == 0 && searchInfo.facet['categories'].length == 0"><span
  48.         data-translate="">inspireThemes</span></label>
  49.       <label
  50.         data-ng-show="searchInfo.facet['topicCats'].length > 0 && searchInfo.facet['inspireThemes'].length == 0 && searchInfo.facet['categories'].length == 0"><span
  51.         data-translate="">topics</span></label>
  52.       <label
  53.         data-ng-show="searchInfo.facet['categories'].length > 0 && searchInfo.facet['topicCats'].length == 0 && searchInfo.facet['inspireThemes'].length == 0"><span
  54.         data-translate="">categories</span></label>
  55.       <div class="row">
  56.         <span id="chips-card" data-ng-repeat="(key, facet) in searchInfo.facet['categories']"
  57.               class="col-xs-6 col-sm-4 col-lg-3" data-ng-show="browse === 'categories'">
  58.             <div class="badge-icon">
  59.               <a data-ng-href="#/search?facet.q=category%2F{{facet['@name']}}">
  60.                 <span class="badge-result badge-result-topic">
  61.                   <i class="fa fa-3x fa-table gn-icon gn-icon-{{facet['@name']}}"></i>
  62.                 </span>
  63.               </a>
  64.             </div>
  65.             <div class="badge-text">
  66.               <a title="{{facet['@label']}}"
  67.                  data-ng-href="#/search?facet.q=category%2F{{facet['@name']}}">
  68.                 <span class="gn-icon-label">{{facet['@label']}}</span><br>
  69.                 <span class="badge">{{facet['@count']}}</span>
  70.               </a>
  71.             </div>
  72.         </span>
  73.  
  74.         <span id="chips-card" data-ng-repeat="(key, facet) in searchInfo.facet['topicCats']"
  75.   ...
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top