summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Yves Chibon <pingou@pingoured.fr>2011-11-30 16:29:08 +0100
committerPierre-Yves Chibon <pingou@pingoured.fr>2011-11-30 16:29:08 +0100
commit4796cda746d2f640211d4bd964c2ce7855324d8e (patch)
treebe65002239170a8a0af199f0f5d0e35e78feac1d
parent68e3e162729105c4ad84b36a71d25b48ae8a2f5b (diff)
Add link to take a review
-rw-r--r--review-srv-tg2/review_srv/templates/sidebars.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/review-srv-tg2/review_srv/templates/sidebars.html b/review-srv-tg2/review_srv/templates/sidebars.html
index c1e876e..d99a899 100644
--- a/review-srv-tg2/review_srv/templates/sidebars.html
+++ b/review-srv-tg2/review_srv/templates/sidebars.html
@@ -10,7 +10,20 @@
<li>Summary: ${review.review_summary}</li>
<li>Reporter: <a href='${tg.url("/user/" + review.reporter.user_name)}'>
${review.reporter.user_name}</a></li>
- <li>Reviewer: <a href='${tg.url("/user/" + review.reviewer.user_name)}'>
+ <li py:if="request.identity and review.reviewer.user_name != ''">
+ Reviewer:
+ <a href='${tg.url("/user/" + review.reporter.user_name)}'>
+ ${review.reviewer.user_name}</a></li>
+ <li py:if="request.identity and review.reviewer.user_name == '' and
+ request.identity['user'].user_id != review.reporter.user_id">
+ ${review.reviewer.user_id} - ${review.reporter.user_id}
+ Reviewer:
+ <a href='${tg.url("/add_reporter/" + str(review.review_id))}'>
+ (take)</a></li>
+ <li py:if="request.identity['user'].user_id == review.reporter.user_id
+ or not request.identity ">
+ Reviewer:
+ <a href='${tg.url("/user/" + review.reviewer.user_name)}'>
${review.reviewer.user_name}</a></li>
<li>Status: ${review.status}</li>
<li>branches: ${", ".join([branch.branch_name for branch in review.branches])}</li>