blob: 5fe71082c1d8bde62ad603e10d453e48fbce05a8 [file] [log] [blame]
<!--!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="layout.html" />
<head>
<title>Reports</title>
<script type="text/javascript" src="${chrome.htdocs_location}js/folding.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$("span.foldable").enableFolding(true);
$("#trac-toggle-description").click(function() {
if ($(this).checked())
$("div.description").parent().removeClass("collapsed");
else
$("div.description").parent().addClass("collapsed");
});
});
</script>
</head>
<body>
<div id="content" class="report row">
<h1 class="span12">Reports</h1>
<div class="span9 reports">
<div py:if="saved_query_href">
<form method="get" action="${href.report()}">
<div class="inlinebuttons">
<input type="hidden" name="action" value="clear" />
<input type="submit" class="inlinebutton btn btn-mini"
title="Forget last query" value="${_('Clear')}" />
</div>
</form>
<h2><a href="$saved_query_href"><em>Return to Last Query</em></a></h2>
<span class="foldable" />
<div class="help-block description">
<p><span class="label label-info">Tip</span>
Continue browsing through the current list of results,
from the last selected report or custom query.</p>
</div>
</div>
<div py:if="query_href">
<h2><a href="$query_href"><em>Custom Query</em></a></h2>
<span class="foldable" />
<div class="help-block description">
<p><span class="label label-info">Tip</span>
Compose a new ticket query by selecting filters and columns to display.
</p>
</div>
</div>
</div>
<div class="span3">
<form id="prefs" method="get" action="" class="well">
<div>
<input id="trac-toggle-description" type="checkbox" />
<label for="trac-toggle-description">Show Descriptions</label>
</div>
</form>
<div id="description" />
</div>
<div py:choose="" class="reports span12">
<py:when test="reports">
<h2>SQL reports and saved custom queries
<small id="trac-sort-order" style="white-space:nowrap;" class="pull-right" py:with="report_asc = asc if sort == 'report' else None;
title_asc = asc if sort == 'title' else None">
Sort by:
<a href="${href.report(sort='report', asc='0' if report_asc else '1')}">
<span class="label">
<i class="${('icon-chevron-down', 'icon-chevron-up')[report_asc] if report_asc is not None else None}"></i>
Identifier
</span>
</a> &nbsp;
<a href="${href.report(sort='title', asc='0' if title_asc else '1')}">
<span class="label">
<i class="${('icon-chevron-down', 'icon-chevron-up')[title_asc] if title_asc is not None else None}"></i>
Title
</span>
</a>
</small>
</h2>
<div py:for="id, title, description, can_edit, can_delete in reports">
<form py:if="can_delete" method="get" action="${href.report(id)}">
<div class="inlinebuttons">
<input type="hidden" name="action" value="delete" />
<input type="submit" class="inlinebutton btn btn-mini" title="Delete report" value="${_('Delete')}" />
</div>
</form>
<form py:if="can_edit" method="get" action="${href.report(id)}">
<div class="inlinebuttons">
<input type="hidden" name="action" value="edit" />
<input type="submit" class="inlinebutton btn btn-mini" title="Edit report" value="${_('Edit')}" />
</div>
</form>
<h2><a title="View report" href="${href.report(id)}">{$id} <em>$title</em></a></h2>
<span class="foldable" />
<div py:if="description" class="description" xml:space="preserve">
${wiki_to_html(context, description)}
</div>
</div>
</py:when>
<p py:otherwise="" class="alert">
<span class="label label-warning">Warning</span>
No reports available.
</p>
</div>
<div py:if="'REPORT_CREATE' in perm" class="buttons span12">
<form action="" method="get" id="create_report">
<div>
<input type="hidden" name="action" value="new" />
<input class="btn" type="submit" value="${_('Create new report')}" />
</div>
</form>
</div>
<div id="help" i18n:msg="" class="span12">
<p class="help-block pull-right">
<span class="label label-info">Note</span>
See <a href="${href.wiki('TracReports')}">TracReports</a> for help on using and creating reports.
</p>
</div>
</div>
</body>
</html>