Fixed issue 226, branches are displayed only on source tree view.
This commit is contained in:
parent
bc434504b1
commit
54b37ac5b6
@ -274,6 +274,7 @@ class IDF_Views_Source
|
|||||||
$diff = new IDF_Diff($cobject->changes);
|
$diff = new IDF_Diff($cobject->changes);
|
||||||
$diff->parse();
|
$diff->parse();
|
||||||
$scmConf = $request->conf->getVal('scm', 'git');
|
$scmConf = $request->conf->getVal('scm', 'git');
|
||||||
|
$in_branches = $scm->inBranches($commit, '');
|
||||||
return Pluf_Shortcuts_RenderToResponse('idf/source/commit.html',
|
return Pluf_Shortcuts_RenderToResponse('idf/source/commit.html',
|
||||||
array(
|
array(
|
||||||
'page_title' => $page_title,
|
'page_title' => $page_title,
|
||||||
@ -282,6 +283,7 @@ class IDF_Views_Source
|
|||||||
'cobject' => $cobject,
|
'cobject' => $cobject,
|
||||||
'commit' => $commit,
|
'commit' => $commit,
|
||||||
'branches' => $branches,
|
'branches' => $branches,
|
||||||
|
'tree_in' => $in_branches,
|
||||||
'scm' => $scmConf,
|
'scm' => $scmConf,
|
||||||
'rcommit' => $rcommit,
|
'rcommit' => $rcommit,
|
||||||
'large_commit' => $large,
|
'large_commit' => $large,
|
||||||
|
@ -38,13 +38,21 @@
|
|||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
{block context}
|
{block context}
|
||||||
{if $scm == 'git'}
|
{if $scm != 'svn'}
|
||||||
<p><strong>{trans 'Branches:'}</strong><br />
|
<p><strong>{trans 'Branches:'}</strong><br />
|
||||||
{foreach $branches as $branch}
|
{foreach $branches as $branch => $path}
|
||||||
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $branch)}
|
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
|
||||||
<span class="label{if $commit == $branch} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><br />
|
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><br />
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</p>
|
</p>
|
||||||
|
{else}
|
||||||
|
<form class="star" action="{url 'IDF_Views_Source_Svn::changelogRev', array($project.shortname)}" method="get">
|
||||||
|
<p><strong>{trans 'Revision:'}</strong> {$commit}</p>
|
||||||
|
<p>
|
||||||
|
<input accesskey="4" type="text" value="{$commit}" name="rev" size="5" />
|
||||||
|
<input type="submit" name="s" value="{trans 'Go to revision'}" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user