diff --git a/rhodecode/controllers/admin/gists.py b/rhodecode/controllers/admin/gists.py --- a/rhodecode/controllers/admin/gists.py +++ b/rhodecode/controllers/admin/gists.py @@ -66,12 +66,18 @@ class GistsController(BaseController): """GET /admin/gists: All items in the collection""" # url('gists') c.show_private = request.GET.get('private') and c.rhodecode_user.username != 'default' + c.show_public = request.GET.get('public') and c.rhodecode_user.username != 'default' + gists = Gist().query()\ .filter(or_(Gist.gist_expires == -1, Gist.gist_expires >= time.time()))\ .order_by(Gist.created_on.desc()) if c.show_private: c.gists = gists.filter(Gist.gist_type == Gist.GIST_PRIVATE)\ .filter(Gist.gist_owner == c.rhodecode_user.user_id) + elif c.show_public: + c.gists = gists.filter(Gist.gist_type == Gist.GIST_PUBLIC)\ + .filter(Gist.gist_owner == c.rhodecode_user.user_id) + else: c.gists = gists.filter(Gist.gist_type == Gist.GIST_PUBLIC) p = safe_int(request.GET.get('page', 1), 1) diff --git a/rhodecode/templates/admin/gists/index.html b/rhodecode/templates/admin/gists/index.html --- a/rhodecode/templates/admin/gists/index.html +++ b/rhodecode/templates/admin/gists/index.html @@ -8,6 +8,8 @@ <%def name="breadcrumbs_links()"> %if c.show_private: ${_('Private Gists for user %s') % c.rhodecode_user.username} + %elif c.show_public: + ${_('Public Gists for user %s') % c.rhodecode_user.username} %else: ${_('Public Gists')} %endif diff --git a/rhodecode/templates/base/base.html b/rhodecode/templates/base/base.html --- a/rhodecode/templates/base/base.html +++ b/rhodecode/templates/base/base.html @@ -292,8 +292,9 @@