Ignore:
Timestamp:
24 May 2019, 10:13:52 (5 years ago)
Author:
Henrik Bettermann
Message:

Adjust to changes in base package.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/browser/viewlets.py

    r14300 r15424  
    2020from waeup.kofa.interfaces import IKofaObject, academic_sessions_vocab
    2121from waeup.kofa.browser.viewlets import (
    22     PrimaryNavTab, ManageActionButton, UpdateScoresActionButton)
     22    PrimaryNavTab, ManageActionButton, UpdateScoresActionButton,
     23    DownloadCSVFileActionButton, DownloadTicketOverviewActionButton)
    2324from waeup.aaue.interfaces import MessageFactory as _
    2425
     
    7071        return _('Update session ${a} scores', mapping = {'a':st})
    7172
     73
     74class CustomDownloadCSVFileActionButton(DownloadCSVFileActionButton):
     75    """ 'Download csv file' button for courses.
     76    """
     77
     78    @property
     79    def target_url(self):
     80        if self.view.__name__ == 'edit_prev_scores':
     81            return self.view.url(self.view.context, 'download_prev_scores')
     82        return self.view.url(self.view.context, 'download_scores')
     83
     84
     85class CustomDownloadTicketOverviewActionButton(
     86    DownloadTicketOverviewActionButton):
     87    """ 'Download ticket overview' button for courses.
     88    """
     89
     90    @property
     91    def target_url(self):
     92        if self.view.__name__ == 'edit_prev_scores':
     93            return ''
     94        return self.view.url(self.view.context, 'coursetickets.pdf')
     95
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r15414 r15424  
    12801280        # only orientation is different
    12811281        return students_utils.renderPDFCourseticketsOverview(
    1282             self, session, self.data(session), lecturers, '', 45, self.note)
     1282            self, 'coursetickets',
     1283            session, self.data(session), lecturers, '', 45, self.note)
    12831284
    12841285class DownloadPreviousSessionScoresView(DownloadScoresView):
  • main/waeup.aaue/trunk/src/waeup/aaue/students/viewlets.py

    r15340 r15424  
    2929    StudyCourseTranscriptActionButton,
    3030    TranscriptSlipActionButton,
    31     DownloadCSVFileActionButton,
    32     DownloadTicketOverviewActionButton)
     31    )
    3332from waeup.kofa.students.browser import StudyLevelDisplayFormPage
    3433
     
    149148    grok.name('transcript_slip')
    150149
    151 class CustomDownloadCSVFileActionButton(DownloadCSVFileActionButton):
    152     """ 'Download csv file' button for courses.
    153     """
    154 
    155     @property
    156     def target_url(self):
    157         if self.view.__name__ == 'edit_prev_scores':
    158             return self.view.url(self.view.context, 'download_prev_scores')
    159         return self.view.url(self.view.context, 'download_scores')
    160 
    161 class CustomDownloadTicketOverviewActionButton(
    162     DownloadTicketOverviewActionButton):
    163     """ 'Download ticket overview' button for courses.
    164     """
    165 
    166     @property
    167     def target_url(self):
    168         if self.view.__name__ == 'edit_prev_scores':
    169             return ''
    170         return self.view.url(self.view.context, 'coursetickets.pdf')
    171 
    172150class StudyLevelRepairActionButton(ManageActionButton):
    173151    grok.order(2)
Note: See TracChangeset for help on using the changeset viewer.