From d52d2b85652df7af73c71a8e3eb54585c6c902b2 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 9 Jul 2021 13:21:34 +0200 Subject: [PATCH] =?UTF-8?q?d=C3=A9sactive=20module=20Entreprises?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/html_sidebar.py | 9 +++++---- app/views/entreprises.py | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) mode change 100644 => 100755 app/views/entreprises.py diff --git a/app/scodoc/html_sidebar.py b/app/scodoc/html_sidebar.py index bcd4facea2..a411ed1062 100644 --- a/app/scodoc/html_sidebar.py +++ b/app/scodoc/html_sidebar.py @@ -184,8 +184,9 @@ def sidebar_dept(context, REQUEST=None): '%(DeptIntranetTitle)s
' % infos ) - H.append( - """
Entreprises
""" - % infos - ) + # Entreprises pas encore supporté en ScoDoc8 + # H.append( + # """
Entreprises
""" + # % infos + # ) return "\n".join(H) diff --git a/app/views/entreprises.py b/app/views/entreprises.py old mode 100644 new mode 100755 index 04225376fb..a1ed584043 --- a/app/views/entreprises.py +++ b/app/views/entreprises.py @@ -32,7 +32,8 @@ Note: Code très ancien, porté de Zope/DTML, peu utilisable => Voir si des départements utilisent encore ce module et envisager de le supprimer. """ -import urllib +from __future__ import absolute_import +import six.moves.urllib.request, six.moves.urllib.parse, six.moves.urllib.error import string import re import time @@ -96,7 +97,7 @@ def sidebar(context, REQUEST): ) # --- entreprise selectionnée: - if REQUEST.form.has_key("entreprise_id"): + if "entreprise_id" in REQUEST.form: entreprise_id = REQUEST.form["entreprise_id"] E = sco_entreprises.do_entreprise_list( context, args={"entreprise_id": entreprise_id} @@ -178,14 +179,14 @@ def index_html( if offset: webparams["offset"] = max((offset or 0) - limit, 0) prev_lnk = 'précédentes' % ( - REQUEST.URL0 + "?" + urllib.urlencode(webparams) + REQUEST.URL0 + "?" + six.moves.urllib.parse.urlencode(webparams) ) else: prev_lnk = "" if len(entreprises) >= limit: webparams["offset"] = (offset or 0) + limit next_lnk = 'suivantes' % ( - REQUEST.URL0 + "?" + urllib.urlencode(webparams) + REQUEST.URL0 + "?" + six.moves.urllib.parse.urlencode(webparams) ) else: next_lnk = ""