Work in progress: Organizations page (with a fake tour) and start on the locations for the create new org and convert to org forms
This commit is contained in:
parent
0c4dec6de4
commit
70c02eae16
8 changed files with 157 additions and 14 deletions
|
@ -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('')
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
|
@ -17,6 +17,7 @@
|
|||
<li><a ng-href="/repository/" target="{{ appLinkTarget() }}">Repositories</a></li>
|
||||
<li><a ng-href="/guide/" target="{{ appLinkTarget() }}">User Guide</a></li>
|
||||
<li><a ng-href="/plans/" target="{{ appLinkTarget() }}">Plans & Pricing</a></li>
|
||||
<li><a ng-href="/organizations/" target="{{ appLinkTarget() }}">Organizations</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -45,6 +46,7 @@
|
|||
<span class="badge user-notification" ng-show="user.askForPassword">1</span>
|
||||
</a>
|
||||
</li>
|
||||
<li><a ng-href="/organizations/" target="{{ appLinkTarget() }}">Organizations</a></li>
|
||||
<li><a href="javascript:void(0)" ng-click="signout()">Sign out</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
1
static/partials/new-organization.html
Normal file
1
static/partials/new-organization.html
Normal file
|
@ -0,0 +1 @@
|
|||
new org
|
71
static/partials/organizations.html
Normal file
71
static/partials/organizations.html
Normal file
|
@ -0,0 +1,71 @@
|
|||
<div class="container org-list">
|
||||
<div class="loading" ng-show="loading">
|
||||
<i class="fa fa-spinner fa-spin fa-3x"></i>
|
||||
</div>
|
||||
|
||||
<div class="button-bar-right">
|
||||
<a href="/organizations/new/" title="Starts the process to create a new organization" bs-tooltip="tooltip.title">
|
||||
<button class="btn btn-success">
|
||||
<i class="fa fa-plus"></i>
|
||||
Create New Organization
|
||||
</button>
|
||||
</a>
|
||||
<a href="/user/?migrate" ng-show="!user.anonymous" title="Starts the process to convert this account into an organization" bs-tooltip="tooltip.title">
|
||||
<button class="btn btn-primary">
|
||||
<i class="fa fa-caret-square-o-right"></i>
|
||||
Convert account
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Organizations -->
|
||||
<div ng-show="user.organizations.length > 0">
|
||||
<h2>Organizations</h2>
|
||||
|
||||
<div class="organization-listing" ng-repeat="organization in user.organizations">
|
||||
<img class="gravatar" src="//www.gravatar.com/avatar/{{ organization.gravatar }}?s=32&d=identicon">
|
||||
<a class="org-title" href="/organization/{{ organization.name }}">{{ organization.name }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Organization Help/Tour -->
|
||||
<div class="product-tour" ng-show="!user.organizations || user.organizations.length == 0">
|
||||
|
||||
<div class="tour-section row">
|
||||
<div class="col-md-12">
|
||||
<div class="tour-section-title">Organizations</div>
|
||||
<div class="tour-section-description">
|
||||
Organizations in Quay provide unique features for businesses and other groups, such as team-based sharing and fine-grain permission controls.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tour-section row">
|
||||
<div class="col-md-7">
|
||||
<img src="/static/img/user-home.png" title="Organization Overview"
|
||||
data-screenshot-url="https://quay.io/organization/myorg/" class="img-responsive">
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="tour-section-title">Working in teams</div>
|
||||
<div class="tour-section-description">
|
||||
Organizations are designed for business blah blah blah
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tour-section row">
|
||||
<div class="col-md-7">
|
||||
<img src="/static/img/user-home.png" title=""
|
||||
data-screenshot-url="https://quay.io/organization/myorg/" class="img-responsive">
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="tour-section-title">Global and Local Permissions</div>
|
||||
<div class="tour-section-description">
|
||||
Organizations are designed for business blah blah blah
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -4,14 +4,26 @@
|
|||
|
||||
<div class="container ready-indicator" ng-show="!loading" data-status="{{ loading ? '' : 'ready' }}">
|
||||
<div class="repo-list" ng-show="!user.anonymous">
|
||||
<a href="/new/">
|
||||
<button class="btn btn-success" style="float: right">
|
||||
<i class="fa fa-upload user-tool" title="Create new repository"></i>
|
||||
Create Repository
|
||||
</button>
|
||||
</a>
|
||||
<div ng-class="user.organizations.length ? 'section-header' : ''">
|
||||
<div class="button-bar-right">
|
||||
<a href="/new/">
|
||||
<button class="btn btn-success">
|
||||
<i class="fa fa-upload user-tool" title="Create new repository"></i>
|
||||
Create Repository
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<a href="/organization/{{ namespace }}" ng-show="namespace != user.username">
|
||||
<button class="btn btn-default">
|
||||
<i class="fa fa-group user-tool"></i>
|
||||
View Organization
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<span class="namespace-selector" user="user" namespace="namespace" ng-show="user.organizations"></span>
|
||||
</div>
|
||||
|
||||
<span class="namespace-selector" user="user" namespace="namespace" ng-show="user.organizations"></span>
|
||||
<h3 ng-show="namespace == user.username">Your Repositories</h3>
|
||||
<h3 ng-show="namespace != user.username">Repositories</h3>
|
||||
|
||||
|
|
Reference in a new issue