diff --git a/rhodecode/config/routing.py b/rhodecode/config/routing.py --- a/rhodecode/config/routing.py +++ b/rhodecode/config/routing.py @@ -347,6 +347,8 @@ def make_map(config): m.connect('api', '/api') #USER JOURNAL + rmap.connect('journal_my_repos', '%s/journal_my_repos' % ADMIN_PREFIX, + controller='journal', action='index_my_repos') rmap.connect('journal', '%s/journal' % ADMIN_PREFIX, controller='journal', action='index') rmap.connect('journal_rss', '%s/journal/rss' % ADMIN_PREFIX, diff --git a/rhodecode/controllers/journal.py b/rhodecode/controllers/journal.py --- a/rhodecode/controllers/journal.py +++ b/rhodecode/controllers/journal.py @@ -61,11 +61,6 @@ class JournalController(BaseController): p = safe_int(request.params.get('page', 1), 1) c.user = User.get(self.rhodecode_user.user_id) - all_repos = self.sa.query(Repository)\ - .filter(Repository.user_id == c.user.user_id)\ - .order_by(func.lower(Repository.repo_name)).all() - - c.user_repos = ScmModel().get_repos(all_repos) c.following = self.sa.query(UserFollowing)\ .filter(UserFollowing.user_id == self.rhodecode_user.user_id)\ @@ -83,6 +78,16 @@ class JournalController(BaseController): return c.journal_data return render('journal/journal.html') + @LoginRequired() + @NotAnonymous() + def index_my_repos(self): + if request.environ.get('HTTP_X_PARTIAL_XHR'): + all_repos = self.sa.query(Repository)\ + .filter(Repository.user_id == c.user.user_id)\ + .order_by(func.lower(Repository.repo_name)).all() + c.user_repos = ScmModel().get_repos(all_repos) + return render('journal/journal_page_repos.html') + @LoginRequired(api_access=True) @NotAnonymous() def journal_atom(self): diff --git a/rhodecode/templates/admin/users/user_edit_my_account.html b/rhodecode/templates/admin/users/user_edit_my_account.html --- a/rhodecode/templates/admin/users/user_edit_my_account.html +++ b/rhodecode/templates/admin/users/user_edit_my_account.html @@ -135,7 +135,7 @@ var show_my = function(e){ YUD.setStyle('q_filter','display',''); - var url = "${h.url('admin_settings_my_repos')}"; + var url = "${h.url('journal_my_repos')}"; ypjax(url, 'my', function(){ table_sort(); filter_activate(); @@ -171,7 +171,6 @@ var url = location.href.split('#'); if (url[1]) { //We have a hash var tabHash = url[1]; - console.log(tabs, tabHash) tabs[tabHash](); } diff --git a/rhodecode/templates/journal/journal.html b/rhodecode/templates/journal/journal.html --- a/rhodecode/templates/journal/journal.html +++ b/rhodecode/templates/journal/journal.html @@ -38,7 +38,7 @@