@@ -716,53 +716,60 @@ exclude-result-prefixes="#all">
716716 <xsl : template match =" srx:sparql" mode =" bs2:BreadCrumbBar" />
717717
718718 <xsl : template match =" rdf:RDF | srx:sparql" mode =" bs2:NavBarNavList" >
719- <xsl : if test =" $foaf:Agent//@rdf:about" >
720- <ul class =" nav pull-right" >
721- <xsl : variable name =" user-defined-apps" select =" if (doc-available($app-request-uri)) then document($app-request-uri)//*[lapp:origin/@rdf:resource] else ()" as =" element()*" />
722- <xsl : variable name =" system-apps" select =" $lapp:Context//*[rdf:type/@rdf:resource = '&lapp; EndUserApplication'][lapp:origin/@rdf:resource]" as =" element()*" />
719+ <xsl : apply-templates select =" ." mode =" bs2:DataspaceNavList" />
723720
724- <xsl : if test =" exists($user-defined-apps) or exists($system-apps)" >
725- <li >
726- <div class =" btn-group" >
727- <button class =" btn dropdown-toggle" title =" {ac:label(key('resources', 'application-list-title', document('translations.rdf')))}" >
728- <xsl : apply-templates select =" key('resources', 'applications', document('translations.rdf'))" mode =" ldh:logo" >
729- <xsl : with-param name =" class" select =" 'btn dropdown-toggle'" />
730- </xsl : apply-templates >
731- </button >
732- <ul class =" dropdown-menu pull-right" >
733- <xsl : if test =" exists($user-defined-apps)" >
734- <li class =" nav-header" >
735- <xsl : value-of select =" ac:label(key('resources', 'user-defined-apps', document('translations.rdf')))" />
721+ <xsl : apply-templates select =" ." mode =" bs2:SignUp" />
722+ </xsl : template >
723+
724+ <xsl : template match =" rdf:RDF[key('apps-by-origin', $lapp:origin, $lapp:Context)/rdf:type/@rdf:resource = '&lapp;EndUserApplication'] | srx:sparql[key('apps-by-origin', $lapp:origin, $lapp:Context)/rdf:type/@rdf:resource = '&lapp;EndUserApplication']" mode =" bs2:DataspaceNavList" priority =" 1" >
725+ <ul class =" nav pull-right" >
726+ <xsl : variable name =" user-defined-apps" select =" if (doc-available($app-request-uri)) then document($app-request-uri)//*[lapp:origin/@rdf:resource] else ()" as =" element()*" />
727+ <xsl : variable name =" system-apps" select =" $lapp:Context//*[rdf:type/@rdf:resource = '&lapp; EndUserApplication'][lapp:origin/@rdf:resource]" as =" element()*" />
728+
729+ <xsl : if test =" exists($user-defined-apps) or exists($system-apps)" >
730+ <li >
731+ <div class =" btn-group" >
732+ <button class =" btn dropdown-toggle" title =" {ac:label(key('resources', 'application-list-title', document('translations.rdf')))}" >
733+ <xsl : apply-templates select =" key('resources', 'applications', document('translations.rdf'))" mode =" ldh:logo" >
734+ <xsl : with-param name =" class" select =" 'btn dropdown-toggle'" />
735+ </xsl : apply-templates >
736+ </button >
737+ <ul class =" dropdown-menu pull-right" >
738+ <xsl : if test =" exists($user-defined-apps)" >
739+ <li class =" nav-header" >
740+ <xsl : value-of select =" ac:label(key('resources', 'user-defined-apps', document('translations.rdf')))" />
741+ </li >
742+ <xsl : for-each select =" $user-defined-apps" >
743+ <xsl : sort select =" ac:label(.)" order =" ascending" lang =" {$ldt:lang}" />
744+ <li >
745+ <a href =" {lapp:origin/@rdf:resource}/" title =" {lapp:origin/@rdf:resource}" >
746+ <xsl : apply-templates select =" ." mode =" ac:label" />
747+ </a >
736748 </li >
737- <xsl : for-each select =" $user-defined-apps" >
738- <xsl : sort select =" ac:label(.)" order =" ascending" lang =" {$ldt:lang}" />
739- <li >
740- <a href =" {lapp:origin/@rdf:resource}/" title =" {lapp:origin/@rdf:resource}" >
741- <xsl : apply-templates select =" ." mode =" ac:label" />
742- </a >
743- </li >
744- </xsl : for-each >
749+ </xsl : for-each >
750+ </xsl : if >
751+ <xsl : if test =" exists($system-apps)" >
752+ <xsl : if test =" exists($user-defined-apps)" >
753+ <li class =" divider" />
745754 </xsl : if >
746- <xsl : if test =" exists($system-apps)" >
747- <xsl : if test =" exists($user-defined-apps)" >
748- <li class =" divider" />
749- </xsl : if >
750- <li class =" nav-header" >
751- <xsl : value-of select =" ac:label(key('resources', 'system-apps', document('translations.rdf')))" />
755+ <li class =" nav-header" >
756+ <xsl : value-of select =" ac:label(key('resources', 'system-apps', document('translations.rdf')))" />
757+ </li >
758+ <xsl : for-each select =" $system-apps" >
759+ <xsl : sort select =" ac:label(.)" order =" ascending" lang =" {$ldt:lang}" />
760+ <li >
761+ <a href =" {lapp:origin/@rdf:resource}/" title =" {lapp:origin/@rdf:resource}" >
762+ <xsl : apply-templates select =" ." mode =" ac:label" />
763+ </a >
752764 </li >
753- <xsl : for-each select =" $system-apps" >
754- <xsl : sort select =" ac:label(.)" order =" ascending" lang =" {$ldt:lang}" />
755- <li >
756- <a href =" {lapp:origin/@rdf:resource}/" title =" {lapp:origin/@rdf:resource}" >
757- <xsl : apply-templates select =" ." mode =" ac:label" />
758- </a >
759- </li >
760- </xsl : for-each >
761- </xsl : if >
762- </ul >
763- </div >
764- </li >
765- </xsl : if >
765+ </xsl : for-each >
766+ </xsl : if >
767+ </ul >
768+ </div >
769+ </li >
770+ </xsl : if >
771+
772+ <xsl : if test =" $foaf:Agent//*[@rdf:about]" >
766773 <li >
767774 <xsl : apply-templates select =" ." mode =" bs2:Settings" />
768775 </li >
@@ -783,12 +790,10 @@ exclude-result-prefixes="#all">
783790 </ul >
784791 </div >
785792 </li >
786- </ul >
787- </xsl : if >
788-
789- <xsl : apply-templates select =" ." mode =" bs2:SignUp" />
793+ </xsl : if >
794+ </ul >
790795 </xsl : template >
791-
796+
792797 <!-- SIGNUP -->
793798
794799 <xsl : template match =" rdf:RDF[not($foaf:Agent//@rdf:about)][key('apps-by-origin', $lapp:origin, $lapp:Context)/rdf:type/@rdf:resource = '&lapp;EndUserApplication'] | srx:sparql[not($foaf:Agent//@rdf:about)][key('apps-by-origin', $lapp:origin, $lapp:Context)/rdf:type/@rdf:resource = '&lapp;EndUserApplication']" mode =" bs2:SignUp" priority =" 1" >
0 commit comments