<!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:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/">
      <xi:include href="layout.html" />
    <xi:include href="macros.html" />
    <xi:include href="agilo_macros.html" />
    <head>
        <title>Agilo ${_('Team')} ${_('Statistics')}</title>
    </head>
    <body>

        <div id="content">
            <h1>${_('Team')} "$team.name" ${_('Statistics')}</h1>
            
            ${wiki_to_html(context, description)}

            <h2>${_('Team members')}</h2>
            <ul>
                <li py:for="member in team.members">
                    <py:choose>
                        <py:when test="member.full_name">${member.full_name}</py:when>
                        <py:otherwise>${member.name}</py:otherwise>
                    </py:choose>
                    
                    <span class="info" py:if="member.full_name or member.email">
                        (
                            <py:if test="member.full_name">${member.name}</py:if>
                            <py:if test="member.full_name and member.email"> - </py:if>
                            <a py:if="member.email" href="mailto:${member.email}">${member.email}</a>
                        )
                    </span>
                </li>
            </ul>
            <div id="team_charts">
                <h2>${_('Team')} ${_('metrics')}</h2>
                
                <table id="metrics" class="tickets listing metrics backlog">
                    <thead>
	                    <tr>
	                        <th>${_('Sprint')}</th>
	                        <th>${_('Start date')}</th>
	                        <th>${_('End date')}</th>
	                        <th py:for="name in metric_labels">$name</th>
	                    </tr>
	                </thead>
	                <tbody>
	                    <tr py:for="sprint in sprints">
	                        <td class="sprint"><a href="${sprint.url}">$sprint.name</a></td>
                            <td>${sprint.start}</td>
                            <td>${sprint.end}</td>
	                        <td py:for="name in metric_names">${sprint.metrics[name]}</td>
	                    </tr>
	                </tbody>
                </table>
                <div class="charts">
                    <py:for each="widget in chart_widgets">${widget.display()}</py:for>
                </div>
            </div>
            <div id="help">
                <strong>Note:</strong> if you want to know more, see <a href="${req.href('agilo-help', 'user/team')}">Team</a> in the Agilo help.
                As an administrator you can <a href="${req.href.admin('agilo', 'teams')}">create a new team</a>.
            </div>
        </div>

     </body>
</html>
