Example #1
0
 def _default_thing_wrapper(thing):
     w = Wrapped(thing)
     style = params.get('style', c.render_style)
     if isinstance(thing, Link):
         if thing.promoted is not None:
             w.render_class = PromotedLink
             w.rowstyle = 'promoted link'
         elif style == 'htmllite':
             w.score_fmt = Score.points
     return w
Example #2
0
 def _default_thing_wrapper(thing):
     w = Wrapped(thing)
     style = params.get('style', c.render_style)
     if isinstance(thing, Link):
         if thing.promoted is not None:
             w.render_class = PromotedLink
             w.rowstyle = 'promoted link'
         elif style == 'htmllite':
             w.score_fmt = Score.points
     return w
Example #3
0
 def _default_thing_wrapper(thing):
     w = Wrapped(thing)
     style = params.get("style", c.render_style)
     if isinstance(thing, Link):
         if thing.promoted:
             w.render_class = PromotedLink
             w.rowstyle = "promoted link"
         elif style == "htmllite":
             w.score_fmt = Score.points
     return w
    def builder_wrapper(thing):
        w = Wrapped(thing)

        if isinstance(thing, Link):
            if thing.promoted:
                w = Wrapped(thing)
                w.render_class = PromotedLink
                w.rowstyle = 'promoted link'

            elif c.user.pref_compress:
                w.render_class = LinkCompressed
                w.score_fmt = Score.points

        return w
Example #5
0
    def builder_wrapper(thing):
        w = Wrapped(thing)

        if isinstance(thing, Link):
            if thing.promoted:
                w = Wrapped(thing)
                w.render_class = PromotedLink
                w.rowstyle = 'promoted link'

            elif c.user.pref_compress:
                w.render_class = LinkCompressed
                w.score_fmt = Score.points

        return w
Example #6
0
def sponsor_wrapper(link):
    w = Wrapped(link)
    w.render_class = PromotedLink
    w.rowstyle = "promoted link"
    return w
Example #7
0
def sponsor_wrapper(link):
    w = Wrapped(link)
    w.render_class = PromotedLink
    w.rowstyle = "promoted link"
    return w