Discussion
-
Rui Ferreira
2014-10-29Ok, try this http://osp-staging.aws.atnog.av.it.pt/ and see if it works as intended. The redirect bits happens in the first file, the other is just fixes to get the user's real name
diff --git a/opensourceprojects/controllers.py b/opensourceprojects/controllers.py index 6ac82ba..fecc289 100644 --- a/opensourceprojects/controllers.py +++ b/opensourceprojects/controllers.py @@ -338,6 +338,8 @@ class RootController(AlluraRootController): @expose('jinja:opensourceprojects:templates/frontpage.html') @with_trailing_slash def index(self, **kw): + if c.user != c.user.anonymous(): + redirect(c.user.script_name) return dict(form=OSPRegistrationForm(submit_text='Sign Up now!', action='/auth/save_new')) diff --git a/opensourceprojects/templates/jinja_master/theme_macros.html b/opensourceprojects/templates/jinja_master/theme_macros.html index 40e68fd..a6dd2ba 100644 --- a/opensourceprojects/templates/jinja_master/theme_macros.html +++ b/opensourceprojects/templates/jinja_master/theme_macros.html @@ -13,13 +13,13 @@ <li class="main-nav-item user-nav"> <a href="{{c.user.url()}}" class="user-nav-button"> {% if c.user.icon_url() %} - <img src="{{c.user.icon_url()}}" alt="Avatar of {{c.user.display_name()}}" class="user-avatar"></a> + <img src="{{c.user.icon_url()}}" alt="Avatar of {{c.user.get_display_name()}}" class="user-avatar"></a> {% else %} <img src="{{c.user.icon_url()}}" alt="Avatar of {{c.user.get_display_name()}}" class="user-avatar"></a> {% endif %} <ul> - <li class="user-nav-name">{{c.user.display_name()}}</li> + <li class="user-nav-name">{{c.user.display_name}}</li> <li class="user-nav-link"><a href="{{c.user.url()}}">View profile</a></li> <li class="user-nav-link"><a href="/auth/prefs/">Manage account</a></li> <li class="user-nav-logout"><a href="{{logout_url}}">Log out</a></li>
You might want to consider removing the alt= from the user's avatar or get the default icon working, the text is overflowing.
-
brn
2014-10-29Couldn't test at http://osp-staging.aws.atnog.av.it.pt/ (is there a login for testing?), but made the changes locally and it wored fine! :) Thanks!
You're welcome to push future changes into the branch, though!
-
brn
2014-10-29- status: open --> closed
-
brn
2014-10-29Fix worked.