travis-web/app/templates/components/branch-row.hbs
lislis 9af0c24d2f start rewriting tooltips
remove some whitespace
2016-04-04 14:55:54 +02:00

194 lines
8.0 KiB
Handlebars

<div class="two-line fade-out">
<div class="row-name">
<h2 class="row-item">{{status-icon status=build.last_build.state}}
<span class="label-align">{{build.name}}</span></h2>
</div>
<div class="row-builds">
<div class="row-item">
<span class="icon icon-line-build"></span>
<span class="label-align">
{{#if build.last_build}}
{{#if getLast5Builds.isLoading}}
{{loading-indicator inline=true}}
{{else}}
{{getLast5Builds.count}} builds
{{/if}}
{{else}}
0 builds
{{/if}}</span>
</div>
</div>
</div>
<div class="two-line row-last-build fade-out">
<div class="row-request">
<div class="row-item">
{{#if build.last_build}}
{{request-icon event=build.last_build.event_type state=build.last_build.state}}
{{#link-to "build" build.last_build.id}}
<span class="label-align">#{{build.last_build.number}} {{build.last_build.state}}</span>
{{/link-to}}
{{else}}
{{request-icon event=build.last_build.eventType state=build.last_build.state}} -
{{/if}}
</div>
</div>
<div class="row-calendar">
<div class="row-item" title="{{pretty-date build.last_build.finished_at}}">
<span class="icon-calendar"></span>
<span class="label-align">
{{#if build.last_build}}
{{format-time build.last_build.finished_at}}
{{else}}
-
{{/if}}</span>
</div>
</div>
</div>
<div class="two-line">
<div class="row-commit">
<div class="row-item">
<span class="icon-github"></span>
<a href="{{urlGithubCommit}}" title="commit on GitHub">
<span class="label-align">
{{#if build.last_build}}
{{format-sha build.last_build.commit.sha}}
{{else}}
-
{{/if}}</span>
</a></div>
</div>
<div class="row-commiter">
<div class="row-item">
{{#if build.last_build}}
<img src="{{build.last_build.commit.committer.avatar_url}}" alt="avatar" class="avatar--small"><span class="label-align">{{build.last_build.commit.committer.name}}</span>
{{else}}
<div class="avatar--small"></div><span class="label-align">no commits yet</span>
{{/if}}
</div>
</div>
</div>
{{!-- <div class="one-line is-relative">
{{#unless inactive}}
{{#if canTrigger}}
{{#if build.last_build}}
<div class="row-nav dropup-trigger">
<div class="row-item">
<a href="#"><span class="icon icon-tofu">
<svg x="0px" y="0px" viewBox="0 0 20 20" xml:space="preserve">
<g id="Tofuburger">
<path fill="#A7AEAE" d="M17.9,6.2H2.1C1.8,6.2,1.5,6,1.5,5.6C1.5,5.3,1.8,5,2.1,5h15.7c0.4,0,0.6,0.3,0.6,0.6
C18.5,6,18.2,6.2,17.9,6.2z"/>
<path fill="#A7AEAE" d="M17.9,10.6H2.1c-0.4,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h15.7c0.4,0,0.6,0.3,0.6,0.6S18.2,10.6,17.9,10.6z
"/>
<path fill="#A7AEAE" d="M17.9,15H2.1c-0.4,0-0.6-0.3-0.6-0.6c0-0.3,0.3-0.6,0.6-0.6h15.7c0.4,0,0.6,0.3,0.6,0.6
C18.5,14.7,18.2,15,17.9,15z"/>
</g>
</svg>
</span></a></div>
</div>
<div class="dropup--blue">
<ul>
<li>
{{#if hasTriggered}}
<span class="icon">
<svg version="1.1" id="Layer_1" x="0px" y="0px"
viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<g id="Passed">
<path fill="#A7AEAE" d="M9.6,14.4c-0.1,0-0.3-0.1-0.4-0.1l-4-3.3c-0.3-0.2-0.3-0.6-0.1-0.9S5.8,9.8,6.1,10l3.4,2.8l4.9-7.5
C14.6,5,15,4.9,15.3,5.1c0.3,0.2,0.4,0.6,0.2,0.9l-5.3,8.1C10.1,14.3,9.9,14.4,9.6,14.4C9.7,14.4,9.7,14.4,9.6,14.4z"/>
</g>
</svg>
</span>
<span class="dropup-item no-link">Build triggered</span>
{{else}}
{{#if isTriggering}}
{{loading-indicator}}
{{else}}
<a {{action 'tiggerBuild'}}>
<span class="icon icon-trigger">
<svg x="0px" y="0px" viewBox="0 0 20 20" xml:space="preserve">
<g id="Trigger">
<path fill="#A7AEAE" d="M17.2,7.9C17,7.6,16.6,7.7,16.3,8l-1,1.2C14.9,6,12.2,3.6,9,3.6c-3.6,0-6.4,2.9-6.4,6.4s2.9,6.4,6.4,6.4
c1.8,0,3.6-0.8,4.8-2.2c0.2-0.3,0.2-0.7-0.1-0.9c-0.3-0.2-0.7-0.2-0.9,0.1c-1,1.1-2.4,1.7-3.9,1.7c-2.8,0-5.1-2.3-5.1-5.1
S6.1,4.9,9,4.9c2.7,0,4.9,2.1,5.1,4.7l-1.7-1.1c-0.3-0.2-0.7-0.1-0.9,0.2s-0.1,0.7,0.2,0.9l2.8,1.8c0,0,0,0,0,0
c0.1,0.1,0.2,0.1,0.3,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0.1,0,0.1-0.1c0,0,0.1-0.1,0.1-0.1l2-2.4C17.6,8.5,17.5,8.1,17.2,7.9z"/>
</g>
</svg>
</span>
<span class="dropup-item">Trigger a build</span>
</a>
{{/if}}
{{/if}}
</li>
<li><a {{action 'viewAllBuilds'}}>
<span class="icon icon-eye">
<svg x="0px" y="0px" viewBox="0 0 20 20" xml:space="preserve">
<g id="View">
<path fill="#A7AEAE" d="M17.4,9.6c-0.1-0.2-3.3-4.1-7.4-4.1s-7.3,4-7.4,4.1c-0.2,0.2-0.2,0.6,0,0.8c0.1,0.2,3.3,4.1,7.4,4.1
s7.3-4,7.4-4.1C17.6,10.2,17.6,9.8,17.4,9.6z M10,13.2c-2.8,0-5.2-2.3-6.1-3.2C4.8,9.1,7.2,6.8,10,6.8c2.8,0,5.2,2.3,6.1,3.2
C15.2,10.9,12.8,13.2,10,13.2z"/>
<path fill="#A7AEAE" d="M10,7c-1.5,0-2.6,1.3-2.6,3s1.2,3,2.6,3s2.6-1.3,2.6-3S11.5,7,10,7z M10,11.7c-0.7,0-1.3-0.7-1.3-1.7
S9.3,8.3,10,8.3s1.3,0.7,1.3,1.7S10.7,11.7,10,11.7z"/>
</g>
</svg>
</span>
<span class="dropup-item">View all builds</span></a>
</li>
</ul>
</div>
{{/if}}
{{/if}}
{{/unless}}
</div> --}}
<div class="one-line is-relative">
<ul class="build-tiles">
{{#if getLast5Builds.isLoading}}
{{loading-indicator center=true}}
{{else}}
{{#each getLast5Builds.content as |buildTile|}}
{{build-tile build=buildTile}}
{{/each}}
{{/if}}
</ul>
{{!-- {{#unless build.last_build}}
{{#unless inactive}}
{{#if canTrigger}}
{{#if hasTriggered}}
<span class="nobuilds-tigger">
<span class="icon icon-trigger">
<svg version="1.1" id="Layer_1" x="0px" y="0px"
viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
<g id="Passed">
<path fill="#A7AEAE" d="M9.6,14.4c-0.1,0-0.3-0.1-0.4-0.1l-4-3.3c-0.3-0.2-0.3-0.6-0.1-0.9S5.8,9.8,6.1,10l3.4,2.8l4.9-7.5
C14.6,5,15,4.9,15.3,5.1c0.3,0.2,0.4,0.6,0.2,0.9l-5.3,8.1C10.1,14.3,9.9,14.4,9.6,14.4C9.7,14.4,9.7,14.4,9.6,14.4z"/>
</g>
</svg>
</span>
Build triggered</span>
{{else}}
{{#if isTriggering}}
<span class="nobuilds-tigger">{{loading-indicator inline=true}}</span>
{{else}}
<a {{action 'tiggerBuild'}} class="nobuilds-tigger">
<span class="icon icon-trigger">
<svg x="0px" y="0px" viewBox="0 0 20 20" xml:space="preserve">
<g id="Trigger">
<path fill="#A7AEAE" d="M17.2,7.9C17,7.6,16.6,7.7,16.3,8l-1,1.2C14.9,6,12.2,3.6,9,3.6c-3.6,0-6.4,2.9-6.4,6.4s2.9,6.4,6.4,6.4
c1.8,0,3.6-0.8,4.8-2.2c0.2-0.3,0.2-0.7-0.1-0.9c-0.3-0.2-0.7-0.2-0.9,0.1c-1,1.1-2.4,1.7-3.9,1.7c-2.8,0-5.1-2.3-5.1-5.1
S6.1,4.9,9,4.9c2.7,0,4.9,2.1,5.1,4.7l-1.7-1.1c-0.3-0.2-0.7-0.1-0.9,0.2s-0.1,0.7,0.2,0.9l2.8,1.8c0,0,0,0,0,0
c0.1,0.1,0.2,0.1,0.3,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0.1,0,0.1-0.1c0,0,0.1-0.1,0.1-0.1l2-2.4C17.6,8.5,17.5,8.1,17.2,7.9z"/>
</g>
</svg>
</span>
Trigger a build</a>
{{/if}}
{{/if}}
{{/if}}
{{/unless}}
{{/unless}} --}}
</div>