Custom forge page rendering with project listing, home link,
improved contextual help.
This commit is contained in:
@@ -46,8 +46,19 @@
|
||||
{/block}
|
||||
|
||||
{block context}
|
||||
{assign $eurl = 'http://michelf.com/projects/php-markdown/extra/'}
|
||||
{assign $burl = 'http://daringfireball.net/projects/markdown/syntax'}
|
||||
<div class="issue-submit-info">
|
||||
<p>{blocktrans}You can define a custom forge start page that is displayed instead of the standard project listing.{/blocktrans}</p>
|
||||
{blocktrans}
|
||||
<p><strong>Instructions:</strong></p>
|
||||
<p>You can set up a custom forge page that is used as entry page for the forge instead of the plain project listing. This page is then also accessible via the 'Home' link in main menu bar.</p>
|
||||
<p>The content of the page can use the <a href="{$burl}">Markdown syntax</a> with the <a href="{$eurl}"><em>Extra</em> extension</a>.</p>
|
||||
<p>Additionally, the following macros are available:<br />
|
||||
<ul>
|
||||
<li><code>{literal}{{/literal}projectlist, label=..., order=(name|activity), limit=...}</code> - Renders a project list that can optionally be filtered by label, ordered by 'name' or 'activity' and / or limited to a specific number of projects.</li>
|
||||
</ul>
|
||||
</p>
|
||||
{/blocktrans}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<a href="{url 'IDF_Views::listProjects', array('all', 'name')}" class="active">{trans 'Projects'}</a>
|
||||
{/block}
|
||||
{block body}
|
||||
{markdown_forge $content}
|
||||
{markdown_forge $content, $request}
|
||||
{/block}
|
||||
|
||||
{block context}{/block}
|
||||
|
@@ -7,44 +7,7 @@
|
||||
{aurl 'url', 'IDF_Views_Admin::projectCreate'}
|
||||
<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-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}
|
||||
{assign $activity = $p.current_activity_value * 100}
|
||||
<div class="activity" title="{blocktrans}Project activity: {$activity}%{/blocktrans}"><div class="bar" style="width: {$activity}%"></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} - <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 => $label}
|
||||
{if $idx != 0}, {/if}
|
||||
<a class="label" href="{url 'IDF_Views::listProjectsByLabel', array($label->id, $order)}">{$label}</a>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
{include 'idf/project-list.html'}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
41
src/IDF/templates/idf/project-list.html
Normal file
41
src/IDF/templates/idf/project-list.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<div class="p-list">
|
||||
{foreach $projects as $p}
|
||||
<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}
|
||||
{assign $activity = $p.current_activity_value * 100}
|
||||
<div class="activity" title="{blocktrans}Project activity: {$activity}%{/blocktrans}"><div class="bar" style="width: {$activity}%"></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} - <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 => $label}
|
||||
{if $idx != 0}, {/if}
|
||||
<a class="label" href="{url 'IDF_Views::listProjectsByLabel', array($label->id, $order)}">{$label}</a>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div style="clear:both"></div>
|
||||
</div>
|
Reference in New Issue
Block a user