Properly activate the correct branches / tags for the currently viewed revision

This commit is contained in:
Thomas Keller 2010-04-30 02:38:45 +02:00
parent 601e894935
commit c49a8204e0
3 changed files with 42 additions and 30 deletions

View File

@ -1,20 +1,24 @@
{extends "idf/source/changelog.html"} {extends "idf/source/changelog.html"}
{block context} {block context}
<p><strong>{trans 'Branches:'}</strong><br/> <p><strong>{trans 'Branches:'}</strong><br/>
{foreach $branches as $branch => $path} {foreach $branches as $selector => $branch}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)} {aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label" title="{if $path}{$path}{else}{$branch}{/if}"> <span class="label{if in_array($branch, $tree_in)} active{/if}">
{if $path}{$path|shorten:25}{else}{$branch|shorten:25}{/if} <a href="{$url}" class="label" title="{$branch}">
</a></span><br/> {$branch|shorten:25}
</a>
</span><br/>
{/foreach} {/foreach}
</p> </p>
{if $tags} {if $tags}
<p><strong>{trans 'Tags:'}</strong><br/> <p><strong>{trans 'Tags:'}</strong><br/>
{foreach $tags as $tag => $path} {foreach $tags as $selector => $tag}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $tag)} {aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
<span class="label{if in_array($tag, $tags_in)} active{/if}"><a href="{$url}" class="label" title="{if $path}{$path}{else}{$tag}{/if}"> <span class="label{if in_array($tag, $tags_in)} active{/if}">
{if $path}{$path|shorten:25}{else}{$tag|shorten:25}{/if} <a href="{$url}" class="label" title="{$tag}">
</a></span><br/> {$tag|shorten:25}
</a>
</span><br/>
{/foreach} {/foreach}
</p> </p>
{/if} {/if}

View File

@ -23,20 +23,24 @@
{/block} {/block}
{block context} {block context}
<p><strong>{trans 'Branches:'}</strong><br/> <p><strong>{trans 'Branches:'}</strong><br/>
{foreach $branches as $branch => $path} {foreach $branches as $selector => $branch}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)} {aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label" title="{if $path}{$path}{else}{$branch}{/if}"> <span class="label{if in_array($branch, $tree_in)} active{/if}">
{if $path}{$path|shorten:25}{else}{$branch|shorten:25}{/if} <a href="{$url}" class="label" title="{$branch}">
</a></span><br/> {$branch|shorten:25}
</a>
</span><br/>
{/foreach} {/foreach}
</p> </p>
{if $tags} {if $tags}
<p><strong>{trans 'Tags:'}</strong><br/> <p><strong>{trans 'Tags:'}</strong><br/>
{foreach $tags as $tag => $path} {foreach $tags as $selector => $tag}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $tag)} {aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
<span class="label{if in_array($tag, $tags_in)} active{/if}"><a href="{$url}" class="label" title="{if $path}{$path}{else}{$tag}{/if}"> <span class="label{if in_array($tag, $tags_in)} active{/if}">
{if $path}{$path|shorten:25}{else}{$tag|shorten:25}{/if} <a href="{$url}" class="label" title="{$tag}">
</a></span><br/> {$tag|shorten:25}
</a>
</span><br/>
{/foreach} {/foreach}
</p> </p>
{/if} {/if}

View File

@ -56,20 +56,24 @@
{/block} {/block}
{block context} {block context}
<p><strong>{trans 'Branches:'}</strong><br/> <p><strong>{trans 'Branches:'}</strong><br/>
{foreach $branches as $branch => $path} {foreach $branches as $selector => $branch}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)} {aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label" title="{if $path}{$path}{else}{$branch}{/if}"> <span class="label{if in_array($branch, $tree_in)} active{/if}">
{if $path}{$path|shorten:25}{else}{$branch|shorten:25}{/if} <a href="{$url}" class="label" title="{$branch}">
</a></span><br/> {$branch|shorten:25}
</a>
</span><br/>
{/foreach} {/foreach}
</p> </p>
{if $tags} {if $tags}
<p><strong>{trans 'Tags:'}</strong><br/> <p><strong>{trans 'Tags:'}</strong><br/>
{foreach $tags as $tag => $path} {foreach $tags as $selector => $tag}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $tag)} {aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
<span class="label{if in_array($tag, $tags_in)} active{/if}"><a href="{$url}" class="label" title="{if $path}{$path}{else}{$tag}{/if}"> <span class="label{if in_array($tag, $tags_in)} active{/if}">
{if $path}{$path|shorten:25}{else}{$tag|shorten:25}{/if} <a href="{$url}" class="label" title="{$tag}">
</a></span><br/> {$tag|shorten:25}
</a>
</span><br/>
{/foreach} {/foreach}
</p> </p>
{/if} {/if}