Hide some things that require a local store

This commit is contained in:
Eelco Dolstra 2017-10-18 13:44:41 +02:00
parent 40a9b70df2
commit 44ef743d84
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 5 additions and 2 deletions

View file

@ -65,8 +65,9 @@ sub build_GET {
my $build = $c->stash->{build};
$c->stash->{template} = 'build.tt';
$c->stash->{isLocalStore} = isLocalStore();
$c->stash->{available} =
isLocalStore
$c->stash->{isLocalStore}
? all { isValidPath($_->path) } $build->buildoutputs->all
: 1;
$c->stash->{drvAvailable} = isValidPath $build->drvpath;

View file

@ -140,7 +140,7 @@ END;
[% IF steps.size() > 0 %]<li><a href="#tabs-buildsteps" data-toggle="tab">Build steps</a></li>[% END %]
[% IF build.dependents %]<li><a href="#tabs-usedby" data-toggle="tab">Used by</a></li>[% END%]
[% IF drvAvailable %]<li><a href="#tabs-build-deps" data-toggle="tab">Build dependencies</a></li>[% END %]
[% IF available %]<li><a href="#tabs-runtime-deps" data-toggle="tab">Runtime dependencies</a></li>[% END %]
[% IF localStore && available %]<li><a href="#tabs-runtime-deps" data-toggle="tab">Runtime dependencies</a></li>[% END %]
</ul>
<div id="generic-tabs" class="tab-content">

View file

@ -98,6 +98,7 @@
<a class="btn btn-mini" href="[% contents %]">Contents</a>
</td>
</tr>
[% IF localStore %]
<tr class="product">
<td>
<img src="[% c.uri_for("/static/images/nix-build.png") %]" alt="Source" />
@ -139,6 +140,7 @@
[% END %]
</td>
</tr>
[% END %]
[% END %]
[% CASE ["file", "channel"] %]