summaryrefslogtreecommitdiffstats
path: root/skins/pcfannuaire/pcfannuaire_view.pt
blob: 88259132c431ba30300befe19aab72f816ec02b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      xml:lang="en-US"
      lang="en-US"
      metal:use-macro="here/main_template/macros/master"
      i18n:domain="pcfannuaire">
 
<metal:javascriptslot fill-slot="javascript_head_slot">
<script type="text/javascript" language="JavaScript">
</script>
</metal:javascriptslot>

<body>
   <metal:main fill-slot="main">
     <tal:main-macro metal:define-macro="main"
             tal:define="kssClassesView context/@@kss_field_decorator_view;
                         getKssClasses nocall:kssClassesView/getKssClassesInlineEditable;
                         service python:context.REQUEST.get('service');
                         person  python:context.REQUEST.get('person');
                         cellule python:context.REQUEST.get('cellule');">

        <div tal:replace="structure provider:plone.abovecontenttitle" />
        <h1 metal:use-macro="here/kss_generic_macros/macros/generic_title_view">
            Title or id
        </h1>
        <div tal:replace="structure provider:plone.belowcontenttitle" />

        <div tal:replace="structure provider:plone.abovecontentbody" />

        <div class="intro"
             tal:condition="here/description"
             tal:content="structure here/description">
            Description
        </div>

        <div tal:condition="python: not(service) and not(person)">
          <h2>Secr&eacute;taire G&eacute;n&eacute;ral</h2>
          <ul>
           <li tal:repeat="entry python: [context.getSecretaireGeneral()]">
             <a tal:attributes="href string:?person=${entry}">
             <span tal:replace="entry/displayName">displayName</span>
             </a>
           </li>
          </ul>

          <h2>Services</h2>
          <ul>
           <li tal:repeat="service python: context.getServices()">
            <a tal:attributes="href string:?service=${service}" tal:content="service">service</a>
           </li>
          </ul>
        </div>

        <div tal:condition="python: (service and not cellule)">
          <h2 tal:content="python: service">service name</h2>
          <ul>
           <li tal:repeat="entry python: [context.getServiceManager(service)]">
             <a tal:attributes="href string:?person=${entry}">
             <span tal:replace="entry/displayName">displayName</span>
             </a>
             <span tal:replace="entry/shortTelephoneNumber">000</span>
             <span tal:condition="entry/mobile">, <span tal:replace="entry/mobile">mobile</span></span>
           </li>
          </ul>

          <ul tal:repeat="cellule python: context.getCellules(service)">
            <a tal:attributes="href string:?service=${service}&cellule=${cellule}" tal:content="cellule">cellule</a>
          </ul>

          <ul>
           <li tal:repeat="entry python: context.getServiceNonManagers(service)">
             <a tal:attributes="href string:?person=${entry}">
             <span tal:replace="entry/displayName">displayName</span>
             </a>

             <span tal:replace="entry/shortTelephoneNumber">000</span>
             <span tal:condition="entry/mobile">, <span tal:replace="entry/mobile">mobile</span></span>
           </li>
          </ul>
        </div>

        <div tal:condition="python: (service and cellule)">
          <h2><span tal:content="python: service">service name</span> - 
              <span tal:content="python: cellule">cellule name</span></h2>
          <ul>
           <li tal:repeat="entry python: context.getCelluleManagers(service, cellule)">
             <a tal:attributes="href string:?person=${entry}">
             <span tal:replace="entry/displayName">displayName</span>
             </a>

             <span tal:replace="entry/shortTelephoneNumber">000</span>
             <span tal:condition="entry/mobile">, <span tal:replace="entry/mobile">mobile</span></span>
           </li>
          </ul>

          <ul>
           <li tal:repeat="entry python: context.getCellulePeople(service, cellule)">
             <a tal:attributes="href string:?person=${entry}">
             <span tal:replace="entry/displayName">displayName</span>
             </a>

             <span tal:replace="entry/shortTelephoneNumber">000</span>
             <span tal:condition="entry/mobile">, <span tal:replace="entry/mobile">mobile</span></span>
           </li>
          </ul>
        </div>

        <div tal:condition="python: person">
	 <div tal:define="entry python: context.getPerson(person)">
<style type="text/css">
img.photo {
	float: right;
	padding: 5px;
	border: 1px solid black;
}
</style>
         <h2><span tal:replace="entry/displayName">displayName</span></h2>
	<img class="photo" tal:attributes="src string:/intranet/static/photos/${entry/samaccountname}.jpg"/>
	 <ul>
	  <li>Téléphone(s) : <span tal:repeat="telephoneNumber entry/telephoneNumbers">
	        <span tal:replace="telephoneNumber">phoneNumber</span> 
	       </span></li>
	  <li tal:condition="entry/shortTelephoneNumber">Téléphone (abrégé) : <span tal:replace="entry/shortTelephoneNumber"></span></li>
	  <li tal:condition="entry/mobile">GSM : <span tal:replace="entry/mobile"></span></li>
	  <li tal:condition="entry/building">Bâtiment : <span tal:replace="entry/building"></span></li>
	  <li tal:condition="entry/floor">Étage : <span tal:replace="entry/floor"></span> (<a tal:attributes="href string:/intranet/static/photos/${entry/plan_filename}">plan</a>)</li>
	  <li tal:condition="entry/office">Bureau : <span tal:replace="entry/office"></span></li>
	  <li tal:condition="entry/fax">Fax : <span tal:replace="entry/fax"></span></li>
	  <li tal:condition="entry/title">Titre : <span tal:replace="entry/title"></span></li>
	  <li tal:condition="entry/email">Courriel : <a tal:attributes="href string:mailto:${entry/email}" tal:content="entry/email"></a></li>
	  <li tal:condition="entry/service">Service : <a tal:attributes="href string:?service=${entry/service}"><span tal:replace="entry/service"></span></a></li>
	  <li tal:condition="entry/division">Cellule : <a tal:attributes="href string:?service=${entry/service}&cellule=${entry/division}"><span tal:replace="entry/division"></span></a></li>
	  <li tal:condition="entry/has_a_chief">Responsable : <a tal:attributes="href string:?person=${entry/manager_url}" tal:content="entry/manager_name"></a></li>
	 </ul>
	</div>
        </div>

        <div tal:replace="structure provider:plone.belowcontentbody" />
    </tal:main-macro>
   </metal:main>
</body>
</html>