| 1 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" |
|---|
| 2 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
|---|
| 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
|---|
| 4 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
|---|
| 5 | lang="en" |
|---|
| 6 | metal:use-macro="here/prefs_main_template/macros/master" |
|---|
| 7 | i18n:domain="plone"> |
|---|
| 8 | |
|---|
| 9 | <metal:block metal:fill-slot="top_slot" |
|---|
| 10 | tal:define="dummy python:request.set('disable_border',1)" /> |
|---|
| 11 | |
|---|
| 12 | <body> |
|---|
| 13 | |
|---|
| 14 | <div metal:fill-slot="prefs_configlet_content" |
|---|
| 15 | tal:define="Batch python:modules['Products.CMFPlone'].Batch; |
|---|
| 16 | b_start request/b_start | python:0; |
|---|
| 17 | b_size request/b_size | python:20; |
|---|
| 18 | portal_roles python:['Contributor', 'Member', 'Manager']; |
|---|
| 19 | searchstring request/searchstring | nothing;"> |
|---|
| 20 | |
|---|
| 21 | <div class="documentEditable" |
|---|
| 22 | tal:condition="python:checkPermission('Manage users', here)"> |
|---|
| 23 | |
|---|
| 24 | <ul class="contentViews"> |
|---|
| 25 | <li class="selected"> |
|---|
| 26 | <a href="" |
|---|
| 27 | tal:attributes="href template_id" |
|---|
| 28 | i18n:translate="label_users">Users</a> |
|---|
| 29 | </li> |
|---|
| 30 | <li> |
|---|
| 31 | <a href="" |
|---|
| 32 | tal:attributes="href string:$portal_url/prefs_groups_overview" |
|---|
| 33 | i18n:translate="label_groups">Groups</a> |
|---|
| 34 | </li> |
|---|
| 35 | <li> |
|---|
| 36 | <a href="" |
|---|
| 37 | tal:attributes="href string:$portal_url/@@usergroup-controlpanel" |
|---|
| 38 | i18n:translate="label_usergroup_settings">Settings</a> |
|---|
| 39 | </li> |
|---|
| 40 | </ul> |
|---|
| 41 | |
|---|
| 42 | <div class="contentActions"> |
|---|
| 43 | |
|---|
| 44 | </div> |
|---|
| 45 | |
|---|
| 46 | <div class="documentContent" id="content"> |
|---|
| 47 | <a name="documentContent"></a> |
|---|
| 48 | |
|---|
| 49 | <div metal:use-macro="here/global_statusmessage/macros/portal_message"> |
|---|
| 50 | Portal status message |
|---|
| 51 | </div> |
|---|
| 52 | |
|---|
| 53 | <div class="configlet"> |
|---|
| 54 | <h1 class="documentFirstHeading" |
|---|
| 55 | i18n:translate="heading_users_overview">Users Overview</h1> |
|---|
| 56 | |
|---|
| 57 | <a href="" |
|---|
| 58 | class="link-parent" |
|---|
| 59 | tal:attributes="href string: $portal_url/plone_control_panel" |
|---|
| 60 | i18n:translate="label_up_to_plone_setup"> |
|---|
| 61 | Up to Site Setup |
|---|
| 62 | </a> |
|---|
| 63 | |
|---|
| 64 | <p i18n:translate="description_user_management"> |
|---|
| 65 | Click the user's name to see and change the details of a |
|---|
| 66 | specific user. Click the envelope icon to send a mail to |
|---|
| 67 | the user. You can also edit the e-mail addresses, and |
|---|
| 68 | add/remove users. |
|---|
| 69 | </p> |
|---|
| 70 | <p i18n:translate="user_role_note"> |
|---|
| 71 | Note that roles listed here apply directly to a user. |
|---|
| 72 | They do not reflect additional roles users may have due |
|---|
| 73 | to group memberships. |
|---|
| 74 | </p> |
|---|
| 75 | <p i18n:translate="description_pas_users_listing" |
|---|
| 76 | tal:condition="nothing | python:not searchstring and not context.acl_users.canListAllUsers()"> |
|---|
| 77 | Note: Some or all of your PAS user source |
|---|
| 78 | plugins do not allow listing of users, so you may not see |
|---|
| 79 | the users defined by those plugins unless doing a specific |
|---|
| 80 | search. |
|---|
| 81 | </p> |
|---|
| 82 | |
|---|
| 83 | <form action="" |
|---|
| 84 | name="users_add" |
|---|
| 85 | method="post" |
|---|
| 86 | tal:attributes="action template_id"> |
|---|
| 87 | |
|---|
| 88 | <input class="standalone add" |
|---|
| 89 | tabindex="" |
|---|
| 90 | type="submit" |
|---|
| 91 | name="form.button.AddUser" |
|---|
| 92 | value="Add New User" |
|---|
| 93 | i18n:attributes="value label_add_new_user;" |
|---|
| 94 | /> |
|---|
| 95 | |
|---|
| 96 | <input class="standalone" |
|---|
| 97 | tal:condition="python:len(mtool.listMembers()) > 0" |
|---|
| 98 | tabindex="" |
|---|
| 99 | type="submit" |
|---|
| 100 | name="form.button.GetEmailList" |
|---|
| 101 | value="Get Email List" |
|---|
| 102 | i18n:domain="eduCommons" |
|---|
| 103 | i18n:attributes="value" |
|---|
| 104 | /> |
|---|
| 105 | |
|---|
| 106 | |
|---|
| 107 | <input type="hidden" name="form.submitted" value="1" /> |
|---|
| 108 | </form> |
|---|
| 109 | |
|---|
| 110 | <form action="" |
|---|
| 111 | name="users_search" |
|---|
| 112 | method="post" |
|---|
| 113 | tal:attributes="action template/getId" |
|---|
| 114 | tal:define="findAll python:'form.button.FindAll' in request.keys(); |
|---|
| 115 | searchstring request/searchstring | nothing; |
|---|
| 116 | portal_users python:(searchstring or findAll) and mtool.searchForMembers(name=searchstring) or []; |
|---|
| 117 | batch python:Batch(portal_users, b_size, int(b_start), orphan=1)"> |
|---|
| 118 | <input type="hidden" name="form.submitted" value="1" /> |
|---|
| 119 | |
|---|
| 120 | |
|---|
| 121 | <table class="listing" summary="User Listing"> |
|---|
| 122 | <tr> |
|---|
| 123 | <th colspan="6" tal:attributes="colspan python:len(portal_roles)+4"> |
|---|
| 124 | <span tal:omit-tag="" i18n:translate="label_user_search">User Search</span>: |
|---|
| 125 | <input tabindex="" |
|---|
| 126 | class="quickSearch" |
|---|
| 127 | type="text" |
|---|
| 128 | name="searchstring" |
|---|
| 129 | value="" |
|---|
| 130 | tal:attributes="value searchstring;" |
|---|
| 131 | /> |
|---|
| 132 | |
|---|
| 133 | <input type="submit" |
|---|
| 134 | class="searchButton" |
|---|
| 135 | name="form.button.Search" |
|---|
| 136 | value="Search" |
|---|
| 137 | tabindex="" |
|---|
| 138 | i18n:attributes="value label_search;" |
|---|
| 139 | /> |
|---|
| 140 | |
|---|
| 141 | |
|---|
| 142 | <input type="submit" |
|---|
| 143 | class="searchButton" |
|---|
| 144 | name="form.button.FindAll" |
|---|
| 145 | value="Show all" |
|---|
| 146 | tabindex="" |
|---|
| 147 | i18n:attributes="value label_showall;" |
|---|
| 148 | tal:condition="not:site_properties/many_users" |
|---|
| 149 | tal:attributes="tabindex tabindex/next;" /> |
|---|
| 150 | </th> |
|---|
| 151 | </tr> |
|---|
| 152 | <tal:block tal:condition="portal_users" > |
|---|
| 153 | <tr> |
|---|
| 154 | <th rowspan="2" i18n:translate="listingheader_user_name">User name</th> |
|---|
| 155 | <th rowspan="2" i18n:translate="listingheader_email_address">E-mail Address</th> |
|---|
| 156 | <th colspan="3" tal:attributes="colspan python:len(portal_roles)" |
|---|
| 157 | i18n:translate="listingheader_roles">Roles</th> |
|---|
| 158 | <th rowspan="2" i18n:translate="listingheader_reset_password">Reset Password</th> |
|---|
| 159 | <th rowspan="2" i18n:translate="listingheader_remove_user">Remove user</th> |
|---|
| 160 | </tr> |
|---|
| 161 | <tr> |
|---|
| 162 | <th tal:repeat="portal_role portal_roles" tal:content="portal_role" i18n:translate="">Role</th> |
|---|
| 163 | </tr> |
|---|
| 164 | </tal:block> |
|---|
| 165 | |
|---|
| 166 | <tal:block repeat="this_user batch"> |
|---|
| 167 | <tr tal:define="oddrow repeat/this_user/odd; |
|---|
| 168 | userid this_user/getUserId; |
|---|
| 169 | mq python:modules['ZTUtils'].make_query; |
|---|
| 170 | userquery python:mq(userid=userid); |
|---|
| 171 | user python:mtool.getMemberById(userid)" |
|---|
| 172 | tal:condition="python:user is not None" |
|---|
| 173 | tal:attributes="class python:test(oddrow,'odd','even')"> |
|---|
| 174 | |
|---|
| 175 | |
|---|
| 176 | <td> |
|---|
| 177 | <a href="prefs_user_details" |
|---|
| 178 | tal:attributes="href string:${here/portal_memberdata/absolute_url}/prefs_user_details?userid=$userid"> |
|---|
| 179 | <tal:block replace="structure portal/user.gif"/> <span tal:replace="this_user/getUserName">username</span> |
|---|
| 180 | (<span tal:replace="python:user.getProperty('fullname')">Full Name</span>) |
|---|
| 181 | </a> |
|---|
| 182 | <input type="hidden" name="users.id:records" tal:attributes="value userid" /> |
|---|
| 183 | </td> |
|---|
| 184 | |
|---|
| 185 | <td tal:define="email python:user.getProperty('email')"> |
|---|
| 186 | <a href="#" |
|---|
| 187 | class="link-plain" |
|---|
| 188 | tal:attributes="href string:mailto:${email}" |
|---|
| 189 | title="Send a mail to this user" |
|---|
| 190 | i18n:attributes="title title_send_mail_to_user;" |
|---|
| 191 | ><tal:block replace="structure here/mail_icon.gif"/></a> |
|---|
| 192 | <input style="margin:2px;" |
|---|
| 193 | type="text" |
|---|
| 194 | size="15" |
|---|
| 195 | name="users.email:records" |
|---|
| 196 | value="" |
|---|
| 197 | tal:attributes="value email; |
|---|
| 198 | disabled python:user.canWriteProperty('email') and default or 'disabled'" /> |
|---|
| 199 | </td> |
|---|
| 200 | <td class="listingCheckbox" |
|---|
| 201 | tal:define="user_roles user/getRoles" |
|---|
| 202 | tal:repeat="portal_role portal_roles"> |
|---|
| 203 | <input type="checkbox" |
|---|
| 204 | class="noborder" |
|---|
| 205 | name="users.roles:list:records" |
|---|
| 206 | value="Manager" |
|---|
| 207 | tal:attributes="value portal_role; |
|---|
| 208 | checked python:test(portal_role in user_roles, 'checked', nothing); |
|---|
| 209 | disabled python:user.canAssignRole(portal_role) and default or 'disabled'" /> |
|---|
| 210 | </td> |
|---|
| 211 | |
|---|
| 212 | <td class="listingCheckbox"> |
|---|
| 213 | <input type="checkbox" |
|---|
| 214 | class="noborder" |
|---|
| 215 | name="users.resetpassword:records" |
|---|
| 216 | value="" |
|---|
| 217 | tal:attributes="value userid; |
|---|
| 218 | disabled python:user.canPasswordSet() and default or 'disabled'" /> |
|---|
| 219 | </td> |
|---|
| 220 | |
|---|
| 221 | <td class="listingCheckbox"> |
|---|
| 222 | <input type="checkbox" |
|---|
| 223 | class="noborder notify" |
|---|
| 224 | name="delete:list" |
|---|
| 225 | value="" |
|---|
| 226 | tal:attributes="value userid; |
|---|
| 227 | disabled python:user.canDelete() and default or 'disabled'" /> |
|---|
| 228 | </td> |
|---|
| 229 | </tr> |
|---|
| 230 | </tal:block> |
|---|
| 231 | <tr tal:condition="not:batch"> |
|---|
| 232 | <td tal:condition="searchstring" |
|---|
| 233 | i18n:translate="text_nomatches" |
|---|
| 234 | style="text-align:center;">No matches</td> |
|---|
| 235 | <tal:block tal:condition="not:searchstring"> |
|---|
| 236 | <td tal:condition="site_properties/many_users" |
|---|
| 237 | class="discreet" |
|---|
| 238 | i18n:translate="text_no_user_searchstring" |
|---|
| 239 | style="text-align:center; font-size: 100%;"> |
|---|
| 240 | Enter a username to search for |
|---|
| 241 | </td> |
|---|
| 242 | <td tal:condition="not:site_properties/many_users" |
|---|
| 243 | class="discreet" |
|---|
| 244 | i18n:translate="text_no_user_searchstring_largesite" |
|---|
| 245 | style="text-align:center; font-size: 100%;"> |
|---|
| 246 | Enter a username to search for, or click 'Show All' |
|---|
| 247 | </td> |
|---|
| 248 | </tal:block> |
|---|
| 249 | </tr> |
|---|
| 250 | </table> |
|---|
| 251 | |
|---|
| 252 | <div metal:use-macro="here/batch_macros/macros/navigation" /> |
|---|
| 253 | |
|---|
| 254 | <input class="context" |
|---|
| 255 | tabindex="" |
|---|
| 256 | type="submit" |
|---|
| 257 | name="form.button.Modify" |
|---|
| 258 | value="Apply Changes" |
|---|
| 259 | i18n:attributes="value label_apply_changes;" |
|---|
| 260 | tal:attributes="tabindex tabindex/next;" |
|---|
| 261 | tal:condition="batch" |
|---|
| 262 | /> |
|---|
| 263 | |
|---|
| 264 | <input tal:replace="structure context/@@authenticator/authenticator" /> |
|---|
| 265 | </form> |
|---|
| 266 | |
|---|
| 267 | </div> |
|---|
| 268 | |
|---|
| 269 | |
|---|
| 270 | |
|---|
| 271 | </div> |
|---|
| 272 | </div> |
|---|
| 273 | |
|---|
| 274 | <div id="content" class="documentEditable" |
|---|
| 275 | tal:condition="python:not checkPermission('Manage users', here)"> |
|---|
| 276 | <tal:block replace="here/raiseUnauthorized" /> |
|---|
| 277 | </div> |
|---|
| 278 | |
|---|
| 279 | |
|---|
| 280 | </div> |
|---|
| 281 | |
|---|
| 282 | </body> |
|---|
| 283 | </html> |
|---|
| 284 | |
|---|