Changeset 5d2768 in indico
- Timestamp:
- 09/15/11 15:07:52 (20 months ago)
- Branches:
- master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 4c7d4152dff271ba5df5a8606605969cab454080
- Children:
- 82d302
- Parents:
- 1f14ef
- git-author:
- Jose Benito <jose.benito.gonzalez@…> (09/15/11 15:06:19)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (09/15/11 15:07:52)
- Location:
- indico/MaKaC
- Files:
-
- 13 edited
-
RSSinterface/conference.py (modified) (1 diff)
-
webinterface/pages/base.py (modified) (3 diffs)
-
webinterface/pages/conferences.py (modified) (7 diffs)
-
webinterface/pages/signIn.py (modified) (3 diffs)
-
webinterface/rh/conferenceDisplay.py (modified) (4 diffs)
-
webinterface/rh/conferenceModif.py (modified) (1 diff)
-
webinterface/rh/evaluationDisplay.py (modified) (14 diffs)
-
webinterface/rh/login.py (modified) (4 diffs)
-
webinterface/rh/registrationFormDisplay.py (modified) (3 diffs)
-
webinterface/tpls/Footer.tpl (modified) (1 diff)
-
webinterface/tpls/Help.tpl (modified) (1 diff)
-
webinterface/tpls/Search.tpl (modified) (1 diff)
-
webinterface/urlHandlers.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/RSSinterface/conference.py
r6c9393 r5d2768 85 85 confs = calIdx.getObjectsInDay(self._categ.getId(), self._date) 86 86 87 sconfs = set()88 89 87 sconfs = set(ACLfiltered(confs, self._req.getHostIP(), self._req.getAW())) 90 88 res = list(sconfs) -
indico/MaKaC/webinterface/pages/base.py
r453220 r5d2768 79 79 80 80 def _getBaseURL( self ): 81 return Config.getInstance().getBaseURL() 81 if self._rh._req.is_https() and Config.getInstance().getBaseSecureURL(): 82 baseurl = Config.getInstance().getBaseSecureURL() 83 else: 84 baseurl = Config.getInstance().getBaseURL() 85 return baseurl 82 86 83 87 def _getTitle( self ): … … 136 140 from MaKaC.webinterface.rh.admins import RHAdminBase 137 141 138 baseurl = self._getBaseURL()139 if ((isinstance(self, WPSignIn) or isinstance(self, WPConfSignIn) or isinstance(self, WPRegistrationFormSignIn)) and \140 Config.getInstance().getLoginURL().startswith("https")) or \141 self._rh._req.is_https() or self._rh.use_https():142 baseurl = baseurl.replace("http://","https://")143 baseurl = urlHandlers.setSSLPort( baseurl )144 145 142 area="" 146 143 if isinstance(self._rh, RHModificationBaseProtected): … … 158 155 return wcomponents.WHTMLHeader().getHTML({ 159 156 "area": area, 160 "baseurl": baseurl,157 "baseurl": self._getBaseURL(), 161 158 "conf": Config.getInstance(), 162 159 "page": self, -
indico/MaKaC/webinterface/pages/conferences.py
r48e36f r5d2768 447 447 #And also the modificated uploaded css 448 448 449 path = baseurl =self._getBaseURL()449 path = self._getBaseURL() 450 450 printCSS = """ 451 451 <link rel="stylesheet" type="text/css" href="%s/css/Conf_Basic.css" > … … 864 864 def _getHeadContent( self ): 865 865 #This is used for fetching the css file for conference page 866 path = baseurl =self._getBaseURL()866 path = self._getBaseURL() 867 867 printCSS = """ 868 868 <link rel="stylesheet" type="text/css" href="%s/css/Conf_Basic.css" > … … 1226 1226 styleMgr = info.HelperMaKaCInfo.getMaKaCInfoInstance().getStyleManager() 1227 1227 htdocs = Config.getInstance().getHtdocsDir() 1228 if self._rh._req.is_https() or self._rh._tohttps: 1229 baseurl = Config.getInstance().getBaseSecureURL() 1230 else: 1231 baseurl = self._getBaseURL() 1228 baseurl = self._getBaseURL() 1232 1229 # First include the default Indico stylesheet 1233 1230 styleText = """<link rel="stylesheet" href="%s/css/%s">\n""" % \ … … 1500 1497 def _getHeadContent( self ): 1501 1498 headContent=WPConferenceDefaultDisplayBase._getHeadContent(self) 1502 baseurl = Config.getInstance().getBaseURL()1499 baseurl = self._getBaseURL() 1503 1500 return """ 1504 1501 %s … … 5514 5511 def _setActiveSideMenuItem( self ): 5515 5512 self._layoutMenuItem.setActive() 5516 5517 class WPConfModifDisplay( WPConfModifDisplayBase ):5518 5519 def __init__(self, rh, conf, linkId, formatOption=None, optionalParams={}):5520 WPConfModifDisplayBase.__init__(self, rh, conf)5521 self._linkId = linkId5522 self._formatOption = formatOption5523 self._menu=displayMgr.ConfDisplayMgrRegistery().getDisplayMgr(self._conf).getMenu()5524 if linkId:5525 self._link = self._menu.getLinkById(linkId)5526 else:5527 self._link = self._menu5528 self._optionalParams=optionalParams5529 5530 def _getTabContent( self, params ):5531 wc = WConfModifDisplay( self._conf, self._linkId, self._formatOption )5532 return wc.getHTML(self._optionalParams)5533 5534 def _getHeadContent( self ):5535 #This is used for fetching the css file for management - display5536 path = baseurl = self._getBaseURL()5537 saveurl = urlHandlers.UHSavePic.getURL(self._conf)5538 printCSS = """5539 <link rel="stylesheet" type="text/css" href="%s/css/ModifDisplay.css" >5540 """ %(path)5541 return printCSS5542 5513 5543 5514 class WPConfModifDisplayCustomization( WPConfModifDisplayBase ): … … 11298 11269 11299 11270 class WPConfModifPreviewCSS( WPConferenceDefaultDisplayBase ): 11300 #from MaKaC.webinterface.pages import base11301 # from MaKaC.webinterface import wcomponents11302 11271 11303 11272 def __init__( self, rh, conf, selectedCSSId): … … 11320 11289 11321 11290 def _getBody( self, params ): 11322 path = self._getBaseURL()11323 htdocs = Config.getInstance().getHtdocsDir()11324 11291 params["URL2Back"] = urlHandlers.UHConfModifDisplay.getURL(self._conf) 11325 11292 params["cssurl"] = "" -
indico/MaKaC/webinterface/pages/signIn.py
rbdd862 r5d2768 20 20 21 21 import MaKaC.webinterface.pages.base as base 22 import MaKaC.webinterface.pages.conferences as conferences23 22 import MaKaC.webinterface.urlHandlers as urlHandlers 24 23 import MaKaC.webinterface.wcomponents as wcomponents … … 27 26 28 27 class WPSignIn( base.WPDecorated ): 29 28 30 29 def __init__(self, rh, login="", msg = ""): 31 30 self._login = login 32 31 self._msg = msg 33 32 base.WPDecorated.__init__( self, rh) 34 33 35 34 def _getBody( self, params ): 36 35 wc = wcomponents.WSignIn() … … 45 44 46 45 class WPAccountAlreadyActivated( base.WPDecorated ): 47 46 48 47 def __init__(self, rh, av): 49 48 base.WPDecorated.__init__( self, rh) 50 49 self._av = av 51 50 52 51 def _getBody( self, params ): 53 52 wc = wcomponents.WAccountAlreadyActivated( self._av) 54 53 params["mailLoginURL"] = urlHandlers.UHSendLogin.getURL(self._av) 55 54 56 55 return wc.getHTML( params ) 57 56 58 57 59 58 class WPAccountActivated( base.WPDecorated ): 60 59 61 60 def __init__(self, rh, av): 62 61 base.WPDecorated.__init__( self, rh) 63 62 self._av = av 64 63 65 64 def _getBody( self, params ): 66 65 wc = wcomponents.WAccountActivated( self._av) 67 66 params["mailLoginURL"] = urlHandlers.UHSendLogin.getURL(self._av) 68 67 params["loginURL"] = urlHandlers.UHSignIn.getURL() 69 68 70 69 return wc.getHTML( params ) 71 70 72 71 73 72 class WPAccountDisabled( base.WPDecorated ): 74 73 75 74 def __init__(self, rh, av): 76 75 base.WPDecorated.__init__( self, rh) 77 76 self._av = av 78 77 79 78 def _getBody( self, params ): 80 79 wc = wcomponents.WAccountDisabled( self._av) 81 80 #params["mailLoginURL"] = urlHandlers.UHSendLogin.getURL(self._av) 82 81 83 82 return wc.getHTML( params ) 84 83 85 84 86 85 class WPUnactivatedAccount( base.WPDecorated ): 87 86 88 87 def __init__(self, rh, av): 89 88 base.WPDecorated.__init__( self, rh) 90 89 self._av = av 91 90 92 91 def _getBody( self, params ): 93 92 wc = wcomponents.WUnactivatedAccount( self._av) 94 93 params["mailActivationURL"] = urlHandlers.UHSendActivation.getURL(self._av) 95 94 96 95 return wc.getHTML( params ) -
indico/MaKaC/webinterface/rh/conferenceDisplay.py
r1f14ef r5d2768 58 58 class RHConfSignIn( conferenceBase.RHConferenceBase ): 59 59 60 _tohttps = True 61 60 62 def _checkParams( self, params ): 61 63 conferenceBase.RHConferenceBase._checkParams( self, params ) … … 70 72 71 73 def _process( self ): 72 self._tohttps = True73 74 #Check for automatic login 74 75 auth = AuthenticatorMgr() … … 77 78 url = self._returnURL 78 79 self._getSession().setUser( av ) 80 if Config.getInstance().getBaseSecureURL().startswith('https://'): 81 url = str(url).replace('http://', 'https://') 79 82 self._redirect( url ) 80 83 if not self._signIn: … … 99 102 tz = tzUtil.getSessionTZ() 100 103 self._getSession().setVar("ActiveTimezone",tz) 104 if Config.getInstance().getBaseSecureURL().startswith('https://'): 105 url = str(url).replace('http://', 'https://') 101 106 self._redirect( url ) 102 107 -
indico/MaKaC/webinterface/rh/conferenceModif.py
r250e54 r5d2768 4155 4155 #------------------------------------------------------------------------------------- 4156 4156 4157 class RHConfModifDisplay( RHConferenceModifBase ):4158 _uh = urlHandlers.UHConfModifDisplay4159 4160 def _checkParams( self, params ):4161 RHConferenceModifBase._checkParams( self, params )4162 self._linkId = params.get("linkId", "")4163 self._formatOption = params.get("formatOption", "")4164 self._optionalParams={}4165 if params.has_key("modifiedText"):4166 self._optionalParams["modifiedText"]=params.has_key("modifiedText")4167 4168 def _process( self ):4169 p = conferences.WPConfModifDisplay(self, self._target, self._linkId, self._formatOption, optionalParams=self._optionalParams )4170 return p.display()4171 4172 4157 class RHConfModifDisplayCustomization( RHConferenceModifBase ): 4173 4158 _uh = urlHandlers.UHConfModifDisplayCustomization -
indico/MaKaC/webinterface/rh/evaluationDisplay.py
rbdd862 r5d2768 34 34 RHConferenceBaseDisplay._checkParams(self, params) 35 35 self._evaluation = self._conf.getEvaluation() 36 37 def _processIfActive( self ): 38 """ only override this method if the Evaluation must be activated for 36 37 def _processIfActive( self ): 38 """ only override this method if the Evaluation must be activated for 39 39 carrying on the handler execution. 40 40 """ … … 49 49 else: 50 50 return self._processIfActive() 51 51 52 52 def _wpEvaluation(self, pageToShow): 53 53 """redirection to the right class, dependending on conference type. … … 65 65 """General information display.""" 66 66 _uh = urlHandlers.UHConfEvaluationMainInformation 67 67 68 68 def _processIfActive( self ): 69 69 if self.getWebFactory()!=None : #Event == Meeting/Lecture … … 76 76 """Invite user to login/signin.""" 77 77 _uh = urlHandlers.UHConfEvaluationSignIn 78 78 _tohttps = True 79 80 79 81 def _processIfActive( self ): 80 82 return self._wpEvaluation("SignIn").display() … … 93 95 urlLogin = urlLogin.replace("http://", "https://") 94 96 return urlLogin 95 97 96 98 def _checkProtection( self ): 97 99 RHBaseEvaluation._checkProtection(self) … … 99 101 self._redirect( self._getLoginURL() ) 100 102 self._doProcess = False 101 103 102 104 103 105 class RHEvaluationDisplay( RHEvaluationDisplayBase ): 104 106 """Evaluation display.""" 105 107 106 108 def _processIfActive( self ): 107 109 if self._getUser()!=None and self._getUser().hasSubmittedEvaluation(self._evaluation): 108 110 return self._wpEvaluation("DisplayModif").display() 109 else: 111 else: 110 112 return self._evaluationDisplay().display() 111 113 112 114 def _evaluationDisplay(self): 113 115 """What to display.""" … … 123 125 """Submitted evaluation modification.""" 124 126 _uh = urlHandlers.UHConfEvaluationDisplayModif 125 127 126 128 def _processIfActive( self ): 127 129 if self._getUser()!=None and self._getUser().hasSubmittedEvaluation(self._conf.getEvaluation()): … … 135 137 class RHEvaluationSubmit (RHBaseEvaluation): 136 138 """Submit the evaluation.""" 137 139 138 140 def _checkParams( self, params ): 139 141 RHBaseEvaluation._checkParams( self, params ) … … 150 152 else : #Event == Conference 151 153 self._redirect(urlHandlers.UHConfEvaluationMainInformation.getURL(self._conf)) 152 154 153 155 ######## 154 156 #SUBMIT# 155 157 ######## 156 158 if self._submit: 157 159 158 160 #################### 159 161 #get some variables# … … 163 165 mode = params.get("mode","") 164 166 user = self._getUser() 165 167 166 168 ########## 167 169 #Checking# … … 182 184 elif evaluation.isMandatoryAccount() or mode==Evaluation._EDIT : 183 185 self._userShouldBeLoggedIn() 184 186 185 187 ########## 186 188 #Add mode# … … 197 199 #notification 198 200 submission.notifySubmissionSubmitted() 199 201 200 202 ########### 201 203 #Edit mode# … … 219 221 elif HelperMaKaCInfo.getMaKaCInfoInstance().isDebugActive() : 220 222 raise Exception("Evaluation - Strange error... the submission of this user was not found!") 221 223 222 224 ########## 223 225 #Redirect# 224 226 ########## 225 227 self._redirect(urlHandlers.UHConfEvaluationSubmitted.getURL(self._conf, mode=mode)) 226 228 227 229 def _userShouldBeLoggedIn(self): 228 230 """Strange error: the logged user is no more logged in...""" … … 237 239 """Show message : Evaluation submitted.""" 238 240 _uh = urlHandlers.UHConfEvaluationMainInformation 239 241 240 242 def _processIfActive( self ): 241 243 mode = self.getRequestParams().get("mode","") or Evaluation._SUBMIT -
indico/MaKaC/webinterface/rh/login.py
rb2f346 r5d2768 37 37 class RHSignIn( base.RH ): 38 38 39 _tohttps = True 40 39 41 def _checkParams( self, params ): 40 42 self._signIn = params.get("signIn", "").strip() … … 57 59 self._getSession().setVar("ActiveTimezone",tz) 58 60 self._getSession().setUser( av ) 61 if Config.getInstance().getBaseSecureURL().startswith('https://'): 62 url = str(url).replace('http://', 'https://') 59 63 self._redirect( url, noCache = True ) 60 64 if not self._signIn: … … 86 90 else: 87 91 url += "?userId=%s"%self._userId 92 if Config.getInstance().getBaseSecureURL().startswith('https://'): 93 url = str(url).replace('http://', 'https://') 88 94 self._redirect( url, noCache = True ) 89 95 … … 107 113 self._redirect(autoLogoutRedirect) 108 114 else: 109 # if not all the site is HTTPS, try moving user to plain HTTP 110 if not Config.getInstance().getBaseURL().startswith('https'): 111 self._redirect(str(self._returnURL).replace('https', 'http')) 112 else: 113 self._redirect(self._returnURL) 115 self._redirect(self._returnURL) 114 116 115 117 -
indico/MaKaC/webinterface/rh/registrationFormDisplay.py
rf4804a r5d2768 62 62 class RHRegistrationFormSignIn( RHBaseRegistrationForm ): 63 63 _uh = urlHandlers.UHConfRegistrationFormSignIn 64 _tohttps = True 64 65 65 66 def _checkParams( self, params ): … … 71 72 72 73 def _processIfActive( self ): 73 self._tohttps = True74 74 #Check for automatic login 75 75 auth = AuthenticatorMgr() … … 78 78 url = self._returnURL 79 79 self._getSession().setUser( av ) 80 if Config.getInstance().getBaseSecureURL().startswith('https://'): 81 url = str(url).replace('http://', 'https://') 80 82 self._redirect( url ) 81 83 p = registrationForm.WPRegistrationFormSignIn(self, self._conf) -
indico/MaKaC/webinterface/tpls/Footer.tpl
r988cfe r5d2768 29 29 30 30 <img src="${ systemIcon("indico_small") }" alt="${ _("Indico - Integrated Digital Conference")}" style="vertical-align: middle; margin-right: 2px;"/> 31 <span style="vertical-align: middle;">${ _("Powered by ")} <a href="http:// cdsware.cern.ch/indico/">Indico</a></span>31 <span style="vertical-align: middle;">${ _("Powered by ")} <a href="http://indico-software.org">Indico</a></span> 32 32 33 33 % if Configuration.Config.getInstance().getWorkerName()!="": -
indico/MaKaC/webinterface/tpls/Help.tpl
r4a0dcc r5d2768 273 273 274 274 <br/> 275 <p><em>${ _("You can find more user guides, in different languages, provided by external collaborators") } <a href="http:// cdswaredev.cern.ch/indico/wiki/User/UserGuides">here</a>.</em></p>275 <p><em>${ _("You can find more user guides, in different languages, provided by external collaborators") } <a href="http://indico-software.org/wiki/User/UserGuides">here</a>.</em></p> 276 276 277 277 </div> -
indico/MaKaC/webinterface/tpls/Search.tpl
rc0de5a r5d2768 27 27 <div style="float: right; margin-top:10px;"> 28 28 <span style="color:#777">Search powered by</span> 29 <a href="http:// cdsware.cern.ch/invenio/"><img src="${ systemIcon('invenio') }" alt="CDS Invenio" title="${ _("IndicoSearch is powered by CDS Invenio")}" style="vertical-align: middle; border: 0px;" /></a>29 <a href="http://invenio-software.org"><img src="${ systemIcon('invenio') }" alt="CDS Invenio" title="${ _("IndicoSearch is powered by CDS Invenio")}" style="vertical-align: middle; border: 0px;" /></a> 30 30 </div> 31 31 -
indico/MaKaC/webinterface/urlHandlers.py
r250e54 r5d2768 68 68 rh = ContextManager.get('currentRH', None) 69 69 70 if (cls in [UHSignIn, UHSignOut, UHConfSignIn, UHConfRegistrationFormSignIn] and \ 71 Config.getInstance().getBaseSecureURL()) or rh and (rh._req.is_https() or rh.use_https()): 70 if rh._req.is_https() and Config.getInstance().getBaseSecureURL(): 72 71 baseURL = Config.getInstance().getBaseSecureURL() 73 72 else:
Note: See TracChangeset
for help on using the changeset viewer.
