Changeset 1150
- Timestamp:
- 01/15/08 14:02:46 (4 years ago)
- Location:
- Branches/wljohnston/starting_ie/TurtolCMS
- Files:
-
- 3 modified
-
ConfigProcs.py (modified) (2 diffs)
-
Core/__init__.py (modified) (2 diffs)
-
TcmsApiRoutines.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Branches/wljohnston/starting_ie/TurtolCMS/ConfigProcs.py
r1026 r1150 195 195 if theme != "NoTheme": 196 196 theme = "/tcms/themes/%s" % theme 197 198 #dynamically set copyright date 199 import datetime 200 currentYear = datetime.date.today().year 197 201 198 202 cmds = [ ('Libraries' … … 346 350 (2, 'en', '<h3>Navigation</h3>\n<ul><li><a href="/">Home Page</a></li><li><a href="http://turtolcms.org">TurtolCMS Project</a></li></li></ul>\n'), 347 351 (3, 'en', '<h3>Help</h3>\n<p>Instructions and tutorials in the use of the TurtolCMS can be found at the <a href="http://turtolcms.org">TurtolCMS project site</a>.</p><p>Hosting for the TurtolCMS can be provided by (who else?) <a href="http://www.turtol.com/">Turtol.</a><br></p>'), 348 (4, 'en', '<span class="copyright">TurtolCMS copyright 2006by Turtol, LLC.</span>'),352 (4, 'en', '<span class="copyright">TurtolCMS copyright %s by Turtol, LLC.</span>'), 349 353 (5, 'en', '<h1>TurtolCMS</h1>'), 350 354 (6, 'en', '<h1>Page Not Found</h1>\n<p>We are Sorry, but the requested page could not be found on our server. Please make sure the requeseted URL is correct</p>'), 351 (7, 'en', '<style type="text/css">\n.error{\n color: red;\n }\n</style>\n<h1>Forbidden</h1>\n<p class="error">We are sorry but you do not have permission to view the contents of this page.<br />Please log in and try again</p><br /><br />\n<p>Click<a href="/"> here to go to the HOME page</a></p>') ''' )]355 (7, 'en', '<style type="text/css">\n.error{\n color: red;\n }\n</style>\n<h1>Forbidden</h1>\n<p class="error">We are sorry but you do not have permission to view the contents of this page.<br />Please log in and try again</p><br /><br />\n<p>Click<a href="/"> here to go to the HOME page</a></p>') ''' % (currentYear))] 352 356 353 357 #FIXME: USE AN IMAGE THAT DOESN'T HAVE A WHITE BACK GROUND TO WORK BETTER WITH THEMES -
Branches/wljohnston/starting_ie/TurtolCMS/Core/__init__.py
r1136 r1150 272 272 #query for widgets with the same name on this page (including templates) 273 273 from TurtolCMS.TcmsApiRoutines import _GetLayers 274 existingNameWidgets = "" 275 if self.id == "0": 276 sql = '''select id from tcms_widgets where name=%''' + '''s and page_id in (%s)''' \ 277 % ','.join([str(i[0]) for i in _GetLayers(context, pageid)]) 278 else: 279 sql = '''select id from tcms_widgets where name=%''' + '''s and page_id in (%s) and id<>%s''' \ 280 % (','.join([str(i[0]) for i in _GetLayers(context, pageid)]), self.id) 281 context.Log("SQL %s" % sql) 282 existingNameWidgets = context.ExecuteSQL(sql, name) 283 if existingNameWidgets: 274 extraSql = "" 275 if self.id != "0": 276 extraSql = '''and id<> %s''' % (self.id) 277 sql = '''select id from tcms_widgets where name=%''' + '''s and page_id in (%s) %s''' \ 278 % (','.join([str(i[0]) for i in _GetLayers(context, pageid)]), extraSql) 279 if context.ExecuteSQL(sql, name): 284 280 context.Write("Please enter a unique Widget Name") 285 281 err = "Duplicate Widget Name" … … 744 740 name = name.rstrip("/") 745 741 #validate that name is not already in use 746 if self._id == "0":747 existingPages = ctx.ExecuteSQL('''SELECT name FROM tcms_pages WHERE name="%s"''' %(name))748 else:749 existingPages = ctx.ExecuteSQL('''SELECT name FROM tcms_pages WHERE name="%s" and id<>"%s"''' % (name, self._id))750 if existingPages:742 sql = '''SELECT name FROM tcms_pages WHERE name="%s"''' % name 743 #alter sql if editing 744 if self._id != "0": 745 sql = "%s%s" % (sql, '''and id <>"%s"''' % self._id) 746 if ctx.ExecuteSQL(sql): 751 747 if self._pagetype == "roottemplate" or self._pagetype == "template": 752 748 ctx.Write("Please enter a unique Template Name") -
Branches/wljohnston/starting_ie/TurtolCMS/TcmsApiRoutines.py
r1066 r1150 416 416 self._noFfMessage="" 417 417 if userAgent.lower().find("firefox") < 0: 418 self._noFfMessage = ''' The TurtolCMS editor has currently been tested only with the <a href="http://www.getfirefox.net" id='fflink'>Firefox</a> web browser. Using other browsers may lead to unexpected results.'''418 self._noFfMessage = '''It is currently recommended to use the TurtolCMS editor with the <a href="http://www.getfirefox.net" id='fflink'>Firefox</a> web browser.''' 419 419 self.Write (''' 420 420 <div id="tcms_login">