|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
[gatewiki-commits] SF.net SVN: gatewiki:[1757] trunk/cow/grails-appRevision: 1757
http://gatewiki.svn.sourceforge.net/gatewiki/?rev=1757&view=rev Author: ian_roberts Date: 2009-10-27 12:41:51 +0000 (Tue, 27 Oct 2009) Log Message: ----------- Exposed pageURI as a method in PageLinkTagLib, and corrected PageService to use this rather than pageURIBase when creating the URIs for 404, print, etc. Modified Paths: -------------- trunk/cow/grails-app/services/PageService.groovy trunk/cow/grails-app/taglib/PageLinkTagLib.groovy Modified: trunk/cow/grails-app/services/PageService.groovy =================================================================== --- trunk/cow/grails-app/services/PageService.groovy 2009-10-27 11:59:43 UTC (rev 1756) +++ trunk/cow/grails-app/services/PageService.groovy 2009-10-27 12:41:51 UTC (rev 1757) @@ -56,10 +56,10 @@ pm.id = "${pm.wiki.id}" // new page and print URIs - pm.newpageURI = pageLinkTL.createPageURIBase( + pm.newpageURI = pageLinkTL.createPageURI( action: "newpage", id: pm.id, linkPath: pm.pagePath, query: "type=show404" ) - pm.printURI = pageLinkTL.createPageURIBase( + pm.printURI = pageLinkTL.createPageURI( action: "print", id: pm.id, linkPath: pm.pagePath ) @@ -77,7 +77,7 @@ // directories: find the index if there is one; redirect URI if needed pm.isDir = pm.pageFile.isDirectory() if(pm.isDir) { - pm.slashURI = pageLinkTL.createPageURIBase( + pm.slashURI = pageLinkTL.createPageURI( action: "show", id: pm.id, linkPath: "${pm.pagePath}${slash}" ) File index = getIndexPage(pm.pageFile) Modified: trunk/cow/grails-app/taglib/PageLinkTagLib.groovy =================================================================== --- trunk/cow/grails-app/taglib/PageLinkTagLib.groovy 2009-10-27 11:59:43 UTC (rev 1756) +++ trunk/cow/grails-app/taglib/PageLinkTagLib.groovy 2009-10-27 12:41:51 UTC (rev 1757) @@ -53,7 +53,7 @@ * /cow/page/show/1/index.html. */ def pageURI = { attrs, body -> - String theLink = "${getContextPath(log)}${pageURIBase(attrs, body)}" + String theLink = createPageURI(log, attrs) log.debug("pageURI theLink = ${theLink}") out << theLink } // pageURI @@ -69,6 +69,14 @@ } // pageURIBase /** + * pageURI tag exposed as a method so we can call it from a service. + */ + public String createPageURI(logger = Logger.getLogger("grails.app.taglib.${this.class.simpleName}"), + attrs) { + "${getContextPath(logger)}${createPageURIBase(attrs)}" + } + + /** * This tag exposed as a method so we can call it from a service. */ public String createPageURIBase(attrs) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gatewiki-commits mailing list gatewiki-commits@... https://lists.sourceforge.net/lists/listinfo/gatewiki-commits |
| Free embeddable forum powered by Nabble | Forum Help |