103 w(u'</fieldset>\n</form>\n') |
103 w(u'</fieldset>\n</form>\n') |
104 |
104 |
105 def display_bookmark_link(self, rset): |
105 def display_bookmark_link(self, rset): |
106 eschema = self._cw.vreg.schema.eschema('Bookmark') |
106 eschema = self._cw.vreg.schema.eschema('Bookmark') |
107 if eschema.has_perm(self._cw, 'add'): |
107 if eschema.has_perm(self._cw, 'add'): |
108 bk_path = 'view?rql=%s' % rset.printable_rql() |
108 bk_path = 'rql=%s' % self._cw.url_quote(rset.printable_rql()) |
|
109 if self._cw.form.get('vid'): |
|
110 bk_path += '&vid=%s' % self._cw.url_quote(self._cw.form['vid']) |
|
111 bk_path = 'view?' + bk_path |
109 bk_title = self._cw._('my custom search') |
112 bk_title = self._cw._('my custom search') |
110 linkto = 'bookmarked_by:%s:subject' % self._cw.user.eid |
113 linkto = 'bookmarked_by:%s:subject' % self._cw.user.eid |
111 bk_add_url = self._cw.build_url('add/Bookmark', path=bk_path, title=bk_title, __linkto=linkto) |
114 bk_add_url = self._cw.build_url('add/Bookmark', path=bk_path, title=bk_title, __linkto=linkto) |
112 bk_base_url = self._cw.build_url('add/Bookmark', title=bk_title, __linkto=linkto) |
115 bk_base_url = self._cw.build_url('add/Bookmark', title=bk_title, __linkto=linkto) |
113 bk_link = u'<a cubicweb:target="%s" id="facetBkLink" href="%s">%s</a>' % ( |
116 bk_link = u'<a cubicweb:target="%s" id="facetBkLink" href="%s">%s</a>' % ( |