allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [1/2] allura git commit: ticket:865 changed header on activity page for user; added link in /auth/preferences/ to user activities section
Date Fri, 04 Dec 2015 08:49:03 GMT
Repository: allura
Updated Branches:
  refs/heads/ib/7978a [created] 3c0d70a44


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/1d648d25
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/1d648d25
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/1d648d25

Branch: refs/heads/ib/7978a
Commit: 1d648d25d3308710a5ce03d9d3dfea8a0da786ad
Parents: 66a908f
Author: DeV1doR <dev1dor@ukr.net>
Authored: Wed Dec 2 13:46:01 2015 +0200
Committer: DeV1doR <dev1dor@ukr.net>
Committed: Fri Dec 4 09:38:15 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/1d648d25/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/1d648d25/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/1d648d25/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 %}


Mime
View raw message