Changeset 15964 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 28 Jan 2020, 12:39:18 (5 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r15946 r15964 153 153 154 154 def getUsers(self): 155 """Get a list of all users. 156 """ 157 for key, val in grok.getSite()['users'].items(): 158 url = self.url(val) 159 yield(dict(url=url, name=key, val=val)) 155 return getUtility(IKofaUtils).getUsers() 156 157 #def getUsers(self): 158 # """Get a list of all users. 159 # """ 160 # for key, val in grok.getSite()['users'].items(): 161 # url = self.url(val) 162 # yield(dict(url=url, name=key, val=val)) 160 163 161 164 def getUsersWithLocalRoles(self): … … 383 386 return roles() 384 387 388 #def getUsers(self): 389 # """Get a list of all users. 390 # """ 391 # for key, val in grok.getSite()['users'].items(): 392 # url = self.url(val) 393 # yield(dict(url=url, name=key, val=val)) 394 385 395 def getUsers(self): 386 """Get a list of all users. 387 """ 388 for key, val in grok.getSite()['users'].items(): 389 url = self.url(val) 390 yield(dict(url=url, name=key, val=val)) 396 return getUtility(IKofaUtils).getUsers() 391 397 392 398 def getUsersWithLocalRoles(self): -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantscontainermanagepage.pt
r14264 r15964 134 134 </div> <br /><br /> 135 135 <table class="form-table"> 136 <tr> <td> 136 <tr> 137 <td> 137 138 <select id="user" name="user" class="form-control"> 138 139 <option tal:repeat="user view/getUsers" 139 140 tal:attributes="value user/name"> 140 <span tal:replace="user/val/title">USERTITLE</span> 141 (<span tal:replace="user/val/name">USERNAME</span>) 141 <span tal:replace="user/val">USERSTRING</span> 142 142 </option> 143 </select> </td> <td> 143 </select> 144 </td> 145 <td> 144 146 <select id="local_role" name="local_role" class="form-control"> 145 147 <option tal:repeat="localrole view/getLocalRoles" … … 147 149 <span tal:replace="localrole/title">LOCALROLETITLE</span> 148 150 </option> 149 </select> </td> <td> 151 </select> 152 </td> 153 <td> 150 154 <div tal:condition="view/availableActions"> 151 155 <span tal:repeat="action view/actions" tal:omit-tag=""> … … 153 157 tal:replace="structure action/render"/> 154 158 </span> 155 </div> </td> 159 </div> 160 </td> 156 161 </tr> 157 162 </table> -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantsrootmanagepage.pt
r14264 r15964 117 117 <option tal:repeat="user view/getUsers" 118 118 tal:attributes="value user/name"> 119 <span tal:replace="user/val/title">USERTITLE</span> 120 (<span tal:replace="user/val/name">USERNAME</span>) 119 <span tal:replace="user/val">USERSTRING</span> 121 120 </option> 122 121 </select> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r15818 r15964 67 67 from waeup.kofa.university.course import Course 68 68 from waeup.kofa.permissions import ( 69 get_users_with_local_roles, get_all_roles, get_all_users,69 get_users_with_local_roles, get_all_roles, 70 70 get_users_with_role) 71 71 … … 328 328 329 329 def getUsers(self): 330 return get _all_users()330 return getUtility(IKofaUtils).getUsers() 331 331 332 332 def getUsersWithLocalRoles(self): -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatemanagepage.pt
r14647 r15964 118 118 <option tal:repeat="user view/getUsers" 119 119 tal:attributes="value user/name"> 120 <span tal:replace="user/val/title">USERTITLE</span> 121 (<span tal:replace="user/val/name">USERNAME</span>) 120 <span tal:replace="user/val">USERSTRING</span> 122 121 </option> 123 122 </select> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/coursemanagepage.pt
r14264 r15964 63 63 <option tal:repeat="user view/getUsers" 64 64 tal:attributes="value user/name"> 65 <span tal:replace="user/val/title">USERTITLE</span> 66 (<span tal:replace="user/val/name">USERNAME</span>) 65 <span tal:replace="user/val">USERSTRING</span> 67 66 </option> 68 67 </select> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentmanagepage.pt
r14264 r15964 123 123 <br /> 124 124 <div class="form-group"> 125 <select class="form-control" id="user" name="user">125 <select id="user" name="user" class="form-control"> 126 126 <option tal:repeat="user view/getUsers" 127 127 tal:attributes="value user/name"> 128 <span tal:replace="user/val/title">USERTITLE</span> 129 (<span tal:replace="user/val/name">USERNAME</span>) 128 <span tal:replace="user/val">USERSTRING</span> 130 129 </option> 131 130 </select> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultymanagepage.pt
r14262 r15964 100 100 <option tal:repeat="user view/getUsers" 101 101 tal:attributes="value user/name"> 102 <span tal:replace="user/val/title">USERTITLE</span> 103 (<span tal:replace="user/val/name">USERNAME</span>) 102 <span tal:replace="user/val">USERSTRING</span> 104 103 </option> 105 104 </select> -
main/waeup.kofa/trunk/src/waeup/kofa/documents/browser.py
r13218 r15964 84 84 85 85 86 class DocumentsContainerManageFormPage(KofaEditFormPage, 87 LocalRoleAssignmentUtilityView): 86 class DocumentsContainerManageFormPage(KofaEditFormPage): 88 87 """The manage page for customer containers. 89 88 """ -
main/waeup.kofa/trunk/src/waeup/kofa/documents/browser_templates/documentmanagepage.pt
r14264 r15964 74 74 <option tal:repeat="user view/getUsers" 75 75 tal:attributes="value user/name"> 76 <span tal:replace="user/val/title">USERTITLE</span> 77 (<span tal:replace="user/val/name">USERNAME</span>) 76 <span tal:replace="user/val">USERSTRING</span> 78 77 </option> 79 78 </select> -
main/waeup.kofa/trunk/src/waeup/kofa/documents/browser_templates/htmldocumentmanagepage.pt
r14264 r15964 63 63 <option tal:repeat="user view/getUsers" 64 64 tal:attributes="value user/name"> 65 <span tal:replace="user/val/title">USERTITLE</span> 66 (<span tal:replace="user/val/name">USERNAME</span>) 65 <span tal:replace="user/val">USERSTRING</span> 67 66 </option> 68 67 </select> -
main/waeup.kofa/trunk/src/waeup/kofa/permissions.py
r15539 r15964 746 746 747 747 748 def get_all_users():749 """Get a list of dictionaries.750 """751 users = sorted(grok.getSite()['users'].items(), key=lambda x: x[1].title)752 for key, val in users:753 yield(dict(name=key, val=val))754 755 756 748 def get_users_with_local_roles(context): 757 749 """Get a list of dicts representing the local roles set for `context`. -
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r15833 r15964 272 272 subject, body, config) 273 273 274 def getUsers(self): 275 users = sorted( 276 grok.getSite()['users'].items(), key=lambda x: x[1].title) 277 for key, val in users: 278 yield(dict(name=key, val="%s (%s)" % (val.title, val.name))) 279 274 280 @property 275 281 def tzinfo(self):
Note: See TracChangeset for help on using the changeset viewer.