annotate MoinMoin/action/CopyPage.py @ 1850:3d38db210672

action CopyPage added
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 03 Mar 2007 10:47:29 +0100
parents
children f486526720c5
rev   line source
1850
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
1 # -*- coding: iso-8859-1 -*-
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
2 """
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
3 MoinMoin - CopyPage action
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
4
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
5 This action allows you to copy a page.
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
6
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
7 @copyright: 2007 ReimarBauer
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
8 @license: GNU GPL, see COPYING for details.
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
9 """
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
10 import re
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
11 from MoinMoin import wikiutil
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
12 from MoinMoin.Page import Page
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
13 from MoinMoin.PageEditor import PageEditor
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
14 from MoinMoin.action import ActionBase
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
15
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
16 class CopyPage(ActionBase):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
17 """ Copy page action
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
18
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
19 Note: the action name is the class name
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
20 """
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
21 def __init__(self, pagename, request):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
22 ActionBase.__init__(self, pagename, request)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
23 self.use_ticket = True
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
24 _ = self._
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
25 self.form_trigger = 'copy'
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
26 self.form_trigger_label = _('Copy Page')
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
27 filterfn = re.compile(pagename).match
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
28 pages = request.rootpage.getPageList(user='', exists=1, filter=filterfn)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
29 self.subpages = []
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
30 self.users_subpages = []
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
31 subpage = pagename + '/'
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
32 for name in pages:
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
33 if name.startswith(subpage):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
34 self.subpages.append(name)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
35 if self.request.user.may.read(name):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
36 self.users_subpages.append(name)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
37
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
38 def is_allowed(self):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
39 may = self.request.user.may
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
40 return may.read(self.pagename)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
41
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
42 def check_condition(self):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
43 _ = self._
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
44 if not self.page.exists():
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
45 return _('This page is already deleted or was never created!')
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
46 else:
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
47 return None
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
48
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
49 def do_action(self):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
50 """ copy this page to "pagename" """
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
51 _ = self._
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
52 form = self.form
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
53 newpagename = form.get('newpagename', [u''])[0]
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
54 newpagename = self.request.normalizePagename(newpagename)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
55 comment = form.get('comment', [u''])[0]
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
56 comment = wikiutil.clean_comment(comment)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
57
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
58 self.page = PageEditor(self.request, self.pagename)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
59 success, msg = self.page.copyPage(newpagename, comment)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
60
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
61 copy_subpages = 0
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
62 if form.has_key('copy_subpages'):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
63 try:
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
64 copy_subpages = int(form['copy_subpages'][0])
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
65 except:
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
66 pass
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
67
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
68 if copy_subpages and self.subpages or (not self.users_subpages and self.subpages):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
69 for name in self.subpages:
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
70 self.page = PageEditor(self.request, name)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
71 new_subpagename = name.replace(self.pagename, newpagename, 1)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
72 success_i, msg = self.page.copyPage(new_subpagename, comment)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
73
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
74 self.newpagename = newpagename # keep there for finish
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
75 return success, msg
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
76
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
77 def do_action_finish(self, success):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
78 if success:
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
79 url = Page(self.request, self.newpagename).url(self.request, relative=False)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
80 self.request.http_redirect(url)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
81 self.request.finish()
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
82 else:
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
83 self.render_msg(self.make_form())
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
84
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
85 def get_form_html(self, buttons_html):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
86 _ = self._
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
87 if self.users_subpages:
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
88 subpages = ' '.join(self.users_subpages)
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
89
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
90 d = {
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
91 'subpage': subpages,
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
92 'subpages_checked':('', 'checked')[self.request.form.get('subpages_checked', ['0'])[0] == '1'],
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
93 'subpage_label': _('Copy all /subpages too?'),
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
94 'pagename': wikiutil.escape(self.pagename),
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
95 'newname_label': _("New name"),
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
96 'comment_label': _("Optional reason for the copying"),
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
97 'buttons_html': buttons_html,
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
98 'querytext': _('Really copy this page?')
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
99 }
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
100
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
101 return '''
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
102 <strong>%(querytext)s</strong>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
103 <br>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
104 <br>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
105 <table>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
106 <tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
107 <dd>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
108 %(subpage_label)s<input type="checkbox" name="copy_subpages" value="1" %(subpages_checked)s>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
109 </dd>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
110 <dd>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
111 <class="label"><subpage> %(subpage)s</subpage>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
112 </dd>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
113 </tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
114 </table>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
115 <table>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
116 <tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
117 <td class="label"><label>%(newname_label)s</label></td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
118 <td class="content">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
119 <input type="text" name="newpagename" value="%(pagename)s">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
120 </td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
121 </tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
122 <tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
123 <td class="label"><label>%(comment_label)s</label></td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
124 <td class="content">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
125 <input type="text" name="comment" maxlength="200">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
126 </td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
127 </tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
128 <tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
129 <td></td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
130 <td class="buttons">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
131 %(buttons_html)s
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
132 </td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
133 </tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
134 </table>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
135 ''' % d
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
136
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
137 else:
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
138 d = {
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
139 'pagename': wikiutil.escape(self.pagename),
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
140 'newname_label': _("New name"),
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
141 'comment_label': _("Optional reason for the copying"),
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
142 'buttons_html': buttons_html,
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
143 }
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
144 return '''
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
145 <table>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
146 <tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
147 <td class="label"><label>%(newname_label)s</label></td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
148 <td class="content">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
149 <input type="text" name="newpagename" value="%(pagename)s">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
150 </td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
151 </tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
152 <tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
153 <td class="label"><label>%(comment_label)s</label></td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
154 <td class="content">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
155 <input type="text" name="comment" maxlength="200">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
156 </td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
157 </tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
158 <tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
159 <td></td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
160 <td class="buttons">
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
161 %(buttons_html)s
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
162 </td>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
163 </tr>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
164 </table>
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
165 ''' % d
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
166
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
167 def execute(pagename, request):
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
168 """ Glue code for actions """
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
169 CopyPage(pagename, request).render()
3d38db210672 action CopyPage added
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
170