forked from ScoDoc/ScoDoc
Removed more Zope archaeological remains
This commit is contained in:
parent
d6b6ab3ea7
commit
9b9ed47e96
20
ZAbsences.py
20
ZAbsences.py
@ -697,6 +697,7 @@ class ZAbsences(
|
||||
return int(self.get_preference("work_saturday"))
|
||||
|
||||
security.declareProtected(ScoView, "day_names")
|
||||
|
||||
def day_names(self):
|
||||
"""Returns week day names.
|
||||
If work_saturday property is set, include saturday
|
||||
@ -1993,22 +1994,3 @@ ou entrez une date pour visualiser les absents un jour donné :
|
||||
doc._pop()
|
||||
log("XMLgetAbsEtud (%gs)" % (time.time() - t0))
|
||||
return repr(doc)
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
#
|
||||
# Zope Product Administration
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
def manage_addZAbsences(
|
||||
self, id="id_ZAbsences", title="The Title for ZAbsences Object", REQUEST=None
|
||||
):
|
||||
"Add a ZAbsences instance to a folder."
|
||||
self._setObject(id, ZAbsences(id, title))
|
||||
if REQUEST is not None:
|
||||
return self.manage_main(self, REQUEST)
|
||||
# return self.manage_editForm(self, REQUEST)
|
||||
|
||||
|
||||
# The form used to get the instance id from the user.
|
||||
# manage_addZAbsencesForm = DTMLFile('dtml/manage_addZAbsencesForm', globals())
|
||||
|
@ -251,20 +251,6 @@ class ZEntreprises(
|
||||
self.id = id
|
||||
self.title = title
|
||||
|
||||
# The form used to edit this object
|
||||
# def manage_editZEntreprises(self, title, RESPONSE=None):
|
||||
# "Changes the instance values"
|
||||
# self.title = title
|
||||
# self._p_changed = 1
|
||||
# RESPONSE.redirect("manage_editForm")
|
||||
|
||||
# Ajout (dans l'instance) d'un dtml modifiable par Zope
|
||||
def defaultDocFile(self, id, title, file):
|
||||
f = open(file_path + "/dtml-editable/" + file + ".dtml")
|
||||
file = f.read()
|
||||
f.close()
|
||||
self.manage_addDTMLMethod(id, title, file)
|
||||
|
||||
security.declareProtected(ScoEntrepriseView, "entreprise_header")
|
||||
|
||||
def entreprise_header(self, REQUEST=None, page_title=""):
|
||||
@ -1648,18 +1634,3 @@ class ZEntreprises(
|
||||
else:
|
||||
self.do_entreprise_edit(tf[2])
|
||||
return REQUEST.RESPONSE.redirect(REQUEST.URL1 + "?start=" + start)
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
#
|
||||
# Zope Product Administration
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
def manage_addZEntreprises(
|
||||
self, id="id_ZEntreprises", title="The Title for ZEntreprises Object", REQUEST=None
|
||||
):
|
||||
"Add a ZEntreprises instance to a folder."
|
||||
self._setObject(id, ZEntreprises(id, title))
|
||||
if REQUEST is not None:
|
||||
return self.manage_main(self, REQUEST)
|
||||
# return self.manage_editForm(self, REQUEST)
|
||||
|
19
ZNotes.py
19
ZNotes.py
@ -3631,22 +3631,3 @@ class ZNotes(ObjectManager, PropertyManager, RoleManager, Item, Persistent, Impl
|
||||
)
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
#
|
||||
# Zope Product Administration
|
||||
#
|
||||
# --------------------------------------------------------------------
|
||||
def manage_addZNotes(
|
||||
self, id="id_ZNotes", title="The Title for ZNotes Object", REQUEST=None
|
||||
):
|
||||
"Add a ZNotes instance to a folder."
|
||||
self._setObject(id, ZNotes(id, title))
|
||||
if REQUEST is not None:
|
||||
return self.manage_main(self, REQUEST)
|
||||
# return self.manage_editForm(self, REQUEST)
|
||||
|
||||
|
||||
# The form used to get the instance id from the user.
|
||||
manage_addZNotesForm = DTMLFile("dtml/manage_addZNotesForm", globals())
|
||||
|
@ -77,13 +77,7 @@ class ZScoDoc(ObjectManager, PropertyManager, RoleManager, Item, Persistent, Imp
|
||||
manage_options = (
|
||||
({"label": "Contents", "action": "manage_main"},)
|
||||
+ PropertyManager.manage_options # add the 'Properties' tab
|
||||
+ (
|
||||
# this line is kept as an example with the files :
|
||||
# dtml/manage_editZScolarForm.dtml
|
||||
# html/ZScolar-edit.stx
|
||||
# {'label': 'Properties', 'action': 'manage_editForm',},
|
||||
{"label": "View", "action": "index_html"},
|
||||
)
|
||||
+ ({"label": "View", "action": "index_html"},)
|
||||
+ Item.manage_options # add the 'Undo' & 'Owner' tab
|
||||
+ RoleManager.manage_options # add the 'Security' tab
|
||||
)
|
||||
|
14
ZScoUsers.py
14
ZScoUsers.py
@ -105,20 +105,6 @@ class ZScoUsers(
|
||||
self.id = id
|
||||
self.title = title
|
||||
|
||||
# The form used to edit this object
|
||||
# def manage_editZScousers(self, title, RESPONSE=None):
|
||||
# "Changes the instance values"
|
||||
# self.title = title
|
||||
# self._p_changed = 1
|
||||
# RESPONSE.redirect("manage_editForm")
|
||||
|
||||
# Ajout (dans l'instance) d'un dtml modifiable par Zope
|
||||
def defaultDocFile(self, id, title, file):
|
||||
f = open(file_path + "/dtml-editable/" + file + ".dtml")
|
||||
file = f.read()
|
||||
f.close()
|
||||
self.manage_addDTMLMethod(id, title, file)
|
||||
|
||||
# Connexion to SQL database of users:
|
||||
|
||||
# Ugly but necessary during transition out of Zope:
|
||||
|
18
ZScolar.py
18
ZScolar.py
@ -133,13 +133,7 @@ class ZScolar(ObjectManager, PropertyManager, RoleManager, Item, Persistent, Imp
|
||||
manage_options = (
|
||||
({"label": "Contents", "action": "manage_main"},)
|
||||
+ PropertyManager.manage_options # add the 'Properties' tab
|
||||
+ (
|
||||
# this line is kept as an example with the files :
|
||||
# dtml/manage_editZScolarForm.dtml
|
||||
# html/ZScolar-edit.stx
|
||||
# {'label': 'Properties', 'action': 'manage_editForm',},
|
||||
{"label": "View", "action": "index_html"},
|
||||
)
|
||||
+ ({"label": "View", "action": "index_html"},)
|
||||
+ Item.manage_options # add the 'Undo' & 'Owner' tab
|
||||
+ RoleManager.manage_options # add the 'Security' tab
|
||||
)
|
||||
@ -152,17 +146,7 @@ class ZScolar(ObjectManager, PropertyManager, RoleManager, Item, Persistent, Imp
|
||||
self.title = title
|
||||
self._db_cnx_string = db_cnx_string
|
||||
self._cnx = None
|
||||
# --- add editable DTML documents:
|
||||
# self.defaultDocFile('sidebar_dept',
|
||||
# 'barre gauche (partie haute)',
|
||||
# 'sidebar_dept')
|
||||
|
||||
# --- add DB connector
|
||||
# id = 'DB'
|
||||
# da = ZopeDA.Connection(
|
||||
# id, 'DB connector', db_cnx_string, False,
|
||||
# check=1, tilevel=2, encoding='utf-8')
|
||||
# self._setObject(id, da)
|
||||
# --- add Scousers instance
|
||||
id = "Users"
|
||||
obj = ZScoUsers.ZScoUsers(id, "Gestion utilisateurs zope")
|
||||
|
18
__init__.py
18
__init__.py
@ -27,8 +27,6 @@
|
||||
|
||||
from ZScolar import ZScolar, manage_addZScolarForm, manage_addZScolar
|
||||
|
||||
# from ZNotes import ZNotes, manage_addZNotesForm, manage_addZNotes
|
||||
|
||||
from ZScoDoc import ZScoDoc, manage_addZScoDoc
|
||||
|
||||
# from sco_zope import *
|
||||
@ -53,23 +51,7 @@ def initialize(context):
|
||||
icon="static/icons/sco_icon.png",
|
||||
)
|
||||
|
||||
# context.registerHelp()
|
||||
# context.registerHelpTitle("ZScolar")
|
||||
|
||||
# --- ZScoDoc
|
||||
context.registerClass(
|
||||
ZScoDoc, constructors=(manage_addZScoDoc,), icon="static/icons/sco_icon.png"
|
||||
)
|
||||
|
||||
# --- ZNotes
|
||||
# context.registerClass(
|
||||
# ZNotes,
|
||||
# constructors = (
|
||||
# manage_addZNotesForm,
|
||||
# manage_addZNotes
|
||||
# ),
|
||||
# icon = 'static/icons/notes_icon.png'
|
||||
# )
|
||||
|
||||
# context.registerHelp()
|
||||
# context.registerHelpTitle("ZNotes")
|
||||
|
Loading…
Reference in New Issue
Block a user