Changeset 5927
- Timestamp:
- 12 Apr 2011, 11:39:01 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/browser
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r5917 r5927 15 15 from hurry.workflow.interfaces import NoTransitionAvailableError 16 16 from zope import schema 17 from waeup.sirp.browser.resources import warning 17 18 try: 18 19 from zope.authentication.interfaces import ( … … 235 236 grok.context(IUserContainer) 236 237 grok.name('index') 237 title = ' Users'238 title = 'Portal Users' 238 239 239 240 def update(self, userid=None, adduser=None, edit=None, delete=None): … … 845 846 pnav = 1 846 847 847 def update(self): 848 self.table = ITableProvider(self.context).getTables(self)[0] 849 self.table.need() 850 851 def getFaculties(self): 852 """Convinience method to create a sorted list of faculties. 853 854 It provides a list of dicts with entries for all data needed by 855 usual list templates. 856 """ 857 result = [] 858 for key, val in self.context.items(): 859 result.append(dict(id=key, name=val.title)) 860 return result 848 def update(self, code=None, edit=None, delete=None): 849 warning.need() 850 if delete is not None and code is not None: 851 try: 852 del self.context[code] 853 self.flash('Faculty %s successfully removed.' % code) 854 except: 855 self.flash('Could not delete %s.' % code) 861 856 862 857 class AddFacultyFormPage(WAeUPAddFormPage): -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterlogspage.pt
r4910 r5927 1 <h2>Available Log Files</h2>2 3 1 <p> 4 2 Here you can see the local logfiles. -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacentermanagepage.pt
r4789 r5927 1 <h1>Data Center Settings</h1>2 3 1 <form method="POST"> 4 2 <div> … … 6 4 <input type="text" name="newpath" 7 5 tal:attributes="value context/storage" /> 8 <br /> 6 <br /><br /> 9 7 <div> 10 8 <input type="checkbox" name="move" checked="checked" /> … … 15 13 <label for="overwrite">Overwrite contents in new location?</label> 16 14 </div> 17 15 <br /> 18 16 <input type="submit" name="save" value="Save" /> 19 17 <input type="reset" name="reset" value="Reset" /> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenteruploadpage.pt
r4789 r5927 1 <h1>Upload a file</h1>2 3 1 <form method="post" enctype="multipart/form-data"> 4 2 <input type="file" name="uploadfile:file" /> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/usercontainerpage.pt
r4789 r5927 1 <h2>Registered Users</h2> 1 <h2>Portal Users</h2> 2 3 <p> 4 Here you can manage portal users. 5 </p> 2 6 3 7 <table class="zebra"> … … 27 31 </tbody> 28 32 </table> 29 <form method="post" action="add">30 <input type="submit" name="adduser" value="Add user" />31 </form> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
r5917 r5927 9 9 from waeup.sirp.browser.pages import ( 10 10 UniversityPage, FacultyContainerPage, DatacenterPage, FacultyPage, 11 DepartmentPage, CoursePage, CertificatePage, CertificateCoursePage )11 DepartmentPage, CoursePage, CertificatePage, CertificateCoursePage, UserContainerPage) 12 12 from waeup.sirp.browser.interfaces import ( 13 13 IFacultyContainer, IFaculty, IDepartment, ICourse, ICertificate, 14 ICertificateCourse, IBreadcrumbContainer, IUniversity )14 ICertificateCourse, IBreadcrumbContainer, IUniversity, IUserContainer) 15 15 from waeup.sirp.interfaces import (IWAeUPObject, IWAeUPXMLExporter, 16 16 IWAeUPXMLImporter, IDataCenter) … … 350 350 # 351 351 352 class AddUserActionButton(AddActionButton): 353 grok.require('waeup.manageUsers') 354 grok.context(IUserContainer) 355 grok.view(UserContainerPage) 356 text = 'Add user' 357 352 358 class AddFacultyActionButton(AddActionButton): 353 359 grok.context(IFacultyContainer) … … 386 392 387 393 388 class RemoveFacultyActionButton(RemoveActionButton):389 grok.context(IFacultyContainer)390 grok.view(FacultyContainerPage)391 text = 'Remove faculty'394 #class RemoveFacultyActionButton(RemoveActionButton): 395 # grok.context(IFacultyContainer) 396 # grok.view(FacultyContainerPage) 397 # text = 'Remove faculty' 392 398 393 399 class RemoveDepartmentActionButton(RemoveActionButton):
Note: See TracChangeset for help on using the changeset viewer.