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 @@ - + + @@ -23,7 +24,7 @@ Logo - + Language selector (links or listbox) + The user data strip + + The message strip + + + - +
The login strip -
- +
- +
a + The user login form for anonymous users + + + + User info and controls for authenticated users + + + + +
+ + + + + + + + +
+
+
+
+
+
+ + + + +
+
+
- -
-

Appy

-

Sub appy

-

Sub sub appy

-

Hello

diff --git a/gen/plone25/templates/ProfileInit.py b/gen/plone25/templates/ProfileInit.py index 515c7eb..5bd4d25 100644 --- a/gen/plone25/templates/ProfileInit.py +++ b/gen/plone25/templates/ProfileInit.py @@ -3,14 +3,14 @@ from Products.CMFCore.utils import getToolByName # ------------------------------------------------------------------------------ def installProduct(context): - '''Installs the necessary products for running PloneMeeting.''' + '''Installs the necessary products for Appy.''' portal = context.getSite() qi = getToolByName(portal, 'portal_quickinstaller') - if not qi.isProductInstalled('Archetypes'): - qi.installProduct('Archetypes') + if not qi.isProductInstalled('PloneLanguageTool'): + qi.installProduct('PloneLanguageTool') if not qi.isProductInstalled(''): qi.installProduct('') - return "Product installed." + return " installed." # ------------------------------------------------------------------------------ def install_default(context): diff --git a/gen/po.py b/gen/po.py index faf64bd..037086d 100644 --- a/gen/po.py +++ b/gen/po.py @@ -89,7 +89,7 @@ class PoMessage: BAD_SELECT_VALUE = 'The value is not among possible values for this field.' ACTION_OK = 'The action has been successfully executed.' ACTION_KO = 'A problem occurred while executing the action.' - FRONT_PAGE_TEXT = 'Welcome to this Appy-powered Plone site.' + FRONT_PAGE_TEXT = 'Welcome to this Appy-powered site.' EMAIL_SUBJECT = '${siteTitle} - Action \\"${transitionName}\\" has been ' \ 'performed on element entitled \\"${objectTitle}\\".' EMAIL_BODY = 'You can consult this element at ${objectUrl}.'