Attachment 'solenoid_iso-191.py.patch'
Download 1 133a134,165
2 > _showApproveLink = None
3 > def approved(self, d):
4 > page = d['page']
5 >
6 > # check whether page exists at all
7 > if not page.exists():
8 > return ""
9 >
10 > # check whether or not to display the "Approve" action link
11 > if page.get_real_rev() == page.getRevList()[0]:
12 > self._showApproveLink = True
13 > else:
14 > self._showApproveLink = False
15 >
16 > # return the page's approval status
17 > return page.getApprovalMessage()
18 >
19 >
20 > def approveLink(self, page):
21 > """ Return approve link to valid users
22 >
23 > @rtype: unicode
24 > @return: approve link
25 > """
26 > _ = self.request.getText
27 >
28 > #if user has perms
29 > title = _("Approve")
30 > quotedname = wikiutil.quoteWikinameURL(page.page_name)
31 > return page.link_to(self.request, text=_('Approve', formatted=False), querystr='action=ApprovePage')
32 >
33 >
34 254a287
35 > self.approved(d),
36 282c315
37 < return u'<span id="pagelocation">%s: %s</span>' % (_('Page Name'), page_path)
38 ---
39 > return u'<span id="pagelocation">%s: %s</span> <br> %s' % (_('Page Name'), page_path, self.approved(d))
40 346a380,382
41 > if (self._showApproveLink == True) and (self.request.user.may.approve(page.page_name)):
42 > result.append(self.approveLink(page))
43 >
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.