Exemplo n.º 1
0
    def name_details(self, name):
        # Get cursor.
        db = self.env.get_db_cnx()
        cursor = db.cursor()

        # Get tagged screenshots.
        api = self.env[ScreenshotsApi]
        screenshot = api.get_screenshot(cursor, name)

        # Return a tuple of (href, wikilink, title)
        defaults = DefaultTaggingSystem.name_details(self, name)
        if screenshot:
            return (defaults[0], wiki_to_oneliner('[screenshot:%s %s]' %
              (screenshot['id'], screenshot['name']), self.env),
              screenshot['description'])
        else:
            return defaults
Exemplo n.º 2
0
    def name_details(self, name):
        # Get cursor.
        db = self.env.get_db_cnx()
        cursor = db.cursor()

        # Get tagged screenshots.
        api = self.env[ScreenshotsApi]
        screenshot = api.get_screenshot(cursor, name)

        # Return a tuple of (href, wikilink, title)
        defaults = DefaultTaggingSystem.name_details(self, name)
        if screenshot:
            return (defaults[0],
                    wiki_to_oneliner(
                        '[screenshot:%s %s]' %
                        (screenshot['id'], screenshot['name']),
                        self.env), screenshot['description'])
        else:
            return defaults
Exemplo n.º 3
0
    def name_details(self, name):
        # Get cursor.
        db = self.env.get_db_cnx()
        cursor = db.cursor()

        # Get API object.
        api = self.env[DownloadsApi]

        # Get tagged download.
        download = api.get_download(cursor, name)

        # Return a tuple of (href, wikilink, title)
        defaults = DefaultTaggingSystem.name_details(self, name)
        if download:
            return (defaults[0], html.a(download['file'], href =
              self.env.href.downloads(download['id']), title =
              download['description']), download['description'])
        else:
            return defaults
Exemplo n.º 4
0
    def name_details(self, name):
        # Get cursor.
        db = self.env.get_db_cnx()
        cursor = db.cursor()

        # Get API object.
        api = self.env[DownloadsApi]

        # Get tagged download.
        download = api.get_download(cursor, name)

        # Return a tuple of (href, wikilink, title)
        defaults = DefaultTaggingSystem.name_details(self, name)
        if download:
            return (defaults[0],
                    html.a(download['file'],
                           href=self.env.href.downloads(download['id']),
                           title=download['description']),
                    download['description'])
        else:
            return defaults
Exemplo n.º 5
0
 def __init__(self, env):
     DefaultTaggingSystem.__init__(self, env, 'wiki')
Exemplo n.º 6
0
 def name_details(self, name):
     """ Return a tuple of (href, wikilink, title). eg. ("/ticket/1", "#1", "Broken links") """
     page, title = self.page_info(name)
     href = self.env.href.wiki(name)
     defaults = DefaultTaggingSystem.name_details(self, name)
     return defaults[0:2] + (title, )
Exemplo n.º 7
0
 def __init__(self, env):
     DefaultTaggingSystem.__init__(self, env, 'wiki')
Exemplo n.º 8
0
 def name_details(self, name):
     """ Return a tuple of (href, wikilink, title). eg. ("/ticket/1", "#1", "Broken links") """
     page, title = self.page_info(name)
     href = self.env.href.wiki(name)
     defaults = DefaultTaggingSystem.name_details(self, name)
     return defaults[0:2] + (title,)
Exemplo n.º 9
0
 def __init__(self, env, component, req):
     self.component = component
     self.req = req
     DefaultTaggingSystem.__init__(self, env, 'screenshots')
Exemplo n.º 10
0
 def __init__(self, env):
     DefaultTaggingSystem.__init__(self, env, 'downloads')
Exemplo n.º 11
0
 def __init__(self, env, component, req):
     self.component = component
     self.req = req
     DefaultTaggingSystem.__init__(self, env, 'screenshots')
Exemplo n.º 12
0
 def __init__(self, env):
     DefaultTaggingSystem.__init__(self, env, 'downloads')