Merge branch 'master' of ssh://bitbucket.org/yackob03/quay
This commit is contained in:
commit
ac80f1a123
3 changed files with 12 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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));
|
||||
};
|
||||
|
|
|
@ -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">
|
||||
|
|
Reference in a new issue