Changeset 6447 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 21 Jun 2011, 11:09:33 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/browser
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r6368 r6447 31 31 ICertificateAdd, ICertificateCourse, ICertificateCourseAdd) 32 32 from waeup.sirp.browser.resources import warning, datepicker, tabs, datatable 33 from waeup.sirp.catalog import search_context34 33 from waeup.sirp.interfaces import( 35 34 IWAeUPObject, IUserContainer, IUserAccount, IDataCenter, … … 332 331 # Search pages... 333 332 # 334 class SearchStudentPage(WAeUPPage):335 grok.context(IUniversity)336 grok.name('searchstudent')337 grok.template('searchstudentpage')338 grok.require('waeup.viewStudents')339 title = u"Student Search"340 pnav = 2341 342 def update(self, query=None):343 self.search_result = []344 if query is not None:345 self.search_result = search_context(query)346 print "RESULT: ", list(self.search_result)347 348 333 349 334 class SearchPage(WAeUPPage): 350 grok.context(IUniversity) 335 """General search page for the academics section. 336 """ 337 grok.context(IFacultyContainer) 351 338 grok.name('search') 352 339 grok.template('searchpage') 353 340 grok.require('waeup.manageUniversity') 354 title = u"Site Search" 355 pnav = 2 341 title = u"Academics" 342 label = u"Search Academic Section" 343 pnav = 1 356 344 357 345 def update(self, *args, **kw): 346 datatable.need() 358 347 form = self.request.form 359 348 self.hitlist = [] -
main/waeup.sirp/trunk/src/waeup/sirp/browser/static/waeup-base.css
r6341 r6447 52 52 } 53 53 54 .block .bd { 55 padding-bottom: 3em; 56 } 57 54 58 /* Define different styles for headlines in rendered restructured text */ 55 59 … … 91 95 .dataTables_wrapper { 92 96 min-height: 100px; 97 } 98 99 .dataTables_info { 100 padding-top: 10px; 101 } 102 103 .dataTables_paginate { 104 padding-top: 10px; 93 105 } 94 106 -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/searchpage.pt
r4789 r6447 1 <h 3>Search the site</h3>1 <h2 i18n:translate="" tal:condition="view/label" tal:content="view/label">Label</h2> 2 2 <form method="post"> 3 3 <input type="text" name="query" 4 4 tal:attributes="value view/query" /> 5 <input type="submit" name="SUBMIT" value=" search..." />5 <input type="submit" name="SUBMIT" value="Search" /> 6 6 </form> 7 <div tal:condition="view/hitlist"> 8 <h4>Results (<span tal:replace="python: len(view.hitlist)" />):</h4> 9 <div tal:repeat="item view/hitlist"> 10 <a href="" 11 tal:attributes="href item/url" 12 tal:content="item/title">Search Item Title</a> 13 <div tal:content="item/description"> 14 Longer description of item... 15 </div> 16 </div> 17 </div> 7 <br /> 8 <span tal:condition="view/hitlist"> 9 <h3>Results:</h3> 10 <table class="display dataTable"> 11 <thead> 12 <tr> 13 <th>Code</th> 14 <th>Title</th> 15 <th>Type</th> 16 </tr> 17 </thead> 18 <tbody> 19 <tr tal:repeat="item view/hitlist" class="gradeB"> 20 <td> 21 <a href="" tal:attributes="href item/url" 22 tal:content="item/code">Code</a> 23 </td> 24 <td tal:content="item/title"> 25 Title 26 </td> 27 <td tal:content="item/type"> 28 Type 29 </td> 30 </tr> 31 </tbody> 32 </table> 33 </span> -
main/waeup.sirp/trunk/src/waeup/sirp/browser/test_permissions.py
r6212 r6447 20 20 manager_pages = [ 21 21 # The pages that should only be accessible by manager... 22 '/@@manage', '/@@administration', '/ @@searchstudent', '/@@search',22 '/@@manage', '/@@administration', '/faculties/@@search', 23 23 '/users/@@index', '/users/@@add', '/users/alice/@@index', 24 24 '/datacenter/@@index', '/datacenter/@@upload', '/datacenter/@@import1', -
main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
r6396 r6447 346 346 grok.view(FacultyContainerPage) 347 347 text = 'Manage academic section' 348 349 class SearchFacultyContainerActionButton(ManageActionButton): 350 """ 'Manage settings' button for faculties. 351 """ 352 grok.context(IFacultyContainer) 353 grok.view(FacultyContainerPage) 354 text = 'Search academic section' 355 icon = 'actionicon_search.png' 356 target = '@@search' 348 357 349 358 class ManageFacultyActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.