Example #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
Example #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
Example #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
Example #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
Example #5
0
 def __init__(self, env):
     DefaultTaggingSystem.__init__(self, env, 'wiki')
Example #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, )
Example #7
0
 def __init__(self, env):
     DefaultTaggingSystem.__init__(self, env, 'wiki')
Example #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,)
Example #9
0
 def __init__(self, env, component, req):
     self.component = component
     self.req = req
     DefaultTaggingSystem.__init__(self, env, 'screenshots')
Example #10
0
 def __init__(self, env):
     DefaultTaggingSystem.__init__(self, env, 'downloads')
Example #11
0
 def __init__(self, env, component, req):
     self.component = component
     self.req = req
     DefaultTaggingSystem.__init__(self, env, 'screenshots')
Example #12
0
 def __init__(self, env):
     DefaultTaggingSystem.__init__(self, env, 'downloads')