Change Details
| src/IDF/Project.php |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | /** |
| 353 | * Get the access url to the repository. |
| 354 | * |
| 355 | * This will return the right url based on the user. |
| 356 | * |
| 357 | * @param Pluf_User The user (null) |
| 358 | */ |
| 359 | public function getSourceAccessUrl($user=null) |
| 360 | { |
| 361 | $right = $this->getConf()->getVal('source_access_rights', 'all'); |
| 362 | if (($user == null or $user->isAnonymous()) |
| 363 | and $right == 'all' and !$this->private) { |
| 364 | return $this->getRemoteAccessUrl(); |
| 365 | } |
| 366 | return $this->getWriteRemoteAccessUrl($user); |
| 367 | } |
| 368 | |
| 369 | |
| 370 | /** |
| 353 | 371 | * Get the remote access url to the repository. |
| 354 | 372 | * |
| 373 | * This will always return the anonymous access url. |
| 355 | 374 | */ |
| 356 | 375 | public function getRemoteAccessUrl() |
| 357 | 376 | { |
| src/IDF/templates/idf/source/git/help.html |
| 8 | 8 | |
| 9 | 9 | <h3>{trans 'Command-Line Access'}</h3> |
| 10 | 10 | |
| 11 | | <p><kbd>git clone {if $project.private}{$project.getWriteRemoteAccessUrl($user)}{else}{$project.getRemoteAccessUrl()}{/if}</kbd></p> |
| 11 | <p><kbd>git clone {$project.getSourceAccessUrl($user)}</kbd></p> |
| 12 | 12 | |
| 13 | 13 | {aurl 'url', 'IDF_Views_User::myAccount'} |
| 14 | 14 | <p>{blocktrans}You may need to <a href="{$url}">provide your SSH key</a>. The synchronization of your SSH key can take a couple of minutes. You can learn more about <a href="http://www.google.com/search?q=public+ssh+key+authentication">SSH key authentification</a>.{/blocktrans}</p> |
| src/IDF/templates/idf/source/git/tree.html |
| 47 | 47 | </tbody> |
| 48 | 48 | </table> |
| 49 | 49 | {aurl 'url', 'IDF_Views_Source::download', array($project.shortname, $commit)} |
| 50 | | <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 {if $project.private}{$project.getWriteRemoteAccessUrl($user)}{else}{$project.getRemoteAccessUrl()}{/if}</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> |
| 50 | <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> |
| 51 | 51 | |
| 52 | 52 | |
| 53 | 53 | {/block} |
Download the corresponding diff file