Ignore:
Timestamp:
23 Sep 2018, 05:05:04 (6 years ago)
Author:
Henrik Bettermann
Message:

Merge with /main/waeup.kofa/branches/henrik-transcript-workflow:15127-15162

Location:
main/waeup.kofa/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk

  • main/waeup.kofa/trunk/src/waeup/kofa

  • main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py

    r14286 r15163  
    365365        return ''
    366366
     367class TranscriptOfficerStudents(ManageLink):
     368    """A link to transcript requests.
     369    """
     370    grok.order(6)
     371    grok.require('waeup.Authenticated')
     372
     373    link = u'my_transcript_requests'
     374    text = _(u'My ToDoList')
     375
     376    def render(self):
     377        user_account = get_user_account(self.request)
     378        if user_account:
     379            local_roles = user_account.getLocalRoles()
     380            if local_roles.has_key('waeup.local.TranscriptOfficer'):
     381                url = self.view.url(grok.getSite(), self.link)
     382                text = translate(self.text, context=self.request)
     383                return u'<li><a href="%s">%s</a></li>' % (url, text)
     384        return ''
     385
     386class TranscriptSigneeStudents(ManageLink):
     387    """A link to transcript signing requests.
     388    """
     389    grok.order(6)
     390    grok.require('waeup.Authenticated')
     391
     392    link = u'my_transcript_signing_requests'
     393    text = _(u'My ToDoList')
     394
     395    def render(self):
     396        user_account = get_user_account(self.request)
     397        if user_account:
     398            local_roles = user_account.getLocalRoles()
     399            if local_roles.has_key('waeup.local.TranscriptSignee'):
     400                url = self.view.url(grok.getSite(), self.link)
     401                text = translate(self.text, context=self.request)
     402                return u'<li><a href="%s">%s</a></li>' % (url, text)
     403        return ''
     404
    367405class MyPreferences(ManageLink):
    368406    """A link to personal preferences, placed in upper left box.
Note: See TracChangeset for help on using the changeset viewer.