Issue 150: Show public git url for projects
This commit is contained in:
parent
4e94e60934
commit
1fdddf2501
@ -383,8 +383,8 @@ class IDF_Scm_Git extends IDF_Scm
|
||||
|
||||
public static function getAuthAccessUrl($project, $user, $commit=null)
|
||||
{
|
||||
// if the user haven't registred a public ssh key,
|
||||
// he can't use the write url which use the SSH authentification
|
||||
// if the user haven't registered a public ssh key,
|
||||
// he can't use the write url which use the SSH authentication
|
||||
if ($user != null) {
|
||||
$keys = $user->get_idf_key_list();
|
||||
if (count ($keys) == 0)
|
||||
|
@ -28,6 +28,16 @@ git push origin master
|
||||
|
||||
{/if}
|
||||
|
||||
{if !$project.private}
|
||||
<h3>Public access</h3>
|
||||
|
||||
<p>The following URL provides anonymous public access to the repository.</p>
|
||||
|
||||
<p>The URL will not work if your project is private.</p>
|
||||
|
||||
<kbd>git clone {$project.getRemoteAccessUrl()}</kbd>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
<div class="issue-submit-info">
|
||||
|
@ -50,7 +50,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
{aurl 'url', 'IDF_Views_Source::download', array($project.shortname, $commit)}
|
||||
<p class="right soft"><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}">{trans 'Download this version'}</a> {trans 'or'} <kbd>git clone {$project.getSourceAccessUrl($user)}</kbd> <a href="{url 'IDF_Views_Source::help', array($project.shortname)}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/help.png'}" alt="{trans 'Help'}" /></a></p>
|
||||
<p class="right soft"><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}">{trans 'Download this version'}</a> {trans 'or'}
|
||||
<kbd>git clone {$project.getSourceAccessUrl($user)}</kbd> <a href="{url 'IDF_Views_Source::help', array($project.shortname)}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/help.png'}" alt="{trans 'Help'}" /></a></p>
|
||||
|
||||
|
||||
{/block}
|
||||
|
Loading…
Reference in New Issue
Block a user