update backoffice_help_url

This commit is contained in:
Thomas NOËL 2012-10-29 14:27:29 +01:00
parent 54a05fc551
commit e42e9e2bb2
1 changed files with 2 additions and 38 deletions

View File

@ -723,7 +723,7 @@ class AlternateRootDirectory(OldRootDirectory):
('announces', 'announces_dir'),
'accessibility', 'contact', 'help',
'myspace', 'services', 'agenda',
'themes', 'pages', 'payment', 'invoices', 'accesscode']
'themes', 'pages', 'payment', 'invoices', 'trackingcode']
admin = admin.AdminRootDirectory()
announces_dir = AnnouncesDirectory()
@ -989,13 +989,6 @@ class AlternateRootDirectory(OldRootDirectory):
'<div id="sidebox">'
root_url = get_publisher().get_root_url()
if self.has_anonymous_access_codes():
'<form id="follow-form" action="%saccesscode">' % root_url
'<h3>%s</h3>' % _('Tracking')
'<label>%s</label> ' % _('Code:')
'<input name="code" size="10"/>'
'</form>'
self.links()
cats = Category.select(order_by = 'name')
@ -1029,35 +1022,6 @@ class AlternateRootDirectory(OldRootDirectory):
'</div>'
def has_anonymous_access_codes(self):
for workflow in Workflow.select():
for wfstatus in workflow.possible_status:
for wfitem in wfstatus.items:
if wfitem.key == 'create-anonymous-access-code':
return True
return False
def accesscode(self):
code = get_request().form.get('code')
if not code:
return redirect(get_publisher().get_root_url())
try:
token = Token.get(code)
except KeyError:
return redirect(get_publisher().get_root_url())
if token.type != 'anonymous-access-code':
return redirect(get_publisher().get_root_url())
formdef_urlname, formdata_id = token.formdata_reference
try:
formdata = FormDef.get_by_urlname(formdef_urlname).data_class().get(formdata_id)
except KeyError:
return redirect(get_publisher().get_root_url())
session = get_session()
if not hasattr(session, '_wf_anonymous_access_authorized'):
session._wf_anonymous_access_authorized = []
session._wf_anonymous_access_authorized.append(formdata.get_url())
return redirect(formdata.get_url() + 'access/')
def links [html] (self):
links = Link.select()
if not links:
@ -1163,7 +1127,7 @@ get_publisher_class().use_sms_feature = True
# help links
get_publisher_class().backoffice_help_url = {
'fr': 'http://auquotidien.labs.libre-entreprise.org/doc/fr/manager-guide.html',
'fr': 'http://doc.entrouvert.org/au-quotidien/stable/guide-gestionnaire.html'
}
get_publisher_class().admin_help_url = {
'fr': 'http://auquotidien.labs.libre-entreprise.org/doc/fr/user-guide.html',