Merge branch 'requests-redone'

This commit is contained in:
Lisa Passing 2015-04-13 13:30:08 +02:00
commit 30da33022e
8 changed files with 139 additions and 40 deletions

View File

@ -10,9 +10,9 @@ Controller = Ember.ObjectController.extend
type: (->
if @get('isPullRequest')
'Pull request'
'pull_request'
else
'Push'
'push'
).property('isPullRequest')
status: (->
@ -26,6 +26,8 @@ Controller = Ember.ObjectController.extend
message = @get('model.message')
if @config.pro && message == "private repository"
''
else if !message
'Build created successfully '
else
message
).property('model.message')

View File

@ -30,7 +30,7 @@
@import "app/pro";
// @import "app/profile/hooks";
// @import "app/profile";
@import "app/requests";
// @import "app/requests";
// @import "app/right/lists";
// @import "app/right/sponsors";
// @import "app/right";
@ -68,3 +68,4 @@
// @import "app/top";
@import "app/landing";
@import "app/layouts/requests";

View File

@ -8,7 +8,7 @@
background-clip: padding-box
border-radius 4px
@mixin fadeOut($position, $angle, $color)
@mixin fadeOut($position, $angle, $color, $width: 0%)
content: ""
display: block
position: absolute
@ -23,7 +23,7 @@
width: 2em
height: 100%
background: linear-gradient($angle, rgba($color, 1) 0%, rgba($color, 0) 100%)
background: linear-gradient($angle, rgba($color, 1) $width, rgba($color, 0) 100%)
@mixin clearfix
&:before,

View File

