You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2014/02/20 23:20:06 UTC
[3/3] git commit: [#5176] ticket:538 show date in Merge request pages
[#5176] ticket:538 show date in Merge request 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/28265bb3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/28265bb3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/28265bb3
Branch: refs/heads/master
Commit: 28265bb329ffa6488957612ff74af45cd6c7b9bb
Parents: 7536bf0
Author: Yuriy Arhipov <yu...@yandex.ru>
Authored: Mon Feb 10 14:19:36 2014 +0400
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Feb 20 22:19:28 2014 +0000
----------------------------------------------------------------------
Allura/allura/templates/repo/merge_request.html | 6 ++++++
Allura/allura/templates/repo/merge_requests.html | 4 ++++
ForgeGit/forgegit/tests/functional/test_controllers.py | 3 +++
3 files changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/28265bb3/Allura/allura/templates/repo/merge_request.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/merge_request.html b/Allura/allura/templates/repo/merge_request.html
index 9c1da9f..7d8aec3 100644
--- a/Allura/allura/templates/repo/merge_request.html
+++ b/Allura/allura/templates/repo/merge_request.html
@@ -42,6 +42,12 @@ Merge Request #{{req.request_number}}: {{req.summary}} ({{req.status}})
<div>{{g.markdown.convert(req.description)}}</div>
{{ c.log_widget.display(value=req.commits, app=downstream_app) }}
+ <p>
+ Created: {{lib.abbr_date(req.created)}}
+ <br style="clear:both">
+ Updated: {{lib.abbr_date(req.mod_date)}}
+ </p>
+
<div class="grid-19"><a href="#discussion_holder">Discuss</a></div>
{% if h.has_access(c.app, 'write')() %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/28265bb3/Allura/allura/templates/repo/merge_requests.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/merge_requests.html b/Allura/allura/templates/repo/merge_requests.html
index 1b70881..b1d83c6 100644
--- a/Allura/allura/templates/repo/merge_requests.html
+++ b/Allura/allura/templates/repo/merge_requests.html
@@ -40,6 +40,8 @@
<th>Summary</th>
<th>Repository</th>
<th>Creator</th>
+ <th>Created</th>
+ <th>Updated</th>
</tr>
</thead>
<tbody>
@@ -54,6 +56,8 @@
<i>(deleted)</i>
{% endif %}</td>
<td><a href="{{req.creator_url}}">{{req.creator_name}}</a></td>
+ <td>{{lib.abbr_date(req.created)}}</td>
+ <td>{{lib.abbr_date(req.mod_date)}}</td>
</tr>
{% endfor %}
</tbody>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/28265bb3/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 282c773..99ea99e 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -536,6 +536,7 @@ class TestFork(_TestCase):
assert 'git checkout master' in merge_instructions
assert 'git fetch git://git.localhost/p/test2/code master' in merge_instructions
assert 'git merge {}'.format(c_id) in merge_instructions
+ assert_equal(r.html.findAll('p')[2].getText(), 'Created:less than 1 minute agoUpdated:less than 1 minute ago')
def test_merge_request_with_deleted_repo(self):
self._request_merge()
@@ -555,6 +556,8 @@ class TestFork(_TestCase):
r, mr_num = self._request_merge()
r = self.app.get('/p/test/src-git/merge-requests/')
assert 'href="%s/"' % mr_num in r, r
+ assert_equal(r.html.findAll('span')[8].getText(), 'less than 1 minute ago')
+ assert_equal(r.html.findAll('span')[9].getText(), 'less than 1 minute ago')
def test_merge_request_update_status(self):
r, mr_num = self._request_merge()