You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/12/02 13:41:10 UTC
allura git commit: ticket:865 changed header on activity page for
user; added link in /auth/preferences/ to user activities section
Repository: allura
Updated Branches:
refs/heads/ib/7978 [created] fc8885c92
ticket:865 changed header on activity page for user; added link in /auth/preferences/ to user activities section
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/fc8885c9
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/fc8885c9
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/fc8885c9
Branch: refs/heads/ib/7978
Commit: fc8885c92ce5f488a01190e19ab21045f8127d98
Parents: 74cabfd
Author: DeV1doR <de...@ukr.net>
Authored: Wed Dec 2 13:46:01 2015 +0200
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Wed Dec 2 14:36:04 2015 +0200
----------------------------------------------------------------------
Allura/allura/templates/user_prefs.html | 1 +
ForgeActivity/forgeactivity/main.py | 10 +++++++++-
ForgeActivity/forgeactivity/templates/index.html | 7 +------
3 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/fc8885c9/Allura/allura/templates/user_prefs.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/user_prefs.html b/Allura/allura/templates/user_prefs.html
index bd593ab..74d5c08 100644
--- a/Allura/allura/templates/user_prefs.html
+++ b/Allura/allura/templates/user_prefs.html
@@ -32,6 +32,7 @@
<fieldset class="preferences">
<legend>Username: {{ c.user.username }}</legend>
<p><a href="{{ c.user.private_project().url() }}">My profile and my projects</a></p>
+ <p><a href="{{ c.user.url() }}activity/">Activity I follow</a></p>
<p><a href="{{ c.user.private_project().url() }}admin/overview">Set avatar icon</a></p>
{% if h.asbool(tg.config.get('auth.allow_user_to_disable_account', False)) %}
<p><a href="/auth/disable">Disable account</a></p>
http://git-wip-us.apache.org/repos/asf/allura/blob/fc8885c9/ForgeActivity/forgeactivity/main.py
----------------------------------------------------------------------
diff --git a/ForgeActivity/forgeactivity/main.py b/ForgeActivity/forgeactivity/main.py
index d51b0e2..186528b 100644
--- a/ForgeActivity/forgeactivity/main.py
+++ b/ForgeActivity/forgeactivity/main.py
@@ -126,13 +126,21 @@ class ForgeActivityController(BaseController):
else:
# if we did ask for extra, check filtered result
has_more = len(filtered_timeline) == limit
+
+ if c.project.is_user_project:
+ header_text = 'Activity %s follows' % \
+ c.project.user_project_of.display_name
+ else:
+ header_text = 'Activity for %s' % c.project.name
+
return dict(
followee=followee,
following=following,
timeline=filtered_timeline,
page=page,
limit=limit,
- has_more=has_more)
+ has_more=has_more,
+ header_text=header_text)
@expose('jinja:forgeactivity:templates/index.html')
@with_trailing_slash
http://git-wip-us.apache.org/repos/asf/allura/blob/fc8885c9/ForgeActivity/forgeactivity/templates/index.html
----------------------------------------------------------------------
diff --git a/ForgeActivity/forgeactivity/templates/index.html b/ForgeActivity/forgeactivity/templates/index.html
index c4a57a0..3f38a2f 100644
--- a/ForgeActivity/forgeactivity/templates/index.html
+++ b/ForgeActivity/forgeactivity/templates/index.html
@@ -23,12 +23,7 @@
{% block title %}{{c.project.name}} Activity{% endblock %}
{% block header %}
- Activity for
- {% if c.project.is_user_project %}
- {{c.project.user_project_of.display_name}}
- {% else %}
- {{c.project.name}}
- {% endif %}
+ {{header_text}}
{% endblock %}
{% block actions %}