mirror of https://github.com/apache/archiva.git
more documentation
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1234213 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd19d68a87
commit
c029fed96c
|
@ -16,7 +16,7 @@
|
||||||
~ specific language governing permissions and limitations
|
~ specific language governing permissions and limitations
|
||||||
~ under the License.
|
~ under the License.
|
||||||
-->
|
-->
|
||||||
<div class='well' id="main-menu" redback-permissions="{permissions: ['archiva-manage-users']}" style="display: none">
|
<div class='well' id="main-menu" redback-permissions="{permissions: ['archiva-manage-users','archiva-manage-configuration']}" style="display: none">
|
||||||
<ul class="navigation">
|
<ul class="navigation">
|
||||||
<li style="display: none" redback-permissions="{permissions: ['archiva-manage-users']}">
|
<li style="display: none" redback-permissions="{permissions: ['archiva-manage-users']}">
|
||||||
<a href="#" id="menu-users-list-a" onclick="displayUsersGrid()">${$.i18n.prop('users.list')}</a>
|
<a href="#" id="menu-users-list-a" onclick="displayUsersGrid()">${$.i18n.prop('users.list')}</a>
|
||||||
|
|
|
@ -26,4 +26,28 @@
|
||||||
~~ NOTE: For help with the syntax of this file, see:
|
~~ NOTE: For help with the syntax of this file, see:
|
||||||
~~ http://maven.apache.org/guides/mini/guide-apt-format.html
|
~~ http://maven.apache.org/guides/mini/guide-apt-format.html
|
||||||
|
|
||||||
How javascript templates are loaded on application loading
|
Html/Javascript templates loading
|
||||||
|
|
||||||
|
Templates are loaded on application loaded and added in the hidden div #html-fragments.
|
||||||
|
|
||||||
|
They are loaded using requirejs and the text plugin.
|
||||||
|
|
||||||
|
archiva tamplates are loaded as it:
|
||||||
|
|
||||||
|
+-------------------------
|
||||||
|
require(["text!archiva/templates/menu.html","text!archiva/templates/topbar.html","text!archiva/templates/message.html",
|
||||||
|
"text!archiva/templates/modal.html","text!archiva/templates/grids-generics.html","text!archiva/templates/repositories.html"],
|
||||||
|
function(menu,topbar,message,modal,grids_generics,repositories) {
|
||||||
|
|
||||||
|
// template loading
|
||||||
|
$.tmpl( menu, $.i18n.map ).appendTo("#html-fragments");
|
||||||
|
$.tmpl( topbar, $.i18n.map ).appendTo("#html-fragments");
|
||||||
|
$.tmpl( modal, $.i18n.map ).appendTo("#html-fragments");
|
||||||
|
$("#html-fragments").append(message);
|
||||||
|
$("#html-fragments").append(grids_generics);
|
||||||
|
$("#html-fragments").append(repositories);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
+-------------------------
|
||||||
|
|
||||||
|
Note some templates which are only simple html which only need i18n are executed immediatly the others are only inserted in #html-fragments.
|
Binary file not shown.
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 63 KiB |
|
@ -56,7 +56,50 @@
|
||||||
Start Page
|
Start Page
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>#topbar-menu-container is populated with the template js/archiva/templates/topbar.html.</li>
|
||||||
|
<li>#sidebar-content is populated with the template js/archiva/templates/menu.html.</li>
|
||||||
|
<li>#main-content is the place where screen will appear.</li>
|
||||||
|
<li>hidden #html-fragments will contains loaded templates.</li>
|
||||||
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
Link are visible/hide depending on needed redback karmas.
|
||||||
|
You can configure redback operations needed for a link using the attribute redback-permissions in your html element
|
||||||
|
(by default element needed karma must be marked display: none):
|
||||||
|
<source>
|
||||||
|
<![CDATA[
|
||||||
|
Support array: at least one operation is needed:
|
||||||
|
<div .... redback-permissions="{permissions: ['archiva-manage-users','archiva-manage-configuration']}" style="display: none">
|
||||||
|
Support single value:
|
||||||
|
<li style="display: none" redback-permissions="{permissions: ['archiva-manage-users']}">
|
||||||
|
]]>
|
||||||
|
</source>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</p>
|
||||||
|
</subsection>
|
||||||
|
<subsection name="Sources organisation">
|
||||||
|
<p>
|
||||||
|
Sources are located in src/main/webapp :
|
||||||
|
<ul>
|
||||||
|
<li>css</li>
|
||||||
|
<li>images</li>
|
||||||
|
<li>js</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<subsection name="js directory">
|
||||||
|
<p>
|
||||||
|
Root directory contains external libraries.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
archiva directory contains archiva js files with a subdirectory templates which contains templates
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
redback directory contains redback js files with a subdirectory templates which contains templates
|
||||||
|
</p>
|
||||||
|
</subsection>
|
||||||
</subsection>
|
</subsection>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue