Skip to content

Commit

Permalink
added styling to delete page, split environment vars to separate page
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski committed May 28, 2015
1 parent dfb7b88 commit 3bc5dea
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 39 deletions.
5 changes: 5 additions & 0 deletions cmd/drone-server/static/scripts/drone.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@
controller: 'RepoEditCtrl',
resolve: resolveUser
})
.when('/:owner/:name/edit/env', {
templateUrl: '/static/scripts/views/repos_env.html',
controller: 'RepoEditCtrl',
resolve: resolveUser
})
.when('/:owner/:name/delete', {
templateUrl: '/static/scripts/views/repos_del.html',
controller: 'RepoEditCtrl',
Expand Down
15 changes: 11 additions & 4 deletions cmd/drone-server/static/scripts/views/repos_del.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@

<article>

<section>
<a href="/{{ repo.full_name }}/edit">Cancel</a>
<button ng-click="delete(repo.full_name)">Delete</button>
</form>

<section style="padding:30px; background-color:#EF5350;">
<button ng-click="delete(repo.full_name)" style="color:rgba(255,255,255,0.9);
text-transform: uppercase;
text-decoration: none;
border: 1px solid rgba(255,255,255,0.9);
padding: 10px;
background:transparent;
display:inline-block;
cursor:pointer;
margin-right: 10px;">Delete</button>
<span style="color:rgba(255,255,255,0.9);font-size:16px;">Warning: this action cannot be undone.</span>
</section>


Expand Down
46 changes: 12 additions & 34 deletions cmd/drone-server/static/scripts/views/repos_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<article>
<section>
<h2>Hooks</h2>
<h2>Settings</h2>
<div class="row">
<div>Post Commit Hooks</div>
<div>
Expand All @@ -40,10 +40,20 @@ <h2>Hooks</h2>
<label for="pull_requests" class="switch"></label>
</div>
</div>
<a class="row" ng-href="{{ repo.full_name }}/edit/env">
<div>Private Variables</div>
<div>
Inject private variables into your build environment
</div>
</a>
<a class="row" ng-href="{{ repo.full_name }}/delete">
<div>Delete</div>
<div>Delete this repository and its build history</div>
</a>
</section>

<section ng-if="user.admin">
<h2>Advanced</h2>
<h2>Admin settings</h2>
<div class="row">
<div>Trusted (Evelvate Privilege)</div>
<div>
Expand All @@ -60,30 +70,6 @@ <h2>Advanced</h2>
</div>
</section>

<section>
<form>

<ul>
<li ng-repeat="(key, value) in repo.params">
<label>{{ key }}</label>
<input type="text" ng-model="repo.params[key]"/>
<button ng-click="deleteParam(key)">remove</button>
</li>
<li>
<input type="text" ng-model="param.key" />
<input type="text" ng-model="param.value" />
<button ng-click="addParam(param)">add</button>
</li>
</ul>



<button ng-click="save(repo)">Save</button>
<button ng-click="delete(repo.full_name)">Delete</button>
</form>

</section>

<section>
<h2>Badges</h2>
<div class="row">
Expand All @@ -106,12 +92,4 @@ <h2>Public Key</h2>
<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>
42 changes: 42 additions & 0 deletions cmd/drone-server/static/scripts/views/repos_env.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<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>
<form>
<ul>
<li ng-repeat="(key, value) in repo.params">
<label>{{ key }}</label>
<input type="text" ng-model="repo.params[key]"/>
<button ng-click="deleteParam(key)">remove</button>
</li>
<li>
<input type="text" ng-model="param.key" />
<input type="text" ng-model="param.value" />
<button ng-click="addParam(param)">add</button>
</li>
</ul>

<button ng-click="save(repo)">Save</button>
</form>
</section>
</article>
13 changes: 12 additions & 1 deletion cmd/drone-server/static/styles/drone.css
Original file line number Diff line number Diff line change
Expand Up @@ -1346,12 +1346,23 @@ section .row {
display: block;
display: flex;
text-decoration: none;
position: relative;
}

section .row:hover {
section a.row:hover {
background:#FAFAFA;
}

section a.row:after {
content: "\f29c";
font-family: Material-Design-Iconic-Font;
line-height: 74px;
font-size: 26px;
color: rgb(204, 204, 204);
position: absolute;
right: 25px;
}

section .row > div:first-child {
padding: 30px 0px;
border-bottom: 1px solid #EEE;
Expand Down

0 comments on commit 3bc5dea

Please sign in to comment.