Example #1
0
    def builder_wrapper(thing):
        if isinstance(thing, Comment):
            f = thing._fullname
            w = Wrapped(thing)
            w.render_class = Message
            w.to_id = c.user._id
            w.was_comment = True
            w._fullname = f
        else:
            w = ListingController.builder_wrapper(thing)

        return w
Example #2
0
    def builder_wrapper(thing):
        if isinstance(thing, Comment):
            f = thing._fullname
            w = Wrapped(thing)
            w.render_class = Message
            w.to_id = c.user._id
            w.was_comment = True
            w._fullname = f
        else:
            w = ListingController.builder_wrapper(thing)

        return w
Example #3
0
 def builder_wrapper(thing):
     if isinstance(thing, Comment):
         p = thing.make_permalink_slow()
         f = thing._fullname
         w = Wrapped(thing)
         w.render_class = Message
         w.to_id = c.user._id
         w.was_comment = True
         w.permalink, w._fullname = p, f
         return w
     else:
         return ListingController.builder_wrapper(thing)
Example #4
0
 def builder_wrapper(thing):
     if isinstance(thing, Comment):
         p = thing.make_permalink_slow()
         f = thing._fullname
         w = Wrapped(thing)
         w.render_class = Message
         w.to_id = c.user._id
         w.subject = _('Comment Reply')
         w.was_comment = True
         w.permalink, w._fullname = p, f
         return w
     else:
         return ListingController.builder_wrapper(thing)
Example #5
0
 def builder_wrapper(thing):
     if isinstance(thing, Comment):
         p = thing.permalink
         f = thing._fullname
         thing.__class__ = Message
         w = Wrapped(thing)
         w.to_id = c.user._id
         w.subject = 'comment reply'
         w.was_comment = True
         w.permalink, w._fullname = p, f
         return w
     else:
         return ListingController.builder_wrapper(thing)