web.pluginmanager.plugins.navigator

Package web :: Package pluginmanager :: Package plugins :: Package navigator |
[hide private]
[frames] | no frames]

# Source Code for Package web.pluginmanager.plugins.navigator

     1  from ..pluginbase import PluginBase
     2
     3  import web
     4  import db
     5
     6  from gettext import gettext as _
     7
     8 -class Plugin(PluginBase):
     9 -    def __init__(self):
    10          PluginBase.__init__(self)
    11          self.folder_name = 'computer'
    12          self.name = _('Computer')
    13          self.description = _('Surf on the network')
    14          self.image = 'images/computer.png'
    15
    16      #def GET(self, path):
    17      #    orm = web.ctx.orm
    18      #    ou = db.OrganizativeUnit
    19      #    if path:
    20      #        units = orm.query(ou).filter(ou.parent.name == path[-1])
    21      #        computers = orm.query(db.Computer).filter(
    22      #                db.Computer.parent.name == path[-1])
    23      #        for i in computers:
    24      #            print i.name
    25      #    else:
    26      #        units = orm.query(ou).filter(ou.parent == None)
    27
    28      #    for i in units:
    29      #        print i.name
    30
    31
    32      #def button(self):
    33      #    render = web.template.render('templates')
    34      #    return render.button(self.folder_name, self.image, self.name, self.description)
    35
    36      #def options(self):
    37      #    return web.form.Form(
    38      #            web.form.Textbox('des', description='Descripcion')
    39      #            )
    40
    41      #def save_options(self, values):
    42      #    print values.des
    43