Projet Socle ENT
Pages enfant
  • Cacher les onglets vides

Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.
Commentaire: Migrated to Confluence 5.3

...

Seuls les onglets non modifiables par l'utilisateur final devront être cachés. Ainsi, on gardera la fonctionnalité d'ajout d'onglet par l'utilisateur.

Nous allons modifier navigation.xsl comme suit :

Bloc de code
--- a/Portail/uPortal_rel-3.2.4/uportal-war/src/main/resources/layout/theme/universality/navigation.xsl

...


+++ b/Portail/uPortal_rel-3.2.4/uportal-war/src/main/resources/layout/theme/universality/navigation.xsl

...


@@ -121,8 +121,21

...

 @@
         <xsl:otherwise></xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
+    <xsl:variable name="NAV_EMPTY"> <!-- Determine whether the navigation tab has child and add a css hook. -->

...


+      <xsl:choose>
+        <xsl:when test="not(tabChannel)">empty-tab</xsl:

...

when>
+        <xsl:otherwise></xsl:otherwise>
+      </xsl:

...

choose>
+    </xsl:

...

variable>
+    <xsl:variable name="NAV_NOADDCHILD"> <!-- Determine whether the navigation tab can have more child and add a css hook. -->

...


+      <xsl:choose>
+        <xsl:when test="@dlm:addChildAllowed='false'">noaddchild-tab</xsl:

...

when>
+        <xsl:otherwise></xsl:otherwise>
+      </xsl:

...

choose>
+    </xsl:

...

variable>
+
     
-   
 <li id="portalNavigation_{@ID}" class="portal-navigation {$NAV_POSITION} {$NAV_ACTIVE} {$NAV_MOVABLE}"> <!-- Each 
navigation menu item.

...

  The unique ID c

...


+    <li 
id="portalNavigation_{@ID}" class="portal-navigation {$NAV_POSITION} {$NAV_ACTIVE} {$NAV_MOVABLE} {$NAV_EMPTY} {$NAV_NOADDCHILD}"> <!--
 Each

...

 navigat
       <a id="tabLink_{@ID}" 
href="{$BASE_ACTION_URL}?uP_root=root&amp;uP_sparam=activeTab&amp;activeTab={position()}"
 class="portal-navigation-link"

...

>  <!--

...

 
         <span class="portal-navigation-label"

...

><xsl:value-of select="@name"/></span>

...


       </a>

Puis, nous ajoutons le CSS suivant :

Bloc de code
--- a/Portail/uPortal_rel-3.2.4/uportal-war/src/main/webapp/media/skins/universality/uportal3/esup-portal.css
+++ b/Portail/uPortal_rel-3.2.4/uportal-war/src/main/webapp/media/skins/universality/uportal3/esup-portal.css
@@ -108,3 +108,7 @@
 .fl-theme-mist a {
     color: #263F82 !important;
 }
+
+.up #portalNavigation .fl-tabs li.portal-navigation.empty-tab.noaddchild-tab {
+    display: none;
+}