Activate web UI
[gpl/argeo-suite.git] / org.argeo.suite.apps.web / META-INF / spring / ui-people.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 <!-- People UI -->
9 <bean id="people.mainPage" class="org.argeo.people.web.pages.PeopleDynamicPages">
10 <property name="dynamicPages" ref="people.dynamicPages" />
11 <property name="resourcesService" ref="resourcesService" />
12 <property name="peopleService" ref="peopleService" />
13 <property name="iconPathes" ref="peopleEntityIcons" />
14 </bean>
15
16 <bean id="people.header" class="org.argeo.cms.util.SimpleCmsHeader">
17 <property name="lead">
18 <list>
19 <bean p:image="theme/argeo-classic/img/logo-argeo.png" p:target="/people#"
20 p:custom="cms_header-logo" parent="menuLink" />
21 <bean p:label="All" p:target="people!/search/all" parent="menuLink" />
22 <bean p:label="Persons" p:target="people!/search/persons"
23 parent="menuLink" />
24 <bean p:label="Organisations" p:target="people!/search/orgs"
25 parent="menuLink" />
26 <bean p:label="Browse" p:target="browse#" parent="menuLink" />
27 </list>
28 </property>
29 <property name="end" ref="headerEnd" />
30 </bean>
31
32 <util:map id="peopleEntityIcons">
33 <entry key="people:person" value="theme/argeo-classic/icons/people/types/person.gif" />
34 <entry key="people:org" value="theme/argeo-classic/icons/people/types/company.png" />
35 </util:map>
36
37 <!-- UI Providers -->
38 <!-- A map for the specific page given the node type of the passed context -->
39 <util:map id="people.dynamicPages">
40 <entry>
41 <key>
42 <util:constant static-field="org.argeo.people.PeopleTypes.PEOPLE_PERSON" />
43 </key>
44 <bean class="org.argeo.people.web.pages.PersonPage">
45 <property name="personHeaderPart" ref="personHeaderPart" />
46 <property name="contactsWithNotePart" ref="contactsWithNotePart" />
47 <property name="activitiesPart" ref="activitiesPart" />
48 </bean>
49 </entry>
50 <entry>
51 <key>
52 <util:constant static-field="org.argeo.people.PeopleTypes.PEOPLE_ORG" />
53 </key>
54 <bean class="org.argeo.people.web.pages.OrgPage">
55 <property name="orgHeaderPart" ref="orgHeaderPart" />
56 <property name="contactsWithNotePart" ref="contactsWithNotePart" />
57 <property name="activitiesPart" ref="activitiesPart" />
58 </bean>
59 </entry>
60 <entry>
61 <key>
62 <util:constant
63 static-field="org.argeo.connect.resources.ResourcesTypes.RESOURCES_TAG" />
64 </key>
65 <bean class="org.argeo.people.web.pages.TagLikeInstancePage">
66 <property name="peopleService" ref="peopleService" />
67 <property name="resourcesService" ref="resourcesService" />
68 <property name="iconPathes" ref="peopleEntityIcons" />
69 <property name="propertyName" value="connect:tags" />
70 </bean>
71 </entry>
72 <entry>
73 <key>
74 <util:constant
75 static-field="org.argeo.people.PeopleTypes.PEOPLE_MAILING_LIST" />
76 </key>
77 <bean class="org.argeo.people.web.pages.TagLikeInstancePage">
78 <property name="resourcesService" ref="resourcesService" />
79 <property name="peopleService" ref="peopleService" />
80 <property name="iconPathes" ref="peopleEntityIcons" />
81 <property name="propertyName" value="people:mailingLists" />
82 </bean>
83 </entry>
84 </util:map>
85
86 <!-- Various headers -->
87 <bean id="personHeaderPart" class="org.argeo.people.web.parts.PersonHeaderPart">
88 <property name="resourcesService" ref="resourcesService" />
89 <property name="peopleService" ref="peopleService" />
90 <property name="tagsPart" ref="tagsPart" />
91 <property name="mailingListsPart" ref="mailingListsPart" />
92 </bean>
93
94 <bean id="orgHeaderPart" class="org.argeo.people.web.parts.OrgHeaderPart">
95 <property name="resourcesService" ref="resourcesService" />
96 <property name="peopleService" ref="peopleService" />
97 <property name="tagsPart" ref="tagsPart" />
98 <property name="mailingListsPart" ref="mailingListsPart" />
99 </bean>
100
101 <!-- Contacts -->
102 <bean id="contactsWithNotePart" class="org.argeo.people.web.parts.ContactsWithNotePart">
103 <property name="singleContactPart" ref="singleContactPart" />
104 </bean>
105 <bean id="singleContactPart" class="org.argeo.people.web.parts.SingleContactPart">
106 <property name="resourcesService" ref="resourcesService" />
107 <property name="contactButtonsPart" ref="contactButtonsPart" />
108 </bean>
109 <bean id="contactButtonsPart" class="org.argeo.people.web.parts.ContactButtonsPart">
110 </bean>
111
112 <!-- Activities and workflows -->
113 <bean id="activitiesPart" class="org.argeo.people.web.parts.ActivitiesPart">
114 </bean>
115
116 <!-- Tag like properties -->
117 <bean id="tagsPart" class="org.argeo.people.web.parts.TagLikeValuesPart">
118 <property name="propertyName">
119 <util:constant static-field="org.argeo.connect.resources.ResourcesNames.CONNECT_TAGS" />
120 </property>
121 </bean>
122 <bean id="mailingListsPart" class="org.argeo.people.web.parts.TagLikeValuesPart">
123 <property name="propertyName">
124 <util:constant
125 static-field="org.argeo.people.PeopleNames.PEOPLE_MAILING_LISTS" />
126 </property>
127 </bean>
128 </beans>