diff --git a/gen/plone25/installer.py b/gen/plone25/installer.py index c5c3a2f..19053b5 100644 --- a/gen/plone25/installer.py +++ b/gen/plone25/installer.py @@ -430,19 +430,14 @@ class PloneInstaller: def manageLanguages(self): '''Manages the languages supported by the application.''' - if self.languageSelector: - # We must install the PloneLanguageTool if not done yet - qi = self.ploneSite.portal_quickinstaller - if not qi.isProductInstalled('PloneLanguageTool'): - qi.installProduct('PloneLanguageTool') - languageTool = self.ploneSite.portal_languages - defLanguage = self.languages[0] - languageTool.manage_setLanguageSettings(defaultLanguage=defLanguage, - supportedLanguages=self.languages, setContentN=None, - setCookieN=True, setRequestN=True, setPathN=True, - setForcelanguageUrls=True, setAllowContentLanguageFallback=None, - setUseCombinedLanguageCodes=None, displayFlags=False, - startNeutral=False) + languageTool = self.ploneSite.portal_languages + defLanguage = self.languages[0] + languageTool.manage_setLanguageSettings(defaultLanguage=defLanguage, + supportedLanguages=self.languages, setContentN=None, + setCookieN=True, setRequestN=True, setPathN=True, + setForcelanguageUrls=True, setAllowContentLanguageFallback=None, + setUseCombinedLanguageCodes=None, displayFlags=False, + startNeutral=False) def finalizeInstallation(self): '''Performs some final installation steps.''' diff --git a/gen/plone25/mixins/ToolMixin.py b/gen/plone25/mixins/ToolMixin.py index 8bb89a0..eee7bea 100644 --- a/gen/plone25/mixins/ToolMixin.py +++ b/gen/plone25/mixins/ToolMixin.py @@ -791,8 +791,16 @@ class ToolMixin(BaseMixin): msg = self.translate(u'Welcome! You are now logged in.', domain='plone') logMsg = 'User "%s" has been logged in.' % login + msg = msg.encode('utf-8') self.log(logMsg) - return self.goto(rq['HTTP_REFERER'], msg.encode('utf-8')) + # Bring Managers to the config, leave others on the main page. + user = self.portal_membership.getAuthenticatedMember() + if user.has_role('Manager'): + # Bring the user to the configuration + url = self.goto(self.absolute_url(), msg) + else: + url = self.goto(rq['HTTP_REFERER'], msg) + return url def performLogout(self): '''Logs out the current user when he clicks on "disconnect".''' @@ -814,8 +822,7 @@ class ToolMixin(BaseMixin): session.invalidate() from Products.CMFPlone import transaction_note transaction_note('Logged out') - self.getProductConfig().logger.info('User "%s" has been logged out.' % \ - userId) + self.log('User "%s" has been logged out.' % userId) # Remove user from variable "loggedUsers" from appy.gen.plone25.installer import loggedUsers if loggedUsers.has_key(userId): del loggedUsers[userId] diff --git a/gen/plone25/skin/appy.css b/gen/plone25/skin/appy.css index c575df5..bd5edc9 100644 --- a/gen/plone25/skin/appy.css +++ b/gen/plone25/skin/appy.css @@ -5,7 +5,14 @@ body { a {text-decoration: none; color: #747171;} a:visited {color: #840107;} -table { font-size: 100%; border-spacing: 0px; } +table { font-size: 100%; border-spacing: 0px; border-collapse:collapse;} +input {border: 1px solid #a79e9e;} +form {margin: 0; padding: 0;} +p {margin: 0;} + +h1 {font-size: 11pt; margin:0;} +h2 {font-size: 10pt; margin:0; font-style: italic; font-weight: normal;} +h3 {font-size: 9pt; margin:0; font-weight: bold;} .main { width: 900px; @@ -16,6 +23,15 @@ table { font-size: 100%; border-spacing: 0px; } box-shadow: 3px 3px 3px #A9A9A9; } -.top { height: 80px; margin-left: 3em; vertical-align: top;} +.top { height: 75px; margin-left: 3em; vertical-align: top;} .lang { margin-right: 3px; } -.auth { background-color: grey;} +.userStrip { + background-color: #a2a2a2; + border-top: 3px solid #525252; + border-bottom: 2px solid #9b0000; + height: 30px; +} +.login { margin-top: 2px; margin-bottom: 2px; color: white;} +.buttons { margin-left: 4px; } +.content {margin: 7px 0 9px 4px;} +.message {color: #9b0000; font-style: italic; position: absolute; top: -50px; right: 5px} diff --git a/gen/plone25/skin/appy.js b/gen/plone25/skin/appy.js new file mode 100644 index 0000000..15b6391 --- /dev/null +++ b/gen/plone25/skin/appy.js @@ -0,0 +1,32 @@ +function cookiesAreEnabled() { + // Test whether cookies are enabled by attempting to set a cookie and then + // change its value + var c = "areYourCookiesEnabled=0"; + document.cookie = c; + var dc = document.cookie; + // Cookie not set? Fail + if (dc.indexOf(c) == -1) return 0; + // Change test cookie + c = "areYourCookiesEnabled=1"; + document.cookie = c; + dc = document.cookie; + // Cookie not changed? fail + if (dc.indexOf(c) == -1) return 0; + // Delete cookie + document.cookie = "areYourCookiesEnabled=; expires=Thu, 01-Jan-70 00:00:01 GMT"; + return 1; +} + +function setLoginVars() { + // Indicate if JS is enabled + document.getElementById('js_enabled').value = 1; + // Indicate if cookies are enabled + document.getElementById('cookies_enabled').value = cookiesAreEnabled(); + // Copy login and password length to alternative vars since current vars will + // be removed from the request by zope's authentication mechanism. + document.getElementById('login_name').value = document.getElementById('__ac_name').value; + password = document.getElementById('__ac_password'); + emptyPassword = document.getElementById('pwd_empty'); + if (password.value.length==0) emptyPassword.value = '1'; + else emptyPassword.value = '0'; +} diff --git a/gen/plone25/skin/home.gif b/gen/plone25/skin/home.gif new file mode 100644 index 0000000..b0caa86 Binary files /dev/null and b/gen/plone25/skin/home.gif differ diff --git a/gen/plone25/skin/logo.jpg b/gen/plone25/skin/logo.jpg index 5cf038f..0a8f479 100644 Binary files a/gen/plone25/skin/logo.jpg and b/gen/plone25/skin/logo.jpg differ diff --git a/gen/plone25/skin/logout.gif b/gen/plone25/skin/logout.gif new file mode 100644 index 0000000..cebeb91 Binary files /dev/null and b/gen/plone25/skin/logout.gif differ diff --git a/gen/plone25/skin/template.pt b/gen/plone25/skin/template.pt index c0b8c10..35117f6 100644 --- a/gen/plone25/skin/template.pt +++ b/gen/plone25/skin/template.pt @@ -12,7 +12,8 @@
+ | The login strip - | |||||||
-
+ |
+
+
+
+
+ |
+ |
- Appy-Sub appy-Sub sub appy-Hello |