@ -0,0 +1,58 @@
@mixin colorRequests($color-bg)
&:hover
background-color: $color-bg
.requests-commit,
.requests-branch,
.requests-message,
.requests-time
&:after
@include fadeOut(right, -90deg, $color-bg, 30%)
.requests
@include resetul
.accepted:hover
@include colorRequests(#e5efe4)
.rejected:hover
@include colorRequests(#fbebe6)
margin-top: 2.5rem
color: #969496
a:hover
text-decoration: underline
.requests-commit,
.requests-branch,
.requests-message,
.requests-time
position: relative
&:after
content: ""
@include fadeOut(right, -90deg, $cream-light, 30%)
.requests-time
@media #{$medium-up}
padding-left: 2em
border-left: 1px solid $grey4
.tile--jobs
padding-left: 2.5em
.icon.push
width: 1.2em
height: .8em
.icon.pull_request
height: 1.5em
@media #{$medium-up}
.requests-time
width: grid-calc(4, 24)
.requests-branch
width: grid-calc(4, 24)
.requests-commit
width: grid-calc(9, 24)
.requests-build
width: grid-calc(2, 24)
.requests-message
width: grid-calc(5, 24)

View File

@ -77,6 +77,11 @@
.icon.pull_request
background-image: inline-image('svg/pull-request-icon.svg')
.icon--grey.push
background-image: inline-image('svg/icon-request-push.svg')
.icon--grey.pull_request
background-image: inline-image('svg/icon-request-pull.svg')
.icon-lock
background-image: inline-image('dashboard/private-icon.svg')
@ -105,10 +110,12 @@
.icon--env
background-image: inline-image('svg/icon-environment-dark2.svg')
.icon--cross-red,
.icon--job.failed
.icon--job.failed,
.icon--job.rejected
background-image: inline-image('svg/icon-job-failed.svg')
.icon--check-green,
.icon--job.passed
.icon--job.passed,
.icon--job.accepted
background-image: inline-image('svg/icon-job-passed.svg')
.icon--error-grey,
.icon--job.errored

View File

@ -6,37 +6,39 @@
</div>
{{/if}}
<table id="requests" class="list">
<thead>
<tr>
<th>Request</th>
<th>Commit</th>
<th>Build</th>
<th>Commit message</th>
<th>Type</th>
<th>Message</th>
</tr>
</thead>
<ul class="requests">
{{#each controller itemController="request"}}
<div {{bind-attr class=":tile :tile--jobs :row requestClass" }}>
<div class="tile-status tile-status--job">
<span {{bind-attr class=":icon :icon--job requestClass"}}></span>
</div>
<tbody>
{{#each controller itemController="request"}}
<tr {{bind-attr class="requestClass"}}>
<td class="request-id">
<span class="status"></span>
{{id}}
</td>
<td>{{github-commit-link repo.slug commit.sha}}</td>
<td>
{{#if build}}
{{#link-to "build" build}}#{{build.number}}{{/link-to}}
{{else}}
-
{{/if}}
</td>
<td class="commit-message">{{{format-message commit.message short="true" repoBinding=build.repo}}}</td>
<td>{{type}}</td>
<td>{{message}}</td>
</tr>
{{/each}}
</tbody>
</table>
<p class="jobs-item requests-time column">{{format-time created_at}}</p>
<p class="jobs-item requests-branch column">
<span {{bind-attr class=":icon :icon--grey type"}}></span>
{{#if isPullRequest}}
<strong>#{{pullRequestNumber}}</strong>
{{else}}
<strong>{{branchName}}</strong>
{{/if}}
{{github-commit-link repo.slug commit.sha}}
</p>
<p class="jobs-item requests-commit column">
{{{format-message commit.message short="true" repoBinding=build.repo}}}
</p>
<p class="jobs-item requests-build column">
{{#if build}}
<span class="icon icon-hash"></span>
{{#link-to "build" build}}
{{build.number}}{{/link-to}}
{{else}}
-
{{/if}}
</p>
<p class="jobs-item requests-message column">{{message}}</p>
</div>
{{/each}}
</ul>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="12.156px" height="15.196px" viewBox="0 0 12.156 15.196" enable-background="new 0 0 12.156 15.196" xml:space="preserve">
<g>
<path fill="#D0D1CF" d="M3.093,11.376V4.823c0.596-0.344,0.995-0.988,0.995-1.725c0-1.105-0.895-1.998-1.996-1.998
c-1.104,0-1.996,0.893-1.996,1.998c0,0.739,0.403,1.384,1.001,1.73v6.542c-0.598,0.346-1.001,0.992-1.001,1.732
c0,1.103,0.895,1.996,1.996,1.996s1.996-0.894,1.996-1.996C4.088,12.364,3.688,11.721,3.093,11.376z M2.092,2.095
c0.553,0,1.004,0.451,1.004,1.005c0,0.556-0.451,1.002-1.004,1.002c-0.555,0-1.005-0.446-1.005-1.002
C1.087,2.546,1.537,2.095,2.092,2.095z M2.092,14.107c-0.555,0-1.005-0.448-1.005-1.001c0-0.557,0.451-1.006,1.005-1.006
c0.553,0,1.004,0.449,1.004,1.006C3.096,13.659,2.645,14.107,2.092,14.107z"/>
<path fill="#D0D1CF" d="M11.081,11.37V5.063c0-3.147-2.856-2.956-2.856-2.956H7.098V0.099L4.108,3.098L7.098,6.09v-2h1.127
c0.869,0,0.857,0.973,0.857,0.973v6.314c-0.593,0.345-0.991,0.988-0.991,1.726c0,1.103,0.894,1.996,1.996,1.996
c1.104,0,1.997-0.894,1.997-1.996C12.084,12.361,11.679,11.716,11.081,11.37z M10.087,14.107c-0.556,0-1.005-0.448-1.005-1.001
c0-0.557,0.449-1.006,1.005-1.006c0.554,0,1.004,0.449,1.004,1.006C11.091,13.659,10.641,14.107,10.087,14.107z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16.55px" height="9.439px" viewBox="0 0 16.55 9.439" enable-background="new 0 0 16.55 9.439" xml:space="preserve">
<path fill="#D0D1CF" d="M12.73,3.533C12.212,1.558,10.414,0.1,8.275,0.1c-2.138,0-3.937,1.458-4.454,3.433H0.2v2.296h3.607
c0.502,2,2.312,3.482,4.468,3.482c2.156,0,3.967-1.482,4.469-3.482h3.607V3.533H12.73z M8.275,7.015
c-0.87,0-1.626-0.479-2.024-1.186C6.063,5.493,5.954,5.106,5.954,4.693c0-0.423,0.113-0.818,0.311-1.16
c0.4-0.693,1.15-1.16,2.011-1.16c0.859,0,1.609,0.467,2.012,1.16c0.197,0.342,0.311,0.737,0.311,1.16c0,0.414-0.109,0.8-0.299,1.136
C9.9,6.536,9.144,7.015,8.275,7.015z"/>
</svg>

After

Width:  |  Height:  |  Size: 988 B