963836d5ffd7686273a2a71a0d2c6a498fdaa01f
[gpl/argeo-suite.git] / org.argeo.suite.apps.web / META-INF / spring / ui-commons.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
4 xmlns:util="http://www.springframework.org/schema/util"
5 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
6 http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
7
8 <!-- COMMON UI PARTS -->
9 <util:list id="headerEnd">
10 <bean class="org.argeo.cms.util.UserMenuLink" p:vAlign="bottom" />
11 </util:list>
12
13 <!-- TEMPLATES -->
14 <bean id="menuLink" abstract="true" class="org.argeo.cms.util.MenuLink"
15 init-method="init">
16 <property name="bundleContext" ref="bundleContext" />
17 </bean>
18
19 <bean name="app" class="org.argeo.cms.util.SimpleApp" abstract="true">
20 <property name="headerHeight" value="40" />
21 <property name="repository" ref="repository" />
22 <property name="bundleContext" ref="bundleContext" />
23 <property name="jcrBasePath" value="/public" />
24 </bean>
25
26 <bean id="header" class="org.argeo.cms.util.SimpleCmsHeader"
27 abstract="true">
28 <property name="end" ref="headerEnd" />
29 </bean>
30
31 <!-- Switch header depending on client type and logged in status -->
32 <bean id="headerManager" class="org.argeo.suite.web.DynamicHeader">
33 <property name="privateHeaderProvider" ref="privateHeader" />
34 <property name="publicHeaderProvider" ref="publicHeader" />
35 </bean>
36
37 <bean id="privateHeader" class="org.argeo.cms.util.SimpleCmsHeader">
38 <property name="center">
39 <list>
40 <bean p:label="Dashboard" p:target="/#" parent="menuLink" />
41 <bean p:label="Contacts" p:target="/#/people" parent="menuLink" />
42 <bean p:label="Files" p:target="/#/sharedFiles" parent="menuLink" />
43 </list>
44 </property>
45 <property name="end" ref="headerEnd" />
46 </bean>
47
48 <bean id="publicHeader" class="org.argeo.cms.util.SimpleCmsHeader">
49 <property name="end" ref="headerEnd" />
50 </bean>
51 </beans>