Save a link to the latest activity value in the project model and
render a simple green bar as activity measure in the project list view.
This commit is contained in:
@@ -10,30 +10,41 @@
|
||||
<p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'Create Project'}</a></p>{/if}
|
||||
{else}
|
||||
{foreach $projects as $p}
|
||||
<div class="p-list-img">
|
||||
<a href="{url 'IDF_Views_Project::home', array($p.shortname)}">
|
||||
<img src="{url 'IDF_Views_Project::logo', array($p.shortname)}" alt="{trans 'Project logo'}" />
|
||||
</a>
|
||||
{if $p.private}
|
||||
<div class="p-list-private">
|
||||
<a href="{url 'IDF_Views_Project::home', array($p.shortname)}">
|
||||
<img style="float:right" src="{media '/idf/img/lock.png'}" alt="{trans 'Private project'}" />
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="p-list-prj">
|
||||
<div class="logo">
|
||||
<a href="{url 'IDF_Views_Project::home', array($p.shortname)}">
|
||||
<img src="{url 'IDF_Views_Project::logo', array($p.shortname)}" alt="{trans 'Project logo'}" />
|
||||
</a>
|
||||
{if $p.private}
|
||||
<div class="private">
|
||||
<a href="{url 'IDF_Views_Project::home', array($p.shortname)}">
|
||||
<img style="float:right" src="{media '/idf/img/lock.png'}" alt="{trans 'Private project'}" />
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if $p.current_activity_value}
|
||||
<div class="activity" title="{trans 'Project activity'}"><div class="bar" style="width: {$p.current_activity_value * 100}%"></div></div>
|
||||
{/if}
|
||||
</div>
|
||||
<p>
|
||||
<a href="{url 'IDF_Views_Project::home', array($p.shortname)}"><strong>{$p}</strong></a>
|
||||
{assign $url = $p.external_project_url}
|
||||
{if $url != ''}
|
||||
<a href="{$url}" target="_blank" class="external-link" title="{trans 'External link to project'}" /> </a>
|
||||
{/if}
|
||||
{if $p.private} - {trans 'Private project'}{/if}
|
||||
{if $p.private} - <span class="smaller">{trans 'Private project'}</span>{/if}
|
||||
</p>
|
||||
<p class="smaller">{$p.shortdesc}</p>
|
||||
<p class="smaller">{trans 'Labels:'}
|
||||
{assign $tags = $p.get_tags_list()}
|
||||
{if count($tags) == 0}{trans 'n/a'}{else}
|
||||
{foreach $p.get_tags_list() as $idx => $tag}
|
||||
{if $idx != 0}, {/if}
|
||||
<a class="label" href="{url 'IDF_Views::listProjects', array($tag->id)}">{$tag}</a>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</p>
|
||||
<p>{$p.shortdesc}</p>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/block}
|
Reference in New Issue
Block a user