incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#6676] Added registration date to user profile
Date Thu, 24 Oct 2013 16:57:30 GMT
Updated Branches:
  refs/heads/cj/6676 [created] 4132e33f2


[#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/4132e33f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4132e33f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4132e33f

Branch: refs/heads/cj/6676
Commit: 4132e33f261701e36c00f609d6c5b581732da23c
Parents: 1d55431
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Thu Oct 24 16:57:17 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu Oct 24 16:57:17 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/4132e33f/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/4132e33f/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