- Timestamp:
- 20 Sep 2012, 08:49:37 (12 years ago)
- Location:
- main/waeup.kofa/branches/uli-zc-async
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/uli-zc-async
- Property svn:mergeinfo changed
-
main/waeup.kofa/branches/uli-zc-async/src/waeup/kofa/browser/viewlets.py
r8387 r9209 66 66 """A base for action buttons. 67 67 68 An action button provides an icon, some text and links to a 69 target. If you want to set a different text, icon or target name 68 An action button provides an icon, some text, links to a 69 target and optionally an onclick event handler. 70 If you want to set a different text, icon or target name 70 71 for some active button below, just override the approriate 71 72 attribute in the concerned viewlet. … … 82 83 * ``target_url`` 83 84 The URL of the link target. 85 86 * ``onclick`` 87 An onclick Javascript event handler. 84 88 85 89 """ … … 143 147 return self.view.url(self.view.context, self.target) 144 148 149 @property 150 def onclick(self): 151 """Onclick event... 152 """ 153 return 154 145 155 class PlainActionButton(ActionButton): 146 156 """A base for action buttons without image … … 386 396 grok.require('waeup.manageDataCenter') 387 397 text = _('Edit settings') 398 grok.order(1) 388 399 389 400 class ManageFacultiesContainerActionButton(ManageActionButton): … … 456 467 grok.context(ICertificateCourse) 457 468 grok.view(CertificateCoursePage) 458 text = _('Edit course referrer') 459 460 # 461 # Add actions... 462 # 469 text = _('Edit certificate course') 463 470 464 471 class AddUserActionButton(AddActionButton): … … 468 475 text = _('Add user') 469 476 470 # 471 # Actions with a 'browse' icon... 472 # 473 class BrowseActionButton(ActionButton): 474 grok.baseclass() 475 grok.context(IKofaObject) 476 grok.template('actionbutton') 477 grok.viewletmanager(ActionBar) 477 class BrowseDatacenterLogs(ActionButton): 478 grok.context(IDataCenter) 478 479 grok.require('waeup.manageDataCenter') 479 icon = 'actionicon_manage.png' # File must exist in static/480 target = '@@show' # link to this viewname.481 text = _('Show logs') # Text to display on the button482 483 class BrowseDatacenterLogs(BrowseActionButton):484 grok.context(IDataCenter)485 480 grok.view(DatacenterPage) 486 grok.order( 4)481 grok.order(2) 487 482 icon = 'actionicon_info.png' 488 483 target = '@@logs' 489 484 text = _('Show logs') 490 485 491 # 492 # Misc. buttons... 493 # 486 class UploadCSVButton(ActionButton): 487 grok.context(IDataCenter) 488 grok.view(DatacenterPage) 489 grok.require('waeup.manageDataCenter') 490 grok.order(3) 491 icon = 'actionicon_up.png' 492 target = '@@upload' 493 text = _('Upload data') 494 494 495 class BatchOpButton(ActionButton): 495 496 grok.context(IDataCenter) 496 497 grok.view(DatacenterPage) 497 498 grok.require('waeup.importData') 498 grok.order( 6)499 grok.order(4) 499 500 icon = 'actionicon_gear.png' 500 501 target = '@@import1' 501 text = _(' Batch processing')502 503 class UploadCSVButton(ActionButton):502 text = _('Process data') 503 504 class ExportCSVButton(ActionButton): 504 505 grok.context(IDataCenter) 505 506 grok.view(DatacenterPage) 506 507 grok.require('waeup.manageDataCenter') 507 508 grok.order(5) 508 icon = 'actionicon_up.png'509 target = '@@upload'510 text = _('Upload CSV file')511 512 class ExportCSVButton(ActionButton):513 grok.context(IDataCenter)514 grok.view(DatacenterPage)515 grok.require('waeup.manageDataCenter')516 grok.order(7)517 509 icon = 'actionicon_down.png' 518 510 target = '@@export' 519 text = _('Export CSV file') 511 text = _('Export data') 512 513 class BrowseFinishedFiles(ActionButton): 514 grok.context(IDataCenter) 515 grok.require('waeup.manageDataCenter') 516 grok.view(DatacenterPage) 517 grok.order(6) 518 icon = 'actionicon_finished.png' 519 target = '@@processed' 520 text = _('View processed files') 520 521 521 522 #
Note: See TracChangeset for help on using the changeset viewer.