From 5175364e620f29eec16c63b2b6f88cba125e0300 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 28 Oct 2013 13:22:18 -0400 Subject: [PATCH] Add a create repo button in a few places --- static/js/controllers.js | 12 ++++++++---- static/partials/landing.html | 3 ++- static/partials/repo-list.html | 7 +++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index 64042558c..334311918 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -204,7 +204,7 @@ function RepoListCtrl($scope, Restangular, UserService) { }); } -function LandingCtrl($scope, $timeout, Restangular, UserService, KeyService) { +function LandingCtrl($scope, $timeout, $location, Restangular, UserService, KeyService) { $('.form-signup').popover(); $scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) { @@ -230,7 +230,11 @@ function LandingCtrl($scope, $timeout, Restangular, UserService, KeyService) { }; $scope.browseRepos = function() { - document.location = '/repository/'; + $location.path('/repository/'); + }; + + $scope.createRepo = function() { + $location.path('/new/'); }; $scope.register = function() { @@ -906,13 +910,13 @@ function ImageViewCtrl($scope, $routeParams, $rootScope, Restangular) { }); } -function V1Ctrl($scope, UserService) { +function V1Ctrl($scope, $location, UserService) { $scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) { $scope.user = currentUser; }, true); $scope.browseRepos = function() { - document.location = '/repository/'; + $location.path('/repository/'); }; } diff --git a/static/partials/landing.html b/static/partials/landing.html index f425552e5..b53b4504f 100644 --- a/static/partials/landing.html +++ b/static/partials/landing.html @@ -61,7 +61,8 @@
Welcome {{ user.username }}!
- + +
diff --git a/static/partials/repo-list.html b/static/partials/repo-list.html index 602c08265..5edd390d0 100644 --- a/static/partials/repo-list.html +++ b/static/partials/repo-list.html @@ -4,6 +4,13 @@
+ + + +

Your Repositories