From 54b37ac5b61b8e201ca1228a798768d5a0f27dc5 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Tue, 26 May 2009 21:59:02 +0200 Subject: [PATCH] Fixed issue 226, branches are displayed only on source tree view. --- src/IDF/Views/Source.php | 2 ++ src/IDF/templates/idf/source/commit.html | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/IDF/Views/Source.php b/src/IDF/Views/Source.php index 85301ba..fc78301 100644 --- a/src/IDF/Views/Source.php +++ b/src/IDF/Views/Source.php @@ -274,6 +274,7 @@ class IDF_Views_Source $diff = new IDF_Diff($cobject->changes); $diff->parse(); $scmConf = $request->conf->getVal('scm', 'git'); + $in_branches = $scm->inBranches($commit, ''); return Pluf_Shortcuts_RenderToResponse('idf/source/commit.html', array( 'page_title' => $page_title, @@ -282,6 +283,7 @@ class IDF_Views_Source 'cobject' => $cobject, 'commit' => $commit, 'branches' => $branches, + 'tree_in' => $in_branches, 'scm' => $scmConf, 'rcommit' => $rcommit, 'large_commit' => $large, diff --git a/src/IDF/templates/idf/source/commit.html b/src/IDF/templates/idf/source/commit.html index 56e8ac1..7905eb4 100644 --- a/src/IDF/templates/idf/source/commit.html +++ b/src/IDF/templates/idf/source/commit.html @@ -38,13 +38,21 @@ {/block} {block context} -{if $scm == 'git'} +{if $scm != 'svn'}

{trans 'Branches:'}
-{foreach $branches as $branch} -{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $branch)} -{$branch}
+{foreach $branches as $branch => $path} +{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)} +{$branch}
{/foreach}

+{else} +
+

{trans 'Revision:'} {$commit}

+

+ + +

+
{/if} {/block}