You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2012/01/21 23:31:56 UTC

svn commit: r1234427 - /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/template-loading.apt

Author: olamy
Date: Sat Jan 21 22:31:56 2012
New Revision: 1234427

URL: http://svn.apache.org/viewvc?rev=1234427&view=rev
Log:
complete doc on template loading

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/template-loading.apt

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/template-loading.apt
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/template-loading.apt?rev=1234427&r1=1234426&r2=1234427&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/template-loading.apt (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/template-loading.apt Sat Jan 21 22:31:56 2012
@@ -28,7 +28,7 @@
 
 Html/Javascript templates loading
 
-  Templates are loaded on application loaded and added in the hidden div #html-fragments.
+  Templates are loaded on application loaded and added in the hidden div <<#html-fragments>>.
 
   They are loaded using requirejs and the text plugin.
 
@@ -50,4 +50,21 @@ require(["text!archiva/templates/menu.ht
 );
 +-------------------------
 
-  Note some templates which are only simple html which only need i18n are executed immediatly the others are only inserted in #html-fragments.
\ No newline at end of file
+* i18n in templates
+
+** static templates
+
+  Some templates which are only simple html which only need i18n are executed immediatly.
+
+  Simply use:
+
++-------------------------
+  $.tmpl( menu, $.i18n.map ).appendTo("#html-fragments");
+  to get i18n values in your template you can use
+  ${register} or ${$.i18n.prop('register')}
++-------------------------
+
+
+** dynamic templates
+
+   The others are only inserted in #html-fragments.
\ No newline at end of file