Changeset d26b95 in indico


Ignore:
Timestamp:
04/26/12 12:14:48 (13 months ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
50136d
Parents:
8e2f05
git-author:
Alberto Resco Perez <alberto.resco.perez@…> (04/26/12 11:31:06)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (04/26/12 12:14:48)
Message:

[FIX] Final judgement show reviewers history

Location:
indico/MaKaC/webinterface
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/pages/contributionReviewing.py

    r790884 rd26b95  
    123123        return wc.getHTML( pars ) 
    124124 
    125 class WContributionReviewingJudgements(wcomponents.WTemplated): 
     125class WContributionReviewingBase(wcomponents.WTemplated): 
     126 
     127    def _getStatusClass( self, judgement ): 
     128        if judgement == "Accept": 
     129            return "contributionReviewingStatusAccepted" 
     130        elif judgement == "Reject": 
     131            return "contributionReviewingStatusRejected" 
     132        elif judgement == "To be corrected": 
     133            return "contributionReviewingStatusCorrected" 
     134        else: 
     135            return "contributionReviewingStatusCorrected" 
     136 
     137    def _getStatusText( self, judgement ): 
     138        if judgement == "Accept": 
     139            return _("ACCEPTED") 
     140        elif judgement == "Reject": 
     141            return _("REJECTED") 
     142        elif judgement == "To be corrected": 
     143            return _("To be corrected") 
     144        else: 
     145            return judgement 
     146 
     147class WContributionReviewingJudgements(WContributionReviewingBase): 
    126148 
    127149    def __init__(self, conference, aw): 
     
    152174        vars["Review"] = self.__target.getReviewManager().getLastReview() 
    153175        vars["TrackList"] = self._conf.getTrackList() 
     176        vars["getStatusClass"] = lambda judgement: self._getStatusClass(judgement) 
     177        vars["getStatusText"] = lambda judgement: self._getStatusText(judgement) 
    154178 
    155179        return vars 
     
    233257        return wc.getHTML({"ShowReviewingTeam" : True}) 
    234258 
    235 class WContributionReviewingHistory(wcomponents.WTemplated): 
     259class WContributionReviewingHistory(WContributionReviewingBase): 
    236260 
    237261    def __init__(self, contribution): 
    238262        self._contribution = contribution 
    239263        self._conf = contribution.getConference() 
    240  
    241     def _getStatusClass( self, judgement ): 
    242         if judgement == "Accept": 
    243             return "contributionReviewingStatusAccepted" 
    244         elif judgement == "Reject": 
    245             return "contributionReviewingStatusRejected" 
    246         elif judgement == "To be corrected": 
    247             return "contributionReviewingStatusCorrected" 
    248         else: 
    249             return "contributionReviewingStatusCorrected" 
    250  
    251     def _getStatusText( self, judgement ): 
    252         if judgement == "Accept": 
    253             return _("ACCEPTED") 
    254         elif judgement == "Reject": 
    255             return _("REJECTED") 
    256         elif judgement == "To be corrected": 
    257             return _("To be corrected") 
    258         else: 
    259             return judgement 
    260264 
    261265    def getHTML( self, params ): 
  • indico/MaKaC/webinterface/tpls/ContributionReviewingJudgements.tpl

    red6775 rd26b95  
    6565                    <table cellspacing="0" cellpadding="5" width="100%"> 
    6666                    % for advice in AdviceList: 
    67                         <%include file="AdviceJudgementDisplay.tpl" args="advice = advice, ShowReviewer = True, format=format"/> 
     67                        <%include file="AdviceJudgementDisplay.tpl" args="Advice = advice, ShowReviewer = True, format=format"/> 
    6868                    % endfor 
    6969                    </table> 
Note: See TracChangeset for help on using the changeset viewer.