Fixed issue 210, sub-tabs links not follows the active branche in Source view.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{extends "idf/base.html"}
|
||||
{block tabsource} class="active"{/block}
|
||||
{block subtabs}
|
||||
{if array_key_exists($commit, $branches)}{assign $currentCommit = $commit}{else}{assign $currentCommit = $project.getScmRoot()}{/if}
|
||||
<div id="sub-tabs">
|
||||
<a {if $inSourceTree}class="active" {/if}href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $project.getScmRoot())}">{trans 'Source Tree'}</a> |
|
||||
<a {if $inChangeLog}class="active" {/if}href="{url 'IDF_Views_Source::changeLog', array($project.shortname, $project.getScmRoot())}">{trans 'Change Log'}</a>
|
||||
<a {if $inSourceTree}class="active" {/if}href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $currentCommit)}">{trans 'Source Tree'}</a> |
|
||||
<a {if $inChangeLog}class="active" {/if}href="{url 'IDF_Views_Source::changeLog', array($project.shortname, $currentCommit)}">{trans 'Change Log'}</a>
|
||||
{if $inCommit}| {trans 'Commit'}{/if} |
|
||||
<a {if $inHelp}class="active" {/if}href="{url 'IDF_Views_Source::help', array($project.shortname)}">{trans 'How To Get The Code'}</a>
|
||||
</div>
|
||||
|
@@ -27,12 +27,13 @@
|
||||
</tbody>
|
||||
</table>
|
||||
{/block}
|
||||
|
||||
{block context}
|
||||
{if $scm != 'svn'}
|
||||
<p><strong>{trans 'Branches:'}</strong><br />
|
||||
{foreach $branches as $branch}
|
||||
{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $branch)}
|
||||
<span class="label{if $commit == $branch} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><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">{$branch}</a></span><br />
|
||||
{/foreach}
|
||||
</p>
|
||||
{else}
|
||||
|
Reference in New Issue
Block a user