Issue 116: Add project size on project page

This commit is contained in:
Nathan Adams 2016-01-24 21:50:21 -06:00
parent c23553c16a
commit 57927abcc2
2 changed files with 20 additions and 0 deletions

View File

@ -110,4 +110,16 @@
<p><strong>Download Project</strong></p>
<p>A copy of the project can be downloaded here: <a href="{url 'IDF_Views_Project::backup', array($project.shortname)}">Download</a></p>
</div>
{assign $stats = $project.getStats()}
<div class="issue-submit-info">
<p><strong>Project Stats</strong></p>
<dl class="statistics smaller">
<dt>Size:</dt> <dd>{$project.getRepositorySize()|size}</dd>
<dt>Downloads:</dt> <dd>{$stats["downloads"]}</dd>
<dt>Reviews:</dt> <dd>{$stats["reviews"]}</dd>
<dt>Commits:</dt> <dd>{$stats["commits"]}</dd>
<dt>Issues:</dt> <dd>{$stats["issues"]}</dd>
<dt>Documentations:</dt> <dd>{$stats["docpages"]}</dd>
</dl>
</div>
{/block}

View File

@ -37,6 +37,14 @@
<span class="label"><a class="label" href="{$url}">{$member}</a></span><br />
{/foreach}
{/if}
{assign $stats = $project.getStats()}
<dl class="statistics smaller">
<dt>Downloads:</dt> <dd>{$stats["downloads"]}</dd>
<dt>Reviews:</dt> <dd>{$stats["reviews"]}</dd>
<dt>Commits:</dt> <dd>{$stats["commits"]}</dd>
<dt>Issues:</dt> <dd>{$stats["issues"]}</dd>
<dt>Documentations:</dt> <dd>{$stats["docpages"]}</dd>
</dl>
</p>
<p>
{if $project.enableads}