Show releases in a tab on the project page

This commit is contained in:
Eelco Dolstra
2013-02-21 01:23:42 +01:00
parent d9f6e662d8
commit cea17fd57e
5 changed files with 42 additions and 49 deletions

View File

@ -4,6 +4,7 @@
<ul class="nav nav-tabs">
<li class="active"><a href="#tabs-project" data-toggle="tab">Jobsets</a></li>
<li><a href="#tabs-settings" data-toggle="tab">Configuration</a></li>
<li><a href="#tabs-releases" data-toggle="tab">Releases</a></li>
<li><a href="#tabs-views" data-toggle="tab">Views</a></li>
</ul>
@ -108,6 +109,44 @@
</table>
</div>
<div id="tabs-releases" class="tab-pane">
[% IF releases.size == 0 %]
<p><em>This project has no releases yet.</em></p>
[% ELSE %]
<p>This project has made the following releases:</p>
<table class="tablesorter table table-condensed table-striped">
<thead>
<tr>
<th>Name</th>
<th>Date</th>
</tr>
</thead>
<tbody>
[% FOREACH release IN releases %]
[% link = c.uri_for('/release' project.name release.name) %]
<tr class="clickable" onclick="window.location = '[% link %]'">
<td><a href="[% link %]"><tt>[% release.name %]</tt></a></td>
<td>[% INCLUDE renderDateTime timestamp = release.timestamp %]</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]
[% IF c.user_exists %]
<p><a class="btn" href="[% c.uri_for('/project' project.name 'create-release') %]">
<i class="icon-plus"></i> Create a release
</a></p>
[% END %]
</div>
<div id="tabs-views" class="tab-pane">
[% IF views.size > 0 %]

View File

@ -1,39 +0,0 @@
[% WRAPPER layout.tt title="Releases for project $project.name" %]
[% PROCESS common.tt %]
[% USE HTML %]
[% IF releases.size == 0 %]
<p><em>This project has no releases yet.</em></p>
[% ELSE %]
<p>This project has made the following releases:</p>
<table class="tablesorter table table-condensed table-striped">
<thead>
<tr>
<th>Name</th>
<th>Date</th>
</tr>
</thead>
<tbody>
[% FOREACH release IN releases %]
[% link = c.uri_for('/release' project.name release.name) %]
<tr class="clickable" onclick="window.location = '[% link %]'">
<td><a href="[% link %]"><tt>[% release.name %]</tt></a></td>
<td>[% INCLUDE renderDateTime timestamp = release.timestamp %]</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]
[% IF c.user_exists %]
<p><a class="btn" href="[% c.uri_for('/project' project.name 'create-release') %]">
<i class="icon-plus"></i> Create a release
</a></p>
[% END %]
[% END %]

View File

@ -48,7 +48,6 @@
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('jobstatus'), [project.name]) title = "Job status" %]
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('errors'), [project.name]) title = "Errors" %]
<li class="divider"></li>
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('releases'), [project.name]) title = "Releases" %]
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'channel' 'latest') title = "Channel" %]
[% IF c.user_exists %]
<li class="divider"></li>