incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: [#6676] Added registration date to user profile
Date Wed, 30 Oct 2013 05:33:40 GMT
Updated Branches:
  refs/heads/master 74ee85253 -> 557761c53


[#6676] Added registration date to user profile

Signed-off-by: Cory Johns <cjohns@slashdotmedia.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/557761c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/557761c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/557761c5

Branch: refs/heads/master
Commit: 557761c53a140899cf88049fa171630851e597bb
Parents: 74ee852
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Thu Oct 24 16:57:17 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Wed Oct 30 05:33:12 2013 +0000

----------------------------------------------------------------------
 Allura/allura/ext/user_profile/templates/user_index.html | 4 ++++
 Allura/allura/ext/user_profile/user_main.py              | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/557761c5/Allura/allura/ext/user_profile/templates/user_index.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/templates/user_index.html b/Allura/allura/ext/user_profile/templates/user_index.html
index 014406d..54cae11 100644
--- a/Allura/allura/ext/user_profile/templates/user_index.html
+++ b/Allura/allura/ext/user_profile/templates/user_index.html
@@ -56,6 +56,10 @@
 
   <div class="grid-24">
     <div class="grid-24" style="margin:0;"><b>Personal data</b></div>
+    <div class="grid-24" style="margin:0;">
+      <div class="grid-4">Registration Date:</div>
+      <div class="grid-8">{{reg_date}}</div>
+    </div>
     {% if user.get_pref('sex') == 'Male' or user.get_pref('sex') == 'Female' %}
       <div class="grid-24" style="margin:0;">
         <div class="grid-4">Gender:</div>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/557761c5/Allura/allura/ext/user_profile/user_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/user_main.py b/Allura/allura/ext/user_profile/user_main.py
index 54baebf..6debee8 100644
--- a/Allura/allura/ext/user_profile/user_main.py
+++ b/Allura/allura/ext/user_profile/user_main.py
@@ -30,6 +30,7 @@ from allura.app import Application, SitemapEntry
 from allura.lib import helpers as h
 from allura.lib.helpers import DateTimeConverter
 from allura.lib.security import require_access
+from allura.lib.plugin import AuthenticationProvider
 from allura.model import User, Feed, ACE
 from allura.controllers import BaseController
 from allura.controllers.feed import FeedArgs, FeedController
@@ -90,7 +91,8 @@ class UserProfileController(BaseController, FeedController):
         user = c.project.user_project_of
         if not user:
             raise exc.HTTPNotFound()
-        return dict(user=user)
+        provider = AuthenticationProvider.get(request)
+        return dict(user=user, reg_date=provider.user_registration_date(user))
 
     def get_feed(self, project, app, user):
         """Return a :class:`allura.controllers.feed.FeedArgs` object describing


Mime
View raw message