Mercurial > moin > 1.9
changeset 3347:9ceb503dd7a6
merged main
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Thu, 20 Mar 2008 15:21:23 +0100 |
parents | 38cbacf3cbc4 (current diff) 41e04736a9f1 (diff) |
children | 9d726e040fda 7707cd079690 |
files | |
diffstat | 3 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/action/info.py Wed Mar 19 18:58:45 2008 +0100 +++ b/MoinMoin/action/info.py Thu Mar 20 15:21:23 2008 +0100 @@ -104,30 +104,31 @@ # read in the complete log of this page log = editlog.EditLog(request, rootpagename=pagename) count = 0 + pgactioncount = 0 for line in log.reverse(): rev = int(line.rev) actions = [] if line.action in ('SAVE', 'SAVENEW', 'SAVE/REVERT', 'SAVE/RENAME', ): size = page.size(rev=rev) - if count == 0: # latest page - actions.append(render_action(_('view'), {'action': 'show'})) - else: - actions.append(render_action(_('view'), {'action': 'recall', 'rev': '%d' % rev})) - if count == 0: + actions.append(render_action(_('view'), {'action': 'recall', 'rev': '%d' % rev})) + if pgactioncount == 0: rchecked = ' checked="checked"' lchecked = '' - elif count == 1: + elif pgactioncount == 1: lchecked = ' checked="checked"' rchecked = '' else: lchecked = rchecked = '' diff = '<input type="radio" name="rev1" value="%d"%s><input type="radio" name="rev2" value="%d"%s>' % (rev, lchecked, rev, rchecked) + if rev > 1: + diff += render_action(' ' + _('to previous'), {'action': 'diff', 'rev1': rev-1, 'rev2': rev}) comment = line.comment if not comment: if '/REVERT' in line.action: comment = _("Revert to revision %(rev)d.") % {'rev': int(line.extra)} elif '/RENAME' in line.action: comment = _("Renamed from '%(oldpagename)s'.") % {'oldpagename': line.extra} + pgactioncount += 1 else: # ATT* rev = '-' diff = '-'
--- a/MoinMoin/theme/__init__.py Wed Mar 19 18:58:45 2008 +0100 +++ b/MoinMoin/theme/__init__.py Thu Mar 20 15:21:23 2008 +0100 @@ -1007,10 +1007,11 @@ 'rev_field': rev and '<input type="hidden" name="rev" value="%d">' % rev or '', 'do_button': _("Do"), 'baseurl': self.request.getScriptname(), - 'pagename_quoted': wikiutil.quoteWikinameURL(self.request.page.page_name) + 'pagename_quoted': wikiutil.quoteWikinameURL(self.request.page.page_name), + 'pageurl': self.request.page.url(self.request), } html = ''' -<form class="actionsmenu" method="POST" action=""> +<form class="actionsmenu" method="POST" action="%(pageurl)s"> <div> <label>%(label)s</label> <select name="action"
--- a/docs/CHANGES Wed Mar 19 18:58:45 2008 +0100 +++ b/docs/CHANGES Thu Mar 20 15:21:23 2008 +0100 @@ -99,6 +99,8 @@ max_count has a default of default_count and a upper limit of limit_max_count - you can configure both in your wiki config: cfg.history_count = (100, 200) # (default_count, limit_max_count) default + * csv parser can get the delimiter from the first line so other delimeters + than ";" could be used Other changes: * cfg.show_login is gone, see code in theme/__init__.py, this affects