Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80752091
yourbaskets.py.wml
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Sep 2, 10:19
Size
2 KB
Mime Type
text/x-c
Expires
Wed, Sep 4, 10:19 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20434523
Attached To
R3600 invenio-infoscience
yourbaskets.py.wml
View Options
## $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"
<protect>## $Id$ </protect>
<protect>## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES.</protect>
"""Web Baskets features."""
## fill config variables:
pylibdir = "<LIBDIR>/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 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),
"""> <a class="navtrail" href="%s/youraccount.py/display">Your Account</a> >""" % weburl,
"", "CDS Personalize, Display baskets", "CDS, personalize", create_user_infobox(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),
"""> <a class="navtrail" href="%s/youraccount.py/display">Your Account</a> >""" % weburl,
"", "CDS Personalize, Display baskets", "CDS, personalize", create_user_infobox(uid), "")
Event Timeline
Log In to Comment