diff --git a/modules/webbasket/web/yourbaskets.py b/modules/webbasket/web/yourbaskets.py index f1aa1d24f..f9d0d7614 100644 --- a/modules/webbasket/web/yourbaskets.py +++ b/modules/webbasket/web/yourbaskets.py @@ -1,82 +1,91 @@ ## $Id$ ## Personal features - your baskets. ## This file is part of the CERN Document Server Software (CDSware). ## Copyright (C) 2002 CERN. ## ## The CDSware is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## The CDSware is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDSware; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## read config variables: #include "config.wml" #include "configbis.wml" ## $Id$ ## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES. """Web Baskets features.""" ## fill config variables: pylibdir = "/python" try: import sys import time import zlib import urllib sys.path.append('%s' % pylibdir) from cdsware.config import * from cdsware.webpage import page from cdsware import webbasket webbasket = reload( webbasket ) from cdsware.dbquery import run_sql - from cdsware.webuser import getUid, create_user_infobox + from cdsware.webuser import getUid from mod_python import apache except ImportError, e: print "Error: %s" % e import sys sys.exit(1) imagesurl = "%s/img" % webdir ## rest of the Python code goes below ### CALLABLE INTERFACE def index(req): req.err_headers_out.add("Location", "%s/yourbaskets.py/display?%s" % (weburl, req.args)) raise apache.SERVER_RETURN, apache.HTTP_MOVED_PERMANENTLY def display(req, action="", title="Your Baskets", delete_alerts="", confirm_action="", id_basket=0, bname="", newname="", newbname="", mark=[], to_basket="", copy_move="", idup="", ordup="", iddown="", orddown=""): uid = getUid(req) if action=="DELETE": title="Delete basket" - return page(title, webbasket.perform_display(uid, action, delete_alerts, confirm_action, id_basket, bname, newname, newbname, mark, to_basket, copy_move, idup, ordup, iddown, orddown), - """> Your Account >""" % weburl, - "", "CDS Personalize, Display baskets", "CDS, personalize", create_user_infobox(uid), "") + return page(title=title, + body=webbasket.perform_display(uid, action, delete_alerts, confirm_action, id_basket, bname, newname, newbname, mark, to_basket, copy_move, idup, ordup, iddown, orddown), + navtrail="""Your Account""" % weburl, + description="CDS Personalize, Display baskets", + keywords="CDS, personalize", + uid=uid) def display_public(req, id_basket=0, name="", action="", to_basket="", mark=[], newname=""): title = "Display basket" uid = getUid(req) - return page(title, webbasket.perform_display_public(uid, id_basket, name, action, to_basket, mark, newname), - """> Your Account >""" % weburl, - "", "CDS Personalize, Display baskets", "CDS, personalize", create_user_infobox(uid), "") + return page(title=title, + body=webbasket.perform_display_public(uid, id_basket, name, action, to_basket, mark, newname), + navtrail="""Your Account""" % weburl, + description="CDS Personalize, Display baskets", + keywords="CDS, personalize", + uid=uid) def add(req, recid=[], bid=[], bname=[]): """Add records to basket. If bid isn't set, it'll ask user into which baskets to add them. If bname is set, it'll create new basket with this name, and add records there rather than to bid.""" title = "Adding records to baskets" uid = getUid(req) - return page(title, webbasket.perform_request_add(uid, recid, bid, bname), - """> Your Account > Your Baskets >""" % (weburl, weburl), - "", "CDS Personalize, Add records to basket", "CDS, personalize", create_user_infobox(uid), "") + return page(title=title, + body=webbasket.perform_request_add(uid, recid, bid, bname), + navtrail="""Your Account > Your Baskets""" % (weburl, weburl), + description="CDS Personalize, Add records to basket", + keywords="CDS, personalize", + uid=uid) diff --git a/modules/webbasket/web/yourbaskets.py.wml b/modules/webbasket/web/yourbaskets.py.wml index f1aa1d24f..f9d0d7614 100644 --- a/modules/webbasket/web/yourbaskets.py.wml +++ b/modules/webbasket/web/yourbaskets.py.wml @@ -1,82 +1,91 @@ ## $Id$ ## Personal features - your baskets. ## This file is part of the CERN Document Server Software (CDSware). ## Copyright (C) 2002 CERN. ## ## The CDSware is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## The CDSware is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDSware; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## read config variables: #include "config.wml" #include "configbis.wml" ## $Id$ ## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES. """Web Baskets features.""" ## fill config variables: pylibdir = "/python" try: import sys import time import zlib import urllib sys.path.append('%s' % pylibdir) from cdsware.config import * from cdsware.webpage import page from cdsware import webbasket webbasket = reload( webbasket ) from cdsware.dbquery import run_sql - from cdsware.webuser import getUid, create_user_infobox + from cdsware.webuser import getUid from mod_python import apache except ImportError, e: print "Error: %s" % e import sys sys.exit(1) imagesurl = "%s/img" % webdir ## rest of the Python code goes below ### CALLABLE INTERFACE def index(req): req.err_headers_out.add("Location", "%s/yourbaskets.py/display?%s" % (weburl, req.args)) raise apache.SERVER_RETURN, apache.HTTP_MOVED_PERMANENTLY def display(req, action="", title="Your Baskets", delete_alerts="", confirm_action="", id_basket=0, bname="", newname="", newbname="", mark=[], to_basket="", copy_move="", idup="", ordup="", iddown="", orddown=""): uid = getUid(req) if action=="DELETE": title="Delete basket" - return page(title, webbasket.perform_display(uid, action, delete_alerts, confirm_action, id_basket, bname, newname, newbname, mark, to_basket, copy_move, idup, ordup, iddown, orddown), - """> Your Account >""" % weburl, - "", "CDS Personalize, Display baskets", "CDS, personalize", create_user_infobox(uid), "") + return page(title=title, + body=webbasket.perform_display(uid, action, delete_alerts, confirm_action, id_basket, bname, newname, newbname, mark, to_basket, copy_move, idup, ordup, iddown, orddown), + navtrail="""Your Account""" % weburl, + description="CDS Personalize, Display baskets", + keywords="CDS, personalize", + uid=uid) def display_public(req, id_basket=0, name="", action="", to_basket="", mark=[], newname=""): title = "Display basket" uid = getUid(req) - return page(title, webbasket.perform_display_public(uid, id_basket, name, action, to_basket, mark, newname), - """> Your Account >""" % weburl, - "", "CDS Personalize, Display baskets", "CDS, personalize", create_user_infobox(uid), "") + return page(title=title, + body=webbasket.perform_display_public(uid, id_basket, name, action, to_basket, mark, newname), + navtrail="""Your Account""" % weburl, + description="CDS Personalize, Display baskets", + keywords="CDS, personalize", + uid=uid) def add(req, recid=[], bid=[], bname=[]): """Add records to basket. If bid isn't set, it'll ask user into which baskets to add them. If bname is set, it'll create new basket with this name, and add records there rather than to bid.""" title = "Adding records to baskets" uid = getUid(req) - return page(title, webbasket.perform_request_add(uid, recid, bid, bname), - """> Your Account > Your Baskets >""" % (weburl, weburl), - "", "CDS Personalize, Add records to basket", "CDS, personalize", create_user_infobox(uid), "") + return page(title=title, + body=webbasket.perform_request_add(uid, recid, bid, bname), + navtrail="""Your Account > Your Baskets""" % (weburl, weburl), + description="CDS Personalize, Add records to basket", + keywords="CDS, personalize", + uid=uid)