|
|
Choosing A Webhost: |
svn commit: r234489 - in /lenya/trunk/src: java/org/apache/lenya/cms/site/u: msg#00062cms.lenya.cvs
Author: andreas Date: Mon Aug 22 06:57:11 2005 New Revision: 234489 URL: http://svn.apache.org/viewcvs?rev=234489&view=rev Log: Don't apply admin menu for each publet (fixes bug #36277), don't show "New ..." items from publets in admin menu Modified: lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java lenya/trunk/src/publets/links/config/menu.xsp lenya/trunk/src/publets/search/config/menu.xsp lenya/trunk/src/publets/xhtml/config/menu.xsp lenya/trunk/src/webapp/global-sitemap.xmap lenya/trunk/src/webapp/lenya/xslt/menu/merge-menus.xsl Modified: lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java?rev=234489&r1=234488&r2=234489&view=diff ============================================================================== --- lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java (original) +++ lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java Mon Aug 22 06:57:11 2005 @@ -46,14 +46,13 @@ super.initParameters(); Document parent = getSourceDocument(); - if (parent != null) { - setParameter(PARENT_ID, parent.getId()); - } else { + if (parent == null) { setParameter(PARENT_ID, ""); + } else { + setParameter(PARENT_ID, parent.getId()); + String[] languages = parent.getPublication().getLanguages(); + setParameter(LANGUAGES, languages); } - - String[] languages = parent.getPublication().getLanguages(); - setParameter(LANGUAGES, languages); String[] relations = { RELATION_CHILD, RELATION_AFTER }; setParameter(RELATIONS, relations); Modified: lenya/trunk/src/publets/links/config/menu.xsp URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/links/config/menu.xsp?rev=234489&r1=234488&r2=234489&view=diff ============================================================================== --- lenya/trunk/src/publets/links/config/menu.xsp (original) +++ lenya/trunk/src/publets/links/config/menu.xsp Mon Aug 22 06:57:11 2005 @@ -37,7 +37,7 @@ <menus> <menu i18n:attr="name" name="File"> - <block> + <block admin="false"> <item uc:usecase="site.create" href="?doctype=links"><i18n:text>New Links Document</i18n:text></item> </block> </menu> Modified: lenya/trunk/src/publets/search/config/menu.xsp URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/search/config/menu.xsp?rev=234489&r1=234488&r2=234489&view=diff ============================================================================== --- lenya/trunk/src/publets/search/config/menu.xsp (original) +++ lenya/trunk/src/publets/search/config/menu.xsp Mon Aug 22 06:57:11 2005 @@ -32,7 +32,7 @@ <menus> <menu i18n:attr="name" name="File"> - <block> + <block admin="false"> <item uc:usecase="site.create" href="?doctype=search"><i18n:text>New Search Page</i18n:text></item> </block> </menu> Modified: lenya/trunk/src/publets/xhtml/config/menu.xsp URL: http://svn.apache.org/viewcvs/lenya/trunk/src/publets/xhtml/config/menu.xsp?rev=234489&r1=234488&r2=234489&view=diff ============================================================================== --- lenya/trunk/src/publets/xhtml/config/menu.xsp (original) +++ lenya/trunk/src/publets/xhtml/config/menu.xsp Mon Aug 22 06:57:11 2005 @@ -37,7 +37,7 @@ <menus> <menu i18n:attr="name" name="File"> - <block> + <block admin="false"> <item uc:usecase="site.create" href="?doctype=xhtml"><i18n:text>New XHTML Document</i18n:text></item> </block> </menu> Modified: lenya/trunk/src/webapp/global-sitemap.xmap URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/global-sitemap.xmap?rev=234489&r1=234488&r2=234489&view=diff ============================================================================== --- lenya/trunk/src/webapp/global-sitemap.xmap (original) +++ lenya/trunk/src/webapp/global-sitemap.xmap Mon Aug 22 06:57:11 2005 @@ -214,12 +214,6 @@ <!-- menus --> - <!-- menu-xml/{publication-id}/admin/... --> - <map:match pattern="menu-xml/*/admin/**" internal-only="true"> - <map:generate type="serverpages" src="lenya/content/menus/admin.xsp"/> - <map:serialize type="xml"/> - </map:match> - <!-- menu-xml/publets --> <!-- menu-xml/publets/{pub-id}/{area}.xml --> <map:match pattern="menu-xml/publets/*/*.xml"> @@ -241,6 +235,12 @@ <map:serialize type="xml"/> </map:otherwise> </map:select> + </map:match> + + <!-- menu-xml/{publication-id}/admin/... --> + <map:match pattern="menu-xml/*/admin/**" internal-only="true"> + <map:generate type="serverpages" src="lenya/content/menus/admin.xsp"/> + <map:serialize type="xml"/> </map:match> <!-- menu-xml/{publication-id}/... --> Modified: lenya/trunk/src/webapp/lenya/xslt/menu/merge-menus.xsl URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/xslt/menu/merge-menus.xsl?rev=234489&r1=234488&r2=234489&view=diff ============================================================================== --- lenya/trunk/src/webapp/lenya/xslt/menu/merge-menus.xsl (original) +++ lenya/trunk/src/webapp/lenya/xslt/menu/merge-menus.xsl Mon Aug 22 06:57:11 2005 @@ -32,6 +32,9 @@ </xsl:template> +<!-- +Apply the first <menus>. +--> <xsl:template match="menu:menus[not(preceding-sibling::menu:menus)]"> <xsl:copy> <xsl:apply-templates select="menu:menu"/> @@ -39,6 +42,11 @@ </xsl:template> +<!-- +Apply the <menu> children of the first <menus>. +Insert items of publet menus (which have preceding siblings) +before the items of this menu. +--> <xsl:template match="/menu:menu/menu:menus[1]/menu:menu"> <xsl:copy> <xsl:apply-templates select="@*"/>
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |