Fix the branch links users of the Subversion frontend get when they enter
a wrong revision and only display this list if there are any branches available for all SCMs.
This commit is contained in:
parent
2f30e4e2f6
commit
11a234e135
@ -31,6 +31,8 @@ or newer to properly run this version of Indefero!
|
||||
a new project or monotone key, in case an error popped up in the middle (issue 697)
|
||||
- Better error detection and reporting in the SyncMonotone plugin
|
||||
ATTENTION: This needs Pluf 46b7f251 or newer!
|
||||
- Fix the branch links users of the Subversion frontend get when they enter a wrong revision
|
||||
and only display this list if there are any branches available for all SCMs
|
||||
|
||||
## Documentation
|
||||
|
||||
|
@ -66,7 +66,8 @@ class IDF_Views_Source
|
||||
'commit' => $commit,
|
||||
'branches' => $branches,
|
||||
);
|
||||
return Pluf_Shortcuts_RenderToResponse('idf/source/invalid_revision.html',
|
||||
$scmConf = $request->conf->getVal('scm', 'git');
|
||||
return Pluf_Shortcuts_RenderToResponse('idf/source/'.$scmConf.'/invalid_revision.html',
|
||||
$params, $request);
|
||||
}
|
||||
|
||||
|
2
src/IDF/templates/idf/source/git/invalid_revision.html
Normal file
2
src/IDF/templates/idf/source/git/invalid_revision.html
Normal file
@ -0,0 +1,2 @@
|
||||
{extends "idf/source/invalid_revision.html"}
|
||||
|
@ -5,6 +5,7 @@
|
||||
<p>{blocktrans}The branch or revision <b>{$commit}</b> is not valid or does not exist
|
||||
in this repository.{/blocktrans}</p>
|
||||
|
||||
{if count($branches) > 0}
|
||||
<p>{blocktrans}The following list shows all available branches:{/blocktrans}</p>
|
||||
<ul>
|
||||
{foreach $branches as $branch => $path}
|
||||
@ -14,6 +15,7 @@ in this repository.{/blocktrans}</p>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{if $isOwner or $isMember}
|
||||
{aurl 'url', 'IDF_Views_Source::help', array($project.shortname)}
|
||||
|
@ -0,0 +1,2 @@
|
||||
{extends "idf/source/invalid_revision.html"}
|
||||
|
2
src/IDF/templates/idf/source/mtn/invalid_revision.html
Normal file
2
src/IDF/templates/idf/source/mtn/invalid_revision.html
Normal file
@ -0,0 +1,2 @@
|
||||
{extends "idf/source/invalid_revision.html"}
|
||||
|
30
src/IDF/templates/idf/source/svn/invalid_revision.html
Normal file
30
src/IDF/templates/idf/source/svn/invalid_revision.html
Normal file
@ -0,0 +1,30 @@
|
||||
{extends "idf/source/base.html"}
|
||||
{block docclass}yui-t2{assign $inError=true}{/block}
|
||||
{block body}
|
||||
|
||||
<p>{blocktrans}The revision <b>{$commit}</b> is not valid or does not exist
|
||||
in this repository.{/blocktrans}</p>
|
||||
|
||||
{if count($branches) > 0}
|
||||
<p>{blocktrans}The following list shows all available branches:{/blocktrans}</p>
|
||||
<ul>
|
||||
{foreach $branches as $branch => $path}
|
||||
{if $path}{aurl 'url', 'IDF_Views_Source::tree', array($project.shortname, 'HEAD', $path)}
|
||||
{else}{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, 'HEAD')}{/if}
|
||||
<li class="label">
|
||||
<a href="{$url}" class="label">{$branch}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{if $isOwner or $isMember}
|
||||
{aurl 'url', 'IDF_Views_Source::help', array($project.shortname)}
|
||||
<p>{blocktrans}If this is a new repository, the reason for this error
|
||||
could be that you have not committed and / or pushed any change so far.
|
||||
In this case please take a look at the <a href="{$url}">Help</a> page
|
||||
how to access your repository.{/blocktrans}</p>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
|
Loading…
Reference in New Issue
Block a user