srchub

srchub Commit Details


Date:2016-04-04 19:59:52 (8 years 8 months ago)
Author:Natalie Adams
Branch:master
Commit:1fdddf2501a61b8e02fe3567a9b2d3430ccbe296
Parents: 4e94e60934ebae113d143a9765a784dc4b162f22
Message:Issue 150: Show public git url for projects

Changes:

File differences

indefero/src/IDF/Scm/Git.php
383383
384384
385385
386
387
386
387
388388
389389
390390
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)
indefero/src/IDF/templates/idf/source/git/help.html
2828
2929
3030
31
32
33
34
35
36
37
38
39
40
3141
3242
3343
{/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">
indefero/src/IDF/templates/idf/source/git/tree.html
5050
5151
5252
53
53
54
5455
5556
5657
</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}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05813s using 20 queries.