2013-02-20 14:54:33 +00:00
[% WRAPPER layout.tt title="Overview" hideHeader=1 %]
2009-04-02 16:15:57 +00:00
[% PROCESS common.tt %]
2013-11-06 11:03:08 +00:00
[% IF newsItems.size != 0 %]
2013-05-07 15:04:42 +00:00
<div class="alert alert-info">
[% FOREACH i IN newsItems %]
<div class="news-item">
[% contents = String.new(i.contents) %]
<h4 class="alert-heading">[% INCLUDE renderDateTime timestamp=i.createtime %] by [% i.author.fullname %]</h4>
[% contents.replace('\n','<br />\n') %]
</div>
[% END %]
</div>
2010-04-27 13:29:08 +00:00
[% END %]
2013-11-06 13:11:56 +00:00
<div class="page-header">Projects</div>
2009-04-02 16:15:57 +00:00
2013-11-06 11:05:56 +00:00
[% IF projects.size != 0 %]
2016-11-01 12:13:59 +00:00
<script type="text/javascript">
function showProjects() {
var showDisabled = $('#show-disabled').hasClass('active');
$('tr.project').map(function() {
var hide =
($(this).hasClass('disabled-project') && !showDisabled);
if (hide) $(this).hide(); else $(this).show();
});
return false;
};
$(document).ready(function() {
$('#show-disabled').on('click', function(e) {
$(this).toggleClass('active');
showProjects();
return false;
});
showProjects();
});
</script>
<p>The following projects are hosted on this server:
2021-04-08 14:58:02 +00:00
<label id="show-disabled" class="btn btn-secondary btn-sm float-right" data-toggle="button">Show disabled projects</label>
2016-11-01 12:13:59 +00:00
</p>
2009-04-02 16:15:57 +00:00
2013-04-26 12:49:11 +00:00
<table class="table table-condensed table-striped clickable-rows">
2009-04-02 16:15:57 +00:00
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
[% FOREACH p IN projects %]
2016-11-01 12:13:59 +00:00
<tr class="project [% IF !p.enabled %]disabled-project[% END %]">
2013-02-22 17:05:04 +00:00
<td><span class="[% IF !p.enabled %]disabled-project[% END %] [%+ IF p.hidden %]hidden-project[% END %]">[% INCLUDE renderProjectName project=p.name inRow=1 %]</span></td>
2009-04-02 16:15:57 +00:00
<td>[% HTML.escape(p.displayname) %]</td>
<td>[% WRAPPER maybeLink uri=p.homepage %][% HTML.escape(p.description) %][% END %]</td>
</tr>
[% END %]
</tbody>
</table>
2013-11-06 11:05:56 +00:00
[% ELSE %]
<div class="alert alert-warning">Hydra has no projects yet. Please
<a href="[% c.uri_for(c.controller('Project').action_for('create')) %]">create a project</a>.</div>
[% END %]
2009-04-02 16:15:57 +00:00
[% END %]