hydra/src/root/overview.tt
2012-04-12 21:03:59 +02:00

50 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[% WRAPPER layout.tt title="Overview" %]
[% PROCESS common.tt %]
[% IF newItems.size != 0 %]
<div class="alert alert-info">
<a class="close" data-dismiss="alert">×</a>
[% FOREACH i IN newsItems %]
[% contents = String.new(i.contents) %]
<h4 class="alert-heading">[% INCLUDE renderDateTime timestamp=i.createtime %] by [% i.author.fullname %]</h4>
[% contents.replace('\n','<br />\n') %]
[% END %]
</div>
[% END %]
<h2>Projects</h2>
<p>The following projects are hosted on this server:</p>
<table class="tablesorter table table-condensed table-striped">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Description</th>
[% IF c.check_user_roles('admin') %]<th>Options</th>[% END %]
</tr>
</thead>
<tbody>
[% FOREACH p IN projects %]
<tr class="clickable [% IF odd %] odd [% END; odd = !odd %]"
onclick="window.location = '[% c.uri_for('/project' p.name) %]'">
<td>[% INCLUDE renderProjectName project = p.name %]</td>
<td>[% HTML.escape(p.displayname) %]</td>
<td>[% WRAPPER maybeLink uri=p.homepage %][% HTML.escape(p.description) %][% END %]</td>
[% IF c.check_user_roles('admin') %]
<td>
[% IF p.hidden %]
[% INCLUDE maybeButton uri = c.uri_for('/project' p.name 'unhide') content = "Unhide" %]
[% ELSE %]
[% INCLUDE maybeButton uri = c.uri_for('/project' p.name 'hide') content = "Hide" %]
[% END %]
</td>
[% END %]
</tr>
[% END %]
</tbody>
</table>
[% END %]