Ejemplo n.º 1
0
def commenturl(context):
	"""Generate the URL for the current comment."""
	if comments.com_stash_var not in context:
		return ''
	c = context[comments.com_stash_var]
	url = context.uri(context.page, context.comment_view())
	url += '#%s' % comments.anchor_for(c)
	return url
Ejemplo n.º 2
0
def commenturl(context):
    """Generate the URL for the current comment."""
    if comments.com_stash_var not in context:
        return ''
    c = context[comments.com_stash_var]
    url = context.uri(context.page, context.comment_view())
    url += '#%s' % comments.anchor_for(c)
    return url
Ejemplo n.º 3
0
	def _cominfo(ppath, cname):
		npage = rend.mod.get_page(ppath)
		c = rend.mod.get_comment(npage, cname)
		if not c:
			return (None, None, None)
		url = rend.ctx.url(npage, view)
		ca = comments.anchor_for(c)
		url += '#%s' % ca
		return (c, npage, url, ca)
Ejemplo n.º 4
0
 def _cominfo(ppath, cname):
     npage = rend.mod.get_page(ppath)
     c = rend.mod.get_comment(npage, cname)
     if not c:
         return (None, None, None)
     url = rend.ctx.url(npage, view)
     ca = comments.anchor_for(c)
     url += '#%s' % ca
     return (c, npage, url, ca)