Changeset 3cc806 in indico


Ignore:
Timestamp:
02/04/10 18:55:27 (3 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
prov-dual-interface
Children:
cdec77
Parents:
8577c6 (diff), 0d29a2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'v0.97-series' into prov-dual-interface

Location:
indico
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/conference.py

    rf6f550 r0d29a2  
    401401        recMat.recover() 
    402402        self.notifyModification() 
     403 
     404    def getMaterialRegistry(self): 
     405        """ 
     406        Return the correct material registry for this type 
     407        """ 
     408        from MaKaC.webinterface.materialFactories import CategoryMFRegistry 
     409        return CategoryMFRegistry 
    403410 
    404411    def getMaterialById( self, matId ): 
     
    40454052        self.notifyModification() 
    40464053 
     4054    def getMaterialRegistry(self): 
     4055        """ 
     4056        Return the correct material registry for this type 
     4057        """ 
     4058        from MaKaC.webinterface.materialFactories import ConfMFRegistry 
     4059        return ConfMFRegistry 
     4060 
    40474061    def getMaterialById( self, matId ): 
    40484062        if matId.lower() == 'paper': 
     
    64856499        self.notifyModification() 
    64866500 
     6501    def getMaterialRegistry(self): 
     6502        """ 
     6503        Return the correct material registry for this type 
     6504        """ 
     6505        from MaKaC.webinterface.materialFactories import SessionMFRegistry 
     6506        return SessionMFRegistry 
     6507 
    64876508    def getMaterialById( self, matId ): 
    64886509        if matId.lower() == 'minutes': 
     
    92169237        self.notifyModification() 
    92179238 
     9239    def getMaterialRegistry(self): 
     9240        """ 
     9241        Return the correct material registry for this type 
     9242        """ 
     9243        from MaKaC.webinterface.materialFactories import ContribMFRegistry 
     9244        return ContribMFRegistry 
     9245 
    92189246    def getMaterialById( self, matId ): 
    92199247        if matId.lower() == 'paper': 
     
    1048310511        self.notifyModification() 
    1048410512 
     10513    def getMaterialRegistry(self): 
     10514        """ 
     10515        Return the correct material registry for this type 
     10516        """ 
     10517        from MaKaC.webinterface.materialFactories import SubContributionMFRegistry 
     10518        return SubContributionMFRegistry 
     10519 
    1048510520    def getMaterialById( self, matId ): 
    1048610521        if matId.lower() == 'paper': 
  • indico/MaKaC/webinterface/materialFactories.py

    rdebb1b r0d29a2  
    2020## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
    2121 
     22import MaKaC.conference as conference 
    2223import MaKaC.webinterface.urlHandlers as urlHandlers 
    2324import MaKaC.webinterface.wcomponents as wcomponents 
    24 import MaKaC.conference as conference 
    2525from MaKaC.common.Configuration import Config 
    2626from MaKaC.i18n import _ 
     
    399399        for factory in cls._registry.values(): 
    400400            if factory.appliesToMaterial(mat): 
    401                 return factory             
     401                return factory 
    402402 
    403403 
     
    409409                  VideoFactory._id: VideoFactory, \ 
    410410                  PosterFactory._id: PosterFactory } 
    411  
    412411 
    413412class SessionMFRegistry( MaterialFactoryRegistry ): 
     
    422421                  PosterFactory._id: PosterFactory } 
    423422 
    424  
     423class CategoryMFRegistry( ContribMFRegistry ): 
     424    pass 
     425 
     426class SubContributionMFRegistry( ContribMFRegistry ): 
     427    pass 
  • indico/MaKaC/webinterface/rh/base.py

    rba2d45 r56c3ca  
    407407        return p.display() 
    408408 
     409    ### SWITCHER 
     410    def _checkInterfaceSwitchNeeded(self): 
     411 
     412        from MaKaC.webinterface.session.base import RequestWrapper 
     413 
     414        interface = RequestWrapper(self._req).cookies.get("INDICO_INTERFACE") 
     415        if interface == 'past': 
     416            current_url = self._req.construct_url(self._req.unparsed_uri) 
     417            self._redirect(current_url.replace('indicobeta.cern.ch','indico.cern.ch')) 
     418    ### *** 
     419 
    409420    def process( self, params ): 
    410421        """ 
     
    442453                        self._setSessionUser() 
    443454                        self._setLang() 
     455 
     456                        ### SWITCHER 
     457                        self._checkInterfaceSwitchNeeded(); 
     458                        ### *** 
    444459 
    445460                        if self._getUser(): 
  • indico/MaKaC/webinterface/rh/conferenceBase.py

    r0f1000 r0d29a2  
    282282        """ 
    283283         
    284         mf = materialFactories.ContribMFRegistry.getById(self._materialId) 
     284        mf = self._target.getMaterialRegistry().getById(self._materialId) 
    285285 
    286286        material = mf.get(self._target) 
  • indico/MaKaC/webinterface/stylesheets/include/indico.xsl

    r40fafb r9161a3  
    277277            </em> 
    278278          </xsl:if> 
     279 
     280          <xsl:if 
     281            test="count(./location) != 0 and normalize-space(string(../location)) != normalize-space(string(./location))" 
     282            > 
     283            <span style="margin-left: 15px;">( 
     284            <xsl:apply-templates select="./location"> 
     285              <xsl:with-param name="span"/> 
     286            </xsl:apply-templates>)</span> 
     287          </xsl:if> 
     288 
     289 
    279290      </span> 
    280291 
     
    325336            </tr> 
    326337          </xsl:if> 
    327  
    328           <xsl:if 
    329             test="count(./location) != 0 and normalize-space(string(../location)) != normalize-space(string(./location))" 
    330             > (<xsl:apply-templates select="./location"> 
    331               <xsl:with-param name="span"/> 
    332             </xsl:apply-templates>) </xsl:if> 
    333338 
    334339        </tbody> 
  • indico/MaKaC/webinterface/tpls/HTMLHeader.tpl

    rd50f2e r9161a3  
    11<% declareTemplate(newTemplateStyle=True) %> 
    22 
    3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
     3<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
     4            "http://www.w3.org/TR/html4/loose.dtd"> 
    45<html> 
    56    <head> 
    67        <title><%= page._getTitle() %><%= area %></title> 
     8        <meta http-equiv="X-UA-Compatible" content="IE=8" /> 
     9 
    710        <link rel="shortcut icon" type="image/x-icon" href="<%= systemIcon('addressBarIcon') %>"> 
    811        <link rel="stylesheet" type="text/css" href="<%= baseurl %>/css/<%= stylesheet %>"> 
     
    1013 
    1114        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    12         <meta http-equiv="X-UA-Compatible" content="IE=8" /> 
    1315 
    1416        <script type="text/javascript"> 
  • indico/MaKaC/webinterface/tpls/Header.tpl

    r37b248 rf65b26  
    11<% declareTemplate(newTemplateStyle = True) %> 
    22 
     3<% includeTpl('InterfaceSwitcher') %> 
    34<% includeTpl('Announcement') %> 
    45 
  • indico/MaKaC/webinterface/urlHandlers.py

    r9f45f3 rad2912  
    45034503        return cls.displayUHs.get("%s%s"%(klazz.__name__, type), None) 
    45044504 
    4505 # Testing helloworld 
    4506 class UHHelloWorld(URLHandler): 
    4507     _relativeURL = "helloWorld.py" 
    4508  
    4509     @classmethod 
    4510     def getURL( cls, name=None ): 
     4505class UHSwitchInterface( URLHandler ): 
     4506    _relativeURL = "switchInterface.py" 
     4507 
     4508    def getURL( cls, whereTo, returnURL="" ): 
     4509        """ 
     4510        whereTo - 'future' or 'past' 
     4511        """ 
    45114512        url = cls._getURL() 
    4512         if name != None: 
    4513             url.addParam("name", name) 
     4513        if str(returnURL).strip() == "": 
     4514            url.addParam( "returnURL", UHWelcome.getURL()) 
     4515        else: 
     4516            url.addParam( "returnURL", returnURL ) 
     4517        url.addParam("to", whereTo) 
    45144518        return url 
     4519 
Note: See TracChangeset for help on using the changeset viewer.