diff --git a/src/IDF/Scm/Git.php b/src/IDF/Scm/Git.php index acb57ed..9824644 100644 --- a/src/IDF/Scm/Git.php +++ b/src/IDF/Scm/Git.php @@ -75,7 +75,12 @@ class IDF_Scm_Git extends IDF_Scm } $res = array(); foreach ($out as $b) { - $res[substr($b, 2)] = ''; + $b = substr($b, 2); + if (false !== strpos($b, '/')) { + $res[$this->getCommit($b)->commit] = $b; + } else { + $res[$b] = ''; + } } $this->cache['branches'] = $res; return $res; diff --git a/src/IDF/Views/Source.php b/src/IDF/Views/Source.php index 334ffe8..2f0d5c7 100644 --- a/src/IDF/Views/Source.php +++ b/src/IDF/Views/Source.php @@ -94,7 +94,7 @@ class IDF_Views_Source $rchanges = new Pluf_Template_ContextVars($rchanges); $scmConf = $request->conf->getVal('scm', 'git'); $in_branches = $scm->inBranches($commit, ''); - return Pluf_Shortcuts_RenderToResponse('idf/source/changelog.html', + return Pluf_Shortcuts_RenderToResponse('idf/source/'.$scmConf.'/changelog.html', array( 'page_title' => $title, 'title' => $title, diff --git a/src/IDF/templates/idf/source/changelog.html b/src/IDF/templates/idf/source/changelog.html index 4a9a77e..971d3ba 100644 --- a/src/IDF/templates/idf/source/changelog.html +++ b/src/IDF/templates/idf/source/changelog.html @@ -27,23 +27,3 @@ {/block} - -{block context} -{if $scm != 'svn'} -
{trans 'Branches:'}
-{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
-{$branch}
-{/foreach}
-
{trans 'Branches:'}
+{foreach $branches as $branch => $path}
+{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
+{if $path}{$path}{else}{$branch}{/if}
+{/foreach}
+
{trans 'Branches:'}
{foreach $branches as $branch => $path}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
-{$branch}
+{if $path}{$path}{else}{$branch}{/if}
{/foreach}
{trans 'Branches:'}
{foreach $branches as $branch => $path}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
-{$branch}
+{if $path}{$path}{else}{$branch}{/if}
{/foreach}
{trans 'Branches:'}
+{foreach $branches as $branch => $path}
+{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
+{$branch}
+{/foreach}
+