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

115 lines
4.7 KiB
Handlebars

<div class="dash-head">
<a href="#" class="dash-star {{if repo.starred 'is-starred'}}" title="{{if repo.starred 'un'}}star this repo"><span class="icon-star">
<svg version="1.1" id="icon-star" x="0px" y="0px" viewBox="0 0 15 15" xml:space="preserve" alt="star repository">
<path id="star" d="M7.159,1.035c0.188-0.38,0.495-0.38,0.683,0l1.596,3.234c0.188,0.38,0.685,0.741,1.105,0.802
l3.569,0.519c0.42,0.061,0.515,0.353,0.211,0.649l-2.583,2.517c-0.304,0.296-0.494,0.88-0.422,1.298l0.61,3.555
c0.072,0.418-0.177,0.599-0.552,0.401l-3.192-1.678c-0.375-0.197-0.99-0.197-1.365,0l-3.192,1.678
c-0.375,0.197-0.624,0.017-0.552-0.401l0.61-3.555c0.072-0.418-0.118-1.002-0.422-1.298L0.678,6.24
C0.374,5.944,0.469,5.652,0.889,5.591l3.569-0.519c0.42-0.061,0.917-0.422,1.105-0.802L7.159,1.035z"/>
</svg>
</span></a>
{{#if config.pro}}
<span class="icon-lock">private repo</span>
{{/if}}
</div>
<div class="dash-body">
<div class="dash-main">
<header class="fade-out dash-header">
<h2 class="row-label">{{#link-to "owner" repo.owner.login}}{{repo.owner.login}}{{/link-to}}</h2>
<h1 class="row-content">{{#link-to "repo" repo.owner.login repo.name}}{{repo.name}}{{/link-to}}</h1>
</header>
<section class="dash-default">
<h3 class="label">Default branch</h3>
<p class="row-content color">
{{request-icon event=repo.default_branch.last_build.event_type state=repo.default_branch.last_build.state}}
{{repo.default_branch.name}}
{{#if repo.active}}is {{repo.default_branch.last_build.state}}{{/if}}
</p>
</section>
{{#if repo.default_branch.last_build}}
<section class="dash-last-build">
{{#if repo.active}}
<div>
<h3 class="label">Last build</h3>
<p class="row-content color">
{{status-icon status=repo.default_branch.last_build.state}}
{{#link-to "build" repo.owner.login repo.name repo.default_branch.last_build.id}}
<span class="label-align">#{{repo.default_branch.last_build.number}} {{repo.default_branch.last_build.state}}</span>
{{/link-to}}
</p>
</div>
{{/if}}
<div>
<h3 class="label">Last commit</h3>
<p class="row-content">
<span class="icon-github"></span>
<a href="{{urlGithubCommit}}" title="See the commit on Github">
<span class="label-align">
{{format-sha repo.default_branch.last_build.commit.sha}}
</span>
</a>
</p>
</div>
<div>
<h3 class="label">Last commit completed</h3>
<p class="row-content" title="{{repo.default_branch.last_build.finished_at}}">
<span class="icon-calendar"></span>
<span class="label-align">
{{#if repo.default_branch.last_build}}
{{format-time repo.default_branch.last_build.finished_at}}
{{else}}
running
{{/if}}</span>
</p>
</div>
</section>
{{/if}}
{{#if repo.active}}
{{#if displayMenuTofu}}
<div class="dash-menu">
<div class="dropup {{if dropupIsOpen "is-open"}}">
<button type="button" class="dropup-tofu" {{action "openDropup"}}>open action menu</button>
<ul class="dropup-list">
<li><a href="#" title="Trigger a new build">
<span class="icon-trigger"></span>
<span class="label-align">Trigger a build</span></a></li>
{{#if displayActiavteLink}}
<li><a href="#" title="Deactivate builds for this repository">
<span class="icon-deactivate"></span>
<span class="label-align">Deactivate repository</span></a></li>
{{/if}}
<li>
{{#link-to 'settings' repo title="Settings for this repository"}}
<span class="icon-settings"></span>
<span class="label-align">Settings</span>
{{/link-to}}</li>
</ul>
</div>
</div>
{{/if}}
{{else}}
<div class="dash-button">
{{#if displayActivateLink}}
<button type="button" class="activate-repo-button is-active" {{action 'activateRepo'}}>Activate repository</button>
{{else}}
<p class="activate-repo-button" data-tooltip="You need admin rights to activate a repository">Actiavte repository</p>
{{/if}}
</div>
{{/if}}
</div>
{{#if repo.active}}
<aside class="dash-aside">
<ul class="lastbuilds">
{{lastbuild-tile repo=repo build=repo.default_branch.last_build}}
</ul>
</aside>
{{/if}}
</div>