diff --git a/endpoints/web.py b/endpoints/web.py index 6596a52ba..9f8712629 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -58,6 +58,11 @@ def guide(): return index('') +@app.route('/organizations/') +@app.route('/organizations/new/') +def organizations(): + return index('') + @app.route('/user/') def user(): return index('') diff --git a/static/css/quay.css b/static/css/quay.css index cb71fc79a..5671c1109 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -950,6 +950,20 @@ p.editable:hover i { margin-bottom: 40px; } +.repo-list .button-bar-right { + float: right; +} + +.repo-list .section-header { + padding: 10px; + border-bottom: 1px solid #eee; + margin-bottom: 10px; +} + +.repo-list .button-bar-right button { + margin-right: 10px; +} + .repo-listing { display: block; margin-bottom: 20px; @@ -1579,6 +1593,24 @@ p.editable:hover i { display: inline-block; } +.org-list h2 { + margin-bottom: 20px; +} + +.org-list .button-bar-right { + text-align: right; +} + +.org-list .organization-listing { + font-size: 18px; + padding: 10px; +} + +.org-list .organization-listing img { + margin-left: 10px; + margin-right: 16px; +} + .plan-manager-element .plans-table thead td { color: #aaa; font-weight: bold; diff --git a/static/js/app.js b/static/js/app.js index 48d4a38a8..8d7bf2aa9 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -279,12 +279,15 @@ quayApp = angular.module('quay', ['restangular', 'angularMoment', 'angulartics', when('/repository/:namespace/:name/image/:image', {templateUrl: '/static/partials/image-view.html', controller: ImageViewCtrl}). when('/repository/:namespace/:name/admin', {templateUrl: '/static/partials/repo-admin.html', controller:RepoAdminCtrl}). when('/repository/', {title: 'Repositories', templateUrl: '/static/partials/repo-list.html', controller: RepoListCtrl}). - when('/user/', {title: 'User Admin', templateUrl: '/static/partials/user-admin.html', controller: UserAdminCtrl}). - when('/guide/', {title: 'User Guide', templateUrl: '/static/partials/guide.html', controller: GuideCtrl}). + when('/user/', {title: 'Account Settings', templateUrl: '/static/partials/user-admin.html', controller: UserAdminCtrl}). + when('/guide/', {title: 'Guide', templateUrl: '/static/partials/guide.html', controller: GuideCtrl}). when('/plans/', {title: 'Plans and Pricing', templateUrl: '/static/partials/plans.html', controller: PlansCtrl}). - when('/signin/', {title: 'Signin', templateUrl: '/static/partials/signin.html', controller: SigninCtrl}). + when('/signin/', {title: 'Sign In', templateUrl: '/static/partials/signin.html', controller: SigninCtrl}). when('/new/', {title: 'Create new repository', templateUrl: '/static/partials/new-repo.html', controller: NewRepoCtrl}). + when('/organizations/', {title: 'Organizations', templateUrl: '/static/partials/organizations.html', controller: OrgsCtrl}). + when('/organizations/new/', {title: 'New Organization', templateUrl: '/static/partials/new-organization.html', controller: NewOrgCtrl}). + when('/organization/:orgname', {templateUrl: '/static/partials/org-view.html', controller: OrgViewCtrl}). when('/organization/:orgname/admin', {templateUrl: '/static/partials/org-admin.html', controller: OrgAdminCtrl}). when('/organization/:orgname/teams/:teamname', {templateUrl: '/static/partials/team-view.html', controller: TeamViewCtrl}). @@ -648,8 +651,10 @@ quayApp.directive('namespaceSelector', function () { $scope.initialize = function(user) { var namespaces = {}; namespaces[user.username] = user; - for (var i = 0; i < user.organizations.length; ++i) { - namespaces[user.organizations[i].name] = user.organizations[i]; + if (user.organizations) { + for (var i = 0; i < user.organizations.length; ++i) { + namespaces[user.organizations[i].name] = user.organizations[i]; + } } var initialNamespace = $cookieStore.get('quay.currentnamespace') || $scope.user.username; diff --git a/static/js/controllers.js b/static/js/controllers.js index fae2c648e..971073b94 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -155,9 +155,9 @@ function RepoListCtrl($scope, Restangular, UserService) { $scope.loading = true; $scope.public_repositories = null; - $scope.user_repositories = null; + $scope.user_repositories = []; - var loadMyRepos = function(namespace) { + var loadMyRepos = function(namespace) { if (!$scope.user || $scope.user.anonymous || !namespace) { return; } @@ -1269,4 +1269,19 @@ function TeamViewCtrl($rootScope, $scope, Restangular, $routeParams) { loadOrganization(); loadMembers(); +} + +function OrgsCtrl($scope, UserService) { + $scope.loading = true; + + $scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) { + $scope.user = currentUser; + $scope.loading = false; + }, true); + + browserchrome.update(); +} + +function NewOrgCtrl($scope, UserService) { + } \ No newline at end of file diff --git a/static/partials/header.html b/static/partials/header.html index 6444833cf..b85b81d80 100644 --- a/static/partials/header.html +++ b/static/partials/header.html @@ -17,6 +17,7 @@
  • Repositories
  • User Guide
  • Plans & Pricing
  • +
  • Organizations
  • @@ -45,6 +46,7 @@ 1 +
  • Organizations
  • Sign out
  • diff --git a/static/partials/new-organization.html b/static/partials/new-organization.html new file mode 100644 index 000000000..8fd32cd45 --- /dev/null +++ b/static/partials/new-organization.html @@ -0,0 +1 @@ +new org diff --git a/static/partials/organizations.html b/static/partials/organizations.html new file mode 100644 index 000000000..ec7e66928 --- /dev/null +++ b/static/partials/organizations.html @@ -0,0 +1,71 @@ +
    +
    + +
    + +
    + + + + + + +
    + + +
    +

    Organizations

    + + +
    + + +
    + +
    +
    +
    Organizations
    +
    + Organizations in Quay provide unique features for businesses and other groups, such as team-based sharing and fine-grain permission controls. +
    +
    +
    + + +
    +
    + +
    +
    +
    Working in teams
    +
    + Organizations are designed for business blah blah blah +
    +
    +
    + +
    +
    + +
    +
    +
    Global and Local Permissions
    +
    + Organizations are designed for business blah blah blah +
    +
    +
    + +
    +
    diff --git a/static/partials/repo-list.html b/static/partials/repo-list.html index 94e381f08..3bb5bfb0c 100644 --- a/static/partials/repo-list.html +++ b/static/partials/repo-list.html @@ -4,14 +4,26 @@
    - - - +
    + + + +
    -

    Your Repositories

    Repositories