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

View File

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

View File

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