Merge branch 'master' of ssh://bitbucket.org/yackob03/quay

This commit is contained in:
yackob03 2013-10-02 13:30:52 -04:00
commit ac80f1a123
3 changed files with 12 additions and 3 deletions

View file

@ -97,6 +97,9 @@ def get_token(code):
def get_visible_repositories(username=None, include_public=True, limit=None, sort=False):
if not username and not include_public:
return []
query = Repository.select().distinct().join(Visibility)
or_clauses = []
if include_public:
@ -112,7 +115,9 @@ def get_visible_repositories(username=None, include_public=True, limit=None, sor
with_images = query.switch(Repository).join(Image, JOIN_LEFT_OUTER)
query = with_images.order_by(Image.created.desc())
query = query.where(reduce(operator.or_, or_clauses))
if (or_clauses):
query = query.where(reduce(operator.or_, or_clauses))
if limit:
query = query.limit(limit)

View file

@ -80,7 +80,11 @@ function HeaderCtrl($scope, UserService) {
function GuideCtrl($scope, Restangular) {
}
function RepoListCtrl($scope, Restangular) {
function RepoListCtrl($scope, Restangular, UserService) {
$scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) {
$scope.user = currentUser;
}, true);
$scope.getCommentFirstLine = function(commentString) {
return getMarkedDown(getFirstTextLine(commentString));
};

View file

@ -3,7 +3,7 @@
</div>
<div class="container" ng-show="!loading">
<div class="repo-list">
<div class="repo-list" ng-show="!user.anonymous">
<h3>Your Repositories</h3>
<div ng-show="private_repositories.length > 0">
<div class="repo-listing" ng-repeat="repository in private_repositories">