You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/05/09 19:42:20 UTC
git commit: [#6182] ticket:338 show usernames on wiki history pages
Updated Branches:
refs/heads/master 5d046129c -> f3b0767c0
[#6182] ticket:338 show usernames on wiki history pages
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/f3b0767c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/f3b0767c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/f3b0767c
Branch: refs/heads/master
Commit: f3b0767c053db9383bf5d3ddd8ecf0da1b200ce8
Parents: 5d04612
Author: Yuriy Arhipov <yu...@yandex.ru>
Authored: Fri May 3 00:27:29 2013 +0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu May 9 17:42:11 2013 +0000
----------------------------------------------------------------------
ForgeWiki/forgewiki/templates/wiki/browse.html | 2 +-
.../forgewiki/templates/wiki/page_history.html | 2 +-
ForgeWiki/forgewiki/tests/functional/test_root.py | 12 ++++++++----
3 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f3b0767c/ForgeWiki/forgewiki/templates/wiki/browse.html
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/templates/wiki/browse.html b/ForgeWiki/forgewiki/templates/wiki/browse.html
index f6726cb..98fbdd0 100644
--- a/ForgeWiki/forgewiki/templates/wiki/browse.html
+++ b/ForgeWiki/forgewiki/templates/wiki/browse.html
@@ -43,7 +43,7 @@
<td><a href="{{page.url|safe}}">{{page['title']}}</a></td>
{% if 'user_label' in page %}
- <td>{{page['user_label']}}</td>
+ <td>{{page['user_label']}} ({{page['user_name']}})</td>
{% else %}
<td></td>
{% endif %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f3b0767c/ForgeWiki/forgewiki/templates/wiki/page_history.html
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/templates/wiki/page_history.html b/ForgeWiki/forgewiki/templates/wiki/page_history.html
index d0e3338..617b648 100644
--- a/ForgeWiki/forgewiki/templates/wiki/page_history.html
+++ b/ForgeWiki/forgewiki/templates/wiki/page_history.html
@@ -46,7 +46,7 @@
{% set i = 0 %}
{% for p in pages %}
<tr>
- <td>{{p.version}} by {{p.author.display_name}}</td>
+ <td>{{p.version}} by {{p.author.display_name}} ({{p.author.username}})</td>
<td>{{abbr_date(p.mod_date)}}</td>
<td><input name="v1" type="radio" value="{{p.version}}"/></td>
<td><input name="v2" type="radio" value="{{p.version}}"/></td>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f3b0767c/ForgeWiki/forgewiki/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/tests/functional/test_root.py b/ForgeWiki/forgewiki/tests/functional/test_root.py
index d928e70..49a39e8 100644
--- a/ForgeWiki/forgewiki/tests/functional/test_root.py
+++ b/ForgeWiki/forgewiki/tests/functional/test_root.py
@@ -216,15 +216,15 @@ class TestRootController(TestController):
response = self.app.get('/wiki/tést/history')
assert 'tést' in response
# two revisions are shown
- assert '2 by Test Admin' in response
- assert '1 by Test Admin' in response
+ assert '2 by Test Admin (test-admin)' in response
+ assert '1 by Test Admin (test-admin)' in response
# you can revert to an old revison, but not the current one
assert response.html.find('a',{'href':'./revert?version=1'})
assert not response.html.find('a',{'href':'./revert?version=2'})
response = self.app.get('/wiki/tést/history', extra_environ=dict(username='*anonymous'))
# two revisions are shown
- assert '2 by Test Admin' in response
- assert '1 by Test Admin' in response
+ assert '2 by Test Admin (test-admin)' in response
+ assert '1 by Test Admin (test-admin)' in response
# you cannot revert to any revision
assert not response.html.find('a',{'href':'./revert?version=1'})
assert not response.html.find('a',{'href':'./revert?version=2'})
@@ -616,3 +616,7 @@ class TestRootController(TestController):
assert 'notfound' not in link.get('class', '')
mailto_links += 1
assert mailto_links == 3, 'Wrong number of mailto links'
+
+ def test_user_browse_page(self):
+ r = self.app.get('/wiki/browse_pages/')
+ assert '<td>Test Admin (test-admin)</td>' in r