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 2013/11/27 18:31:06 UTC
[12/13] git commit: [#4723] Restore nobody in ticket header
[#4723] Restore nobody in ticket header
Also remove unnecessary kwargs in macro calls.
Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2a4914bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2a4914bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2a4914bb
Branch: refs/heads/master
Commit: 2a4914bba5077eb08a39addc55a2d0ff065bbf5f
Parents: 4b015dd
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Wed Nov 27 17:29:42 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Nov 27 17:30:27 2013 +0000
----------------------------------------------------------------------
Allura/allura/templates/jinja_master/lib.html | 2 +-
.../allura/templates/widgets/post_widget.html | 4 +--
.../allura/templates/widgets/thread_widget.html | 2 +-
.../allura/templates/widgets/threads_table.html | 34 ++++++++++----------
.../discussion_widgets/thread_header.html | 2 +-
.../templates/discussionforums/index.html | 2 +-
.../forgetracker/templates/tracker/ticket.html | 6 +++-
.../templates/tracker_widgets/ticket_form.html | 6 ++--
.../forgetracker/tests/functional/test_root.py | 2 +-
9 files changed, 32 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2a4914bb/Allura/allura/templates/jinja_master/lib.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/lib.html b/Allura/allura/templates/jinja_master/lib.html
index 94fa653..8f6ddf2 100644
--- a/Allura/allura/templates/jinja_master/lib.html
+++ b/Allura/allura/templates/jinja_master/lib.html
@@ -137,7 +137,7 @@
{% macro post_summary(post) %}
{% if post %}
<span>
- by {{user_link(post.author(), avatar=False)}}
+ by {{user_link(post.author())}}
{{abbr_date(post.timestamp)}}
</span>
{% endif %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2a4914bb/Allura/allura/templates/widgets/post_widget.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/post_widget.html b/Allura/allura/templates/widgets/post_widget.html
index 819796f..2aebd44 100644
--- a/Allura/allura/templates/widgets/post_widget.html
+++ b/Allura/allura/templates/widgets/post_widget.html
@@ -35,7 +35,7 @@
{% set size = value.parent and 32 or 48 %}
{{lib.gravatar(value.author(), size=size)}}<br>
<small>
- {{lib.user_link(value.author(), avatar=False)}}
+ {{lib.user_link(value.author())}}
</small>
<br>
<small>{{lib.abbr_date(value.timestamp)}}</small>
@@ -128,7 +128,7 @@
<p class="gravatar">
{{lib.gravatar(c.user, size=32)}}<br>
<small>
- {{lib.user_link(c.user, avatar=False)}}
+ {{lib.user_link(c.user)}}
</small>
</p>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2a4914bb/Allura/allura/templates/widgets/thread_widget.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/thread_widget.html b/Allura/allura/templates/widgets/thread_widget.html
index c60845f..863fd8f 100644
--- a/Allura/allura/templates/widgets/thread_widget.html
+++ b/Allura/allura/templates/widgets/thread_widget.html
@@ -57,7 +57,7 @@
<p class="gravatar">
{{lib.gravatar(c.user, size=48)}}<br>
<small>
- {{lib.user_link(c.user, avatar=False)}}
+ {{lib.user_link(c.user)}}
</small>
</p>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2a4914bb/Allura/allura/templates/widgets/threads_table.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/threads_table.html b/Allura/allura/templates/widgets/threads_table.html
index 7375d9b..301b93b 100644
--- a/Allura/allura/templates/widgets/threads_table.html
+++ b/Allura/allura/templates/widgets/threads_table.html
@@ -20,16 +20,16 @@
<div{{ {'id': div_id}|xmlattr }}>
<table class="forum-list clear">
- <thead>
- <tr>
- <th><span class="ico ico-mail" title="Subscriptions" data-icon="M"></span></th>
- <th class="topic">Topic</th>
- <th>Posts</th>
- <th>Views</th>
- <th>Last Post</th>
- </tr>
- </thead>
- <tbody class="forum-list">
+ <thead>
+ <tr>
+ <th><span class="ico ico-mail" title="Subscriptions" data-icon="M"></span></th>
+ <th class="topic">Topic</th>
+ <th>Posts</th>
+ <th>Views</th>
+ <th>Last Post</th>
+ </tr>
+ </thead>
+ <tbody class="forum-list">
{% for thread in value %}
<tr>
<td>
@@ -51,10 +51,10 @@
<a href="{{thread.url()}}" class="btn ico"><b data-icon="{{g.icons['pin'].char}}" class="ico {{g.icons['pin'].css}}"></b> <span>Sticky</span></a>
{% endif %}
<h3><a href="{{thread.url()}}">{{thread.subject and h.text.truncate(thread.subject, 72) or '(no subject)'}}</a></h3>
- <span>By {{lib.user_link(author, avatar=False)}}</span> on {{thread.first_post.timestamp.strftime('%a %b %d, %Y %I:%M %p')}}
- </td>
+ <span>By {{lib.user_link(author)}}</span> on {{thread.first_post.timestamp.strftime('%a %b %d, %Y %I:%M %p')}}
+ </td>
{% endif %}
- <td>{{thread.num_replies}}</td>
+ <td>{{thread.num_replies}}</td>
<td>{{thread.num_views}}</td>
{% if not thread.last_post %}
<td> </td>
@@ -62,13 +62,13 @@
{% set author = thread.last_post.author() %}
<td>
<p class="gravatar sm">
- By {{lib.gravatar(author, size=16)}} {{lib.user_link(author, avatar=False)}}<br />on {{thread.last_post.timestamp.strftime('%a %b %d, %Y %I:%M %p')}}
+ By {{lib.gravatar(author, size=16)}} {{lib.user_link(author)}}<br />on {{thread.last_post.timestamp.strftime('%a %b %d, %Y %I:%M %p')}}
</p>
- </td>
+ </td>
{% endif %}
- </tr>
+ </tr>
{% endfor %}
- </tbody>
+ </tbody>
</table>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2a4914bb/ForgeDiscussion/forgediscussion/templates/discussion_widgets/thread_header.html
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/templates/discussion_widgets/thread_header.html b/ForgeDiscussion/forgediscussion/templates/discussion_widgets/thread_header.html
index ee7a161..9a988df 100644
--- a/ForgeDiscussion/forgediscussion/templates/discussion_widgets/thread_header.html
+++ b/ForgeDiscussion/forgediscussion/templates/discussion_widgets/thread_header.html
@@ -20,7 +20,7 @@
<div class="grid-5"><label>Forum:</label> <a href="{{value.discussion.url()}}">{{value.discussion.name}}</a></div>
{% if value.first_post %}
- <div class="grid-5"><label>Creator:</label> {{lib.user_link(value.first_post.author(), avatar=False)}}</div>
+ <div class="grid-5"><label>Creator:</label> {{lib.user_link(value.first_post.author())}}</div>
<div class="grid-4"><label>Created:</label> {{lib.abbr_date(value.first_post.timestamp)}}</div>
{% endif %}
<div class="grid-5"><label>Updated:</label> {{lib.abbr_date(value.mod_date)}}</div>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2a4914bb/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html b/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
index 2f207ed..941975a 100644
--- a/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
+++ b/ForgeDiscussion/forgediscussion/templates/discussionforums/index.html
@@ -62,7 +62,7 @@
<td>
{% if forum.last_post %}
<a href="{{forum.last_post.url_paginated()}}">{{h.text.truncate(h.really_unicode(forum.last_post.subject or '(no subject)'),75)}}</a><br>
- by {{lib.user_link(forum.last_post.author(), avatar=False)}}<br>
+ by {{lib.user_link(forum.last_post.author())}}<br>
{{h.ago(forum.last_post.mod_date)}}
{% else %}
No posts yet
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2a4914bb/ForgeTracker/forgetracker/templates/tracker/ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/ticket.html b/ForgeTracker/forgetracker/templates/tracker/ticket.html
index 1659e82..508c2c6 100644
--- a/ForgeTracker/forgetracker/templates/tracker/ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/ticket.html
@@ -105,7 +105,11 @@
<label class="simple">{{field.label}}:</label>
{% if field.type == 'user' %}
{% set user = ticket.get_custom_user(field.name) %}
- {{lib.user_link(user, avatar=False)}}
+ {% if user and not user.is_anonymous() %}
+ {{lib.user_link(user, avatar=False)}}
+ {% else %}
+ nobody
+ {% endif %}
{% elif field.type == 'milestone' %}
<a href="{{c.app.url}}{{field.name[1:]}}/{{ticket.custom_fields[field.name]}}">{{ticket.custom_fields[field.name]}}</a>
{% else %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2a4914bb/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
index b60cc35..8676159 100644
--- a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
+++ b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
@@ -51,7 +51,7 @@
</div>
<div class="grid-6">
{{widget.display_field_by_name('private')}}
- </div>
+ </div>
<div style="clear:both"> </div>
<div class="grid-6">
<label class="simple">Updated:</label>
@@ -74,7 +74,7 @@
{% if ticket %}
<a href="{{ticket.reported_by.url()}}">{{ticket.reported_by.display_name}}</a>
{% else %}
- {{lib.user_link(c.user, avatar=False)}}
+ {{lib.user_link(c.user)}}
{% endif %}
</div>
<div style="clear:both"> </div>
@@ -113,7 +113,7 @@
<p class="gravatar">
{{lib.gravatar(c.user, size=48)}}<br>
<small>
- {{lib.user_link(c.user, avatar=False)}}
+ {{lib.user_link(c.user)}}
</small>
</p>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2a4914bb/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 757eb71..5a8fc15 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -2384,7 +2384,7 @@ class TestCustomUserField(TrackerTestController):
ticket_view = self.new_ticket(summary='test custom fields', **kw).follow()
# summary header shows 'nobody'
assert ticket_view.html.findAll('label', 'simple',
- text='Code Review:')[1].parent.parent.text == 'Code Review:'
+ text='Code Review:')[1].parent.parent.text == 'Code Review:nobody'
# form input is blank
select = ticket_view.html.find('select',
dict(name='ticket_form.custom_fields._code_review'))