From kcardineaud@users.nuiton.org Thu Aug 4 10:28:36 2011 From: kcardineaud@users.nuiton.org To: maven-nuiton-skin-commits@list.nuiton.org Subject: [Maven-nuiton-skin-commits] r638 - trunk/src/main/resources/META-INF/maven Date: Thu, 04 Aug 2011 10:28:36 +0200 Message-ID: <20110804082836.2525615921@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4300680559921338362==" --===============4300680559921338362== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: kcardineaud Date: 2011-08-04 10:28:36 +0200 (Thu, 04 Aug 2011) New Revision: 638 Url: http://nuiton.org/repositories/revision/maven-nuiton-skin/638 Log: #1654 Add compatibility with the new version of ScmWebEditor Modified: trunk/src/main/resources/META-INF/maven/site.vm Modified: trunk/src/main/resources/META-INF/maven/site.vm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/main/resources/META-INF/maven/site.vm 2011-06-07 20:08:55 UTC (= rev 637) +++ trunk/src/main/resources/META-INF/maven/site.vm 2011-08-04 08:28:36 UTC (= rev 638) @@ -19,6 +19,29 @@ #end #end =20 + +#macro ( linkDocument $scm $root $fileformat $localesite $defaultLocalesite,= $name ) + #set ( $lastIndex =3D $root.lastIndexOf(".") ) + #set ( $lastIndex =3D $lastIndex + 1 ) + #if ($lastIndex > 0) + #set ( $editFile =3D $root.substring(0 , $lastIndex ) ) + #set ( $urlScm =3D $scm.substring( 8 ) ) + =20 + #if ( $localesite =3D=3D $defaultLocalesite ) + $name + #else + $name + #end + #end +#end + +#macro ( linkSiteXml $scm $localesite $name) + #set ( $urlScm =3D $scm.substring( 8 ) ) + + $name +#end + + #macro ( banner $banner $id ) #if ( $banner ) #if( $banner.href ) @@ -73,7 +96,7 @@ #end #if ( "$scmwebeditorEnabled" !=3D "false" ) | - #link ( "$project.properties.scmwebeditorUrl?adresse=3D$project.scm.de= veloperConnection&file_name=3D$alignedFileName&project_url=3D$project= .url/$locale/$alignedFileName&lang=3D$locale&defaultLang=3D$firstLoca= le&format=3D$project.properties.siteSourcesType" , $i18n.getString( "mave= n-nuiton-skin", $locale, "edit.scm.page" ) ) + #linkDocument ( $project.scm.developerConnection , $alignedFileName , = $project.properties.siteSourcesType , $locale , $firstLocale , $i18n.getStrin= g( "maven-nuiton-skin", $locale, "edit.scm.page" ) ) #end #end =20 @@ -160,8 +183,9 @@ #if ( "$scmwebeditorEnabled" !=3D "false" ) #computeDefaultLocale( $locales ) #set ($xmlExtention =3D ".xml") - #link ( "$project.properties.scmwebeditorUrl?adresse=3D$project.scm.deve= loperConnection&file_name=3Dsite_$locale$xmlExtention&project_url=3D$= project.url/$locale/$alignedFileName&lang=3D$locale&defaultLang=3D$lo= cale", $i18n.getString( "maven-nuiton-skin", $locale, "edit.scm.menu" ) ) + #linkSiteXml ( $project.scm.developerConnection , $locale , $i18n.getStr= ing( "maven-nuiton-skin", $locale, "edit.scm.menu" ) ) #end + #foreach( $menu in $menus ) ##set ($xmlExtention =3D ".xml") ##$i18n.getString(= "maven-nuiton-skin", $locale, "edit.scm.menu" ) --===============4300680559921338362==--