[MIN] Remove unused template
[cds-indico.git] / indico / MaKaC / plugins / Collaboration / Hermes / Site / Components.py
blob8a83e94c76835d9bd1641970dc6d8420b54b520d
1 import os
2 from os.path import dirname
3 import sys
5 from MaKaC.webinterface import wcomponents
6 import MaKaC.common.Configuration as Configuration
8 class WComponent(wcomponents.WTemplated):
9 def __init__(self, conf):
10 self.conf = conf
11 self.helpFile = ""
13 def _setTPLFile(self):
14 """Sets the TPL (template) file for the object. It will try to get
15 from the configuration if there's a special TPL file for it and
16 if not it will look for a file called as the class name+".tpl"
17 in the configured TPL directory.
18 """
19 cfg = Configuration.Config.getInstance()
20 dir = dirname(sys.modules[__name__].__file__)
21 file = cfg.getTPLFile(self.tplId)
22 if file == "":
23 file = "%s.tpl" % self.tplId
24 self.tplFile = os.path.join(dir, file)
26 class WCreate(WComponent):
27 pass
29 class WShow(WComponent):
30 def __init__(self, conf, booking):
31 WComponent.__init__(self, conf)
32 self.booking = booking