compat zope-2.12
[GroupUserFolder.git] / dtml / GRUF_contents.zpt
1 <h1 tal:replace="structure here/manage_page_header">Header</h1>
2 <h2 tal:define="manage_tabs_message options/manage_tabs_message | nothing"
3 tal:replace="structure here/manage_tabs">Tabs</h2>
4
5 <ol>
6 <p class="form-help">
7 You are currently running <strong>GRUF v.<span tal:replace="here/getGRUFVersion">version</span></strong><br />
8 Information, latest version, documentation... see
9 <a target="_blank" href="http://ingeniweb.sourceforge.net/Products/GroupUserFolder">The GRUF Webpage</a>.
10 </p>
11 </ol>
12
13 <!-- Show problems if it happens -->
14 <div tal:condition="request/GRUF_PROBLEM|nothing">
15 <font color="red"><strong><span tal:content="request/GRUF_PROBLEM">gruf message</span></strong></font>
16 </div>
17
18
19 <h4>Users folders management</h4>
20 <ol>
21 <p class="form-help">Use this form to check/manage the underlying user folders.</p>
22 <p class="form-help">BE CAREFUL THAT MISUSE OF THIS FORM CAN LEAD YOU TO UNRECOVERABLE LOSS OF USER DATA.</p>
23 <p class="form-help">For this reason, all destructive actions (ie. replacing or deleting) with existing UserFolders must be confirmed
24 by clicking the rightmost checkbox.</p>
25
26 <form action="" tal:attributes="action string:${here/absolute_url}" method="POST">
27 <!-- Users selection -->
28 <table bgcolor="#EEEEEE" tal:on-error="nothing">
29 <tr>
30 <td rowspan="2" valign="middle"></td>
31 <th class="list-header" rowspan="2" valign="middle">Type</th>
32 <th class="list-header" colspan="5">Actions</th>
33 </tr>
34 <tr class="list-header">
35 <th>Move</th>
36 <th>Enable</th>
37 <th>Replace</th>
38 <th>Delete</th>
39 <th>Confirm</th>
40 </tr>
41
42 <!-- Groups source row -->
43 <tr>
44 <th class="list-header">Groups source</th>
45 <td bgcolor="#EEEEEE">
46 <img src="" tal:attributes="src here/Groups/acl_users/icon">&nbsp;
47 <a href="Groups/acl_users/manage_workspace" tal:content="here/Groups/acl_users/meta_type">Type</a>
48 </td>
49 <td></td>
50 <td bgcolor="#EEEEEE">&nbsp;</td>
51 <td bgcolor="#EEEEEE">
52 <table border="0">
53 <tr>
54 <td align="left">
55 <input type="hidden" name="source_rec.id:records" value="Groups" />
56 <select name="source_rec.new_factory:records">
57 <option value="">-- Select your source type --</option>
58 <tal:block tal:repeat="source here/listAvailableUserSources">
59 <option value=""
60 tal:condition="python:source[0] != path('here/Groups/acl_users/meta_type')"
61 tal:attributes="value python:source[1]">
62 <span tal:replace="python:source[0]">name</span>
63 </option>
64 </tal:block>
65 </select>
66 </td>
67 <td align="right">
68 <input type="submit" name="replaceUserSource:action" value="Ok" />
69 </td>
70 </tr>
71 </table>
72 </td>
73 <td class="list-item">(forbidden)</td>
74 <td bgcolor="#EEEEEE" class="list-item">
75 <input type="checkbox" name="id" value="Groups" />I'm sure
76 </td>
77 </tr>
78
79
80 <!-- Users sources row -->
81 <tr tal:repeat="source here/listUserSourceFolders">
82 <th class="list-header">Users source #<span tal:replace="repeat/source/number">1</span></th>
83 <td bgcolor="#EEEEEE" tal:condition="source/isValid">
84 <img src=""
85 tal:attributes="src source/acl_users/icon;
86 title source/acl_users/meta_type;">&nbsp;
87 <a href=""
88 tal:attributes="
89 href string:${source/acl_users/absolute_url}/manage_workspace;
90 title source/acl_users/meta_type;"
91 tal:content="source/acl_users/title|source/acl_users/meta_type">Type</a>
92 <tal:block condition="not:source/isEnabled">
93 <font color="red"><i>(disabled)</i></font>
94 </tal:block>
95 </td>
96 <td bgcolor="#EEEEEE" tal:condition="not:source/isValid">
97 <font color="red"><strong><i>(invalid or broken)</i></strong></font>
98 </td>
99 <td bgcolor="#EEEEEE" align="center">
100 <a tal:condition="not:repeat/source/start"
101 tal:attributes="href string:${here/absolute_url}/moveUserSourceUp?id=${source/getUserSourceId}"
102 href=""><img src="img_up_arrow" border="0" alt="Move up"></a>
103 <span tal:condition="repeat/source/start"><img src="img_up_arrow_grey" border="0" alt="Move up"></span>
104 &nbsp;
105 <a tal:condition="not:repeat/source/end"
106 tal:attributes="href string:${here/absolute_url}/moveUserSourceDown?id=${source/getUserSourceId}"
107 href=""><img src="img_down_arrow" border="0" alt="Move down"></a>
108 <span tal:condition="repeat/source/end"><img src="img_down_arrow_grey" border="0" alt="Move down"></span>
109 </td>
110 <td bgcolor="#EEEEEE">
111 <font size="-2">
112 <a
113 tal:condition="source/isEnabled"
114 tal:attributes="href string:${here/absolute_url}/toggleSource?src_id=${source/getUserSourceId}"
115 >Disable
116 </a>
117 <a
118 tal:attributes="href string:${here/absolute_url}/toggleSource?src_id=${source/getUserSourceId}"
119 tal:condition="not: source/isEnabled"
120 >Enable
121 </a>
122 </font>
123 </td>
124 <td bgcolor="#EEEEEE">
125 <table border="0">
126 <tr>
127 <td align="left">
128 <input type="hidden" name="source_rec.id:records" value="" tal:attributes="value source/getUserSourceId" />
129 <select name="source_rec.new_factory:records">
130 <option value="">-- Select your source type --</option>
131 <tal:block tal:repeat="new_source here/listAvailableUserSources">
132 <option value=""
133 tal:condition="python:new_source[0] != path('source/acl_users/meta_type')"
134 tal:attributes="value python:new_source[1]">
135 <span tal:replace="python:new_source[0]">name</span>
136 </option>
137 </tal:block>
138 </select>
139 </td>
140 <td align="right">
141 <input type="submit" name="replaceUserSource:action" value="Ok" />
142 </td>
143 </tr>
144 </table>
145 </td>
146 <td bgcolor="#EEEEEE" tal:condition="python:repeat['source'].length > 1" class="list-item">
147 <input
148 type="submit"
149 name="deleteUserSource:action"
150 value="Delete" />
151 </td>
152 <td tal:condition="python:not repeat['source'].length > 1" class="list-item">
153 (forbidden)
154 </td>
155 <td bgcolor="#EEEEEE" class="list-item">
156 <input type="checkbox" name="id" value="" tal:attributes="value source/getUserSourceId" />I'm sure
157 </td>
158 </tr>
159
160
161 <!-- Blank row -->
162 <tr>
163 <td class="list-item" colspan="6">&nbsp;</td>
164 </tr>
165
166 <!-- New sources row -->
167 <tr>
168 <th class="list-header">Add...</th>
169 <td colspan="6" class="list-item">
170 <select name="factory_uri">
171 <option value="">-- Select your source type --</option>
172 <option value="" tal:repeat="source here/listAvailableUserSources" tal:attributes="value python:source[1]">
173 <span tal:replace="python:source[0]">name</span>
174 </option>
175 </select>
176 <input type="submit" name="addUserSource:method" value="Add" />
177 </td>
178 </tr>
179 </table>
180 </form>
181
182 </ol>
183
184 <tal:block condition="here/hasLDAPUserFolderSource">
185 <h4>Special operations</h4>
186 <ol>
187 <p class="form-help">
188 To manage groups with a LDAPUserFolder, one must map LDAP groups to Zope Roles.<br />
189 You can do this mapping manually or click this button to have it done automatically.<br />
190 Please not that any previously existing ldap-group - to - zope-role mapping may be lost.
191 </p>
192 <p class="form-help">
193 To help you in this task, you can have a look at the following table, which summs up<br />
194 the mappings done (or not done!) in LDAPUserFolder.
195 </p>
196
197 <table>
198 <thead>
199 <th>GRUF group</th>
200 <th>LDAP group</th>
201 </thead>
202 <tbody>
203 <tr tal:repeat="group_info here/listLDAPUserFolderMapping">
204 <td tal:content="python:group_info[0]"></td>
205 <td tal:content="python:group_info[1]"></td>
206 </tr>
207 </tbody>
208 </table>
209 <form action="updateLDAPUserFolderMapping">
210 <input type="submit" value="Update LDAP mapping" />
211 </form>
212 </ol>
213 </tal:block>
214
215
216 <h1 tal:replace="structure here/manage_page_footer">Footer</h1>