Uploaded image for project: 'Skin Intranet'
  1. Skin Intranet
  2. SKININTRA-212

Remove restriction on tags on personal news search service

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.3.0
    • None
    • None
    • None

      The restriction was committed by mistake.
      The restriction was about to display in theme dropdown only the first level tags of 'CONTENT_CATEGORIES" category

      <xsl:template match="criterion[starts-with(@name, 'user.input.criterion.ContentSearchable$systemProperty$tags')]" mode="field-input">
              <xsl:param name="value"/>
              
              <xsl:variable name="criterion-name" select="@name"/>
              
                   <xsl:for-each select="enumeration/item">
                      <xsl:sort select="label" />
                      
                      <!-- Extract tag'name from value {"value":"TAG_NAME", "autoposting": true} -->
                      <xsl:variable name="tagName" select="substring-before(substring-after(@value, ':&quot;'), '&quot;,')"/>
                      <!-- Filter tags: only direct tags of CONTENT_CATEGORIES tag -->
                      <xsl:if test="ametys:tagParent($site, $tagName) = 'CONTENT_CATEGORIES'">
                           <div class="item-checkbox">
                               <xsl:variable name="id-checkbox"><xsl:call-template name="criterion-id"/></xsl:variable>
                               <xsl:variable name="onclick">
                                  <xsl:call-template name="search-js-submit-button">
                                      <xsl:with-param name="callback-function">
                                          lauchCarousel_<xsl:value-of select="$uniqueId"/>
                                      </xsl:with-param>
                                  </xsl:call-template>
                              </xsl:variable>
                          
                              <input onchange="{$onclick}" id="{$id-checkbox}-{position()}" type="checkbox" name="user.input.criterion.ContentSearchable$systemProperty$tags$1" value="{@value}">
                                <xsl:if test="$value = @value">
                                      <xsl:attribute name="checked">checked</xsl:attribute>
                                </xsl:if>
                              </input>
                                  
                             <label for="{$id-checkbox}-{position()}" class="checked">
                                 <xsl:value-of select="label"/>
                             </label>
                           </div>
                      </xsl:if>
                  </xsl:for-each>
          </xsl:template>
      

            Unassigned Unassigned
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: