Skip to content
Snippets Groups Projects
Commit 10e012a60087 authored by sylvain thenault's avatar sylvain thenault
Browse files

use new request method

parent cd8d4a6091ec
No related branches found
Tags cubicweb-comment-version-1_4_0
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
from cubicweb.view import EntityView from cubicweb.view import EntityView
from cubicweb.common.uilib import rql_for_eid, cut, safe_cut from cubicweb.common.uilib import rql_for_eid, cut, safe_cut
from cubicweb.common.mixins import TreeViewMixIn from cubicweb.common.mixins import TreeViewMixIn
from cubicweb.web import ajax_replace_url, stdmsgs, uicfg from cubicweb.web import stdmsgs, uicfg
from cubicweb.web.action import LinkToEntityAction, Action from cubicweb.web.action import LinkToEntityAction, Action
from cubicweb.web.form import FormViewMixIn from cubicweb.web.form import FormViewMixIn
from cubicweb.web.formwidgets import Button from cubicweb.web.formwidgets import Button
...@@ -109,10 +109,11 @@ ...@@ -109,10 +109,11 @@
if action is None: if action is None:
reply = u'' reply = u''
else: else:
url = ajax_replace_url('comment%sHolder' % entity.eid, url = self.req.build_ajax_replace_url(
rql_for_eid(entity.eid), 'inlinecomment') 'comment%sHolder' % entity.eid, rql_for_eid(entity.eid),
'inlinecomment')
reply = ' | <a href="%s">%s</a>' % (html_escape(url), reply = ' | <a href="%s">%s</a>' % (html_escape(url),
_(action.title)) _(action.title))
if editaction is None: if editaction is None:
edit = u'' edit = u''
else: else:
...@@ -114,10 +115,11 @@ ...@@ -114,10 +115,11 @@
reply = ' | <a href="%s">%s</a>' % (html_escape(url), reply = ' | <a href="%s">%s</a>' % (html_escape(url),
_(action.title)) _(action.title))
if editaction is None: if editaction is None:
edit = u'' edit = u''
else: else:
url = ajax_replace_url('comment%s' % entity.eid, url = self.req.build_ajax_replace_url(
rql_for_eid(entity.eid), 'editcomment') 'comment%s' % entity.eid, rql_for_eid(entity.eid),
'editcomment')
edit = ' | <a href="%s">%s</a>' % (html_escape(url), edit = ' | <a href="%s">%s</a>' % (html_escape(url),
_(editaction.title)) _(editaction.title))
text = entity.printable_value('content') text = entity.printable_value('content')
...@@ -217,8 +219,8 @@ ...@@ -217,8 +219,8 @@
self.div_id(), self.div_class(), eid)) self.div_id(), self.div_class(), eid))
action = self.vreg.select_action('reply_comment', req, self.rset, row=0) action = self.vreg.select_action('reply_comment', req, self.rset, row=0)
if action is not None: if action is not None:
url = ajax_replace_url('comment%sHolder' % eid, rql_for_eid(eid), url = self.req.build_ajax_replace_url(
'inlinecomment') 'comment%sHolder' % eid, rql_for_eid(eid), 'inlinecomment')
reply = u' (<a href="%s">%s</a>)' % (url, req._(action.title)) reply = u' (<a href="%s">%s</a>)' % (url, req._(action.title))
if req.use_fckeditor() and req.property_value('ui.default-text-format') == 'text/html': if req.use_fckeditor() and req.property_value('ui.default-text-format') == 'text/html':
req.fckeditor_config() req.fckeditor_config()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment