moved delete to separate page

This commit is contained in:
Brad Rydzewski 2015-05-26 23:59:57 -07:00
parent d36af9f646
commit dfb7b885af
3 changed files with 48 additions and 0 deletions

View file

@ -82,6 +82,11 @@
controller: 'RepoEditCtrl',
resolve: resolveUser
})
.when('/:owner/:name/delete', {
templateUrl: '/static/scripts/views/repos_del.html',
controller: 'RepoEditCtrl',
resolve: resolveUser
})
.when('/:owner/:name/:number', {
templateUrl: '/static/scripts/views/build.html',
controller: 'BuildCtrl',

View file

@ -0,0 +1,35 @@
<header>
<a class="logo float-left" href="/"></a>
<a class="menu-item settings float-right" href="/profile"></a>
<a class="menu-item users float-right" href="/users" ng-if="user.admin"></a>
<a class="menu-item help float-right" href="http://readme.drone.io" target="_blank"></a>
<a class="menu-item user-name float-right" href="/profile">{{ "+"+user.login }}</a>
</header>
<div class="toolbar">
<div class="breadcrumb" style="position:relative;top:0px;">
<a href="/{{ repo.full_name }}/edit" class="icon icon-home"></a>
<a ng-href="/{{ repo.full_name }}">{{ repo.owner }} / {{ repo.name }}</a>
</div>
<div class="menu">
<a ng-href="/{{ repo.full_name }}/edit" class="nav-item settings float-right"></a>
<button ng-click="watch(repo)" ng-if="!repo.starred" class="nav-item star float-right"></button>
<button ng-click="unwatch(repo)" ng-if="repo.starred" class="nav-item unstar float-right"></button>
</div>
</div>
<article>
<section>
<a href="/{{ repo.full_name }}/edit">Cancel</a>
<button ng-click="delete(repo.full_name)">Delete</button>
</form>
</section>
</article>

View file

@ -106,4 +106,12 @@
<pre class="snippet snippet-padding">{{ repo.keypair.public }}</pre>
</div>
</section>
<section>
<h2>Delete</h2>
<a class="row" href="{{ repo.full_name }}/delete">
<div>Delete this Repository</div>
<div></div>
</div>
</section>
</article>