mirror of
https://github.com/klaussilveira/gitlist.git
synced 2026-07-12 20:41:27 +02:00
Merge pull request #777 from welljsjs/master
Added custom ssh port and fixed the base_path for cloning.
This commit is contained in:
@@ -23,6 +23,7 @@ show_ssh_remote = false ; display remote URL for SSH
|
||||
ssh_host = '' ; host to use for cloning via HTTP (default: none => uses gitlist web host)
|
||||
ssh_url_subdir = '' ; if cloning via SSH is triggered using special dir (e.g. ssh://example.com/git/repo.git)
|
||||
; has to end with trailing slash
|
||||
ssh_port = '' ; port to use for cloning via SSH (default: 22 => standard ssh port)
|
||||
ssh_user = 'git' ; user to use for cloning via SSH
|
||||
ssh_user_dynamic = false ; when enabled, ssh_user is set to $_SERVER['PHP_AUTH_USER']
|
||||
|
||||
@@ -54,4 +55,4 @@ http_user_dynamic = false ; when enabled, http_user is set to $_SERVER['PHP_AUTH
|
||||
; custom avatar service
|
||||
[avatar]
|
||||
; url = '//gravatar.com/avatar/'
|
||||
; query[] = 'd=identicon'
|
||||
; query[] = 'd=identicon'
|
||||
|
||||
@@ -83,6 +83,7 @@ class Application extends SilexApplication
|
||||
$twig->addGlobal('ssh_user', $config->get('clone_button', 'ssh_user_dynamic') ? $_SERVER['PHP_AUTH_USER'] : $config->get('clone_button', 'ssh_user'));
|
||||
$twig->addGlobal('ssh_url_subdir', $config->get('clone_button', 'ssh_url_subdir'));
|
||||
$twig->addGlobal('ssh_host', $config->get('clone_button', 'ssh_host'));
|
||||
$twig->addGlobal('ssh_port', $config->get('clone_button', 'ssh_port'));
|
||||
|
||||
return $twig;
|
||||
}));
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
<div class="col-sm-12">
|
||||
<div class="tab-border nav-tabs">
|
||||
{% if page in ['commits', 'searchcommits'] %}
|
||||
<form class="pull-right" action="{{ global.request.basepath }}/{{repo}}/commits/{{branch}}/search" method="POST">
|
||||
<form class="pull-right" action="{{ app.request.basepath }}/{{repo}}/commits/{{branch}}/search" method="POST">
|
||||
<input type="search" name="query" class="form-control input-sm" placeholder="Search commits...">
|
||||
</form>
|
||||
{% else %}
|
||||
<form class="pull-right" action="{{ global.request.basepath }}/{{repo}}/tree/{{branch}}/search" method="POST">
|
||||
<form class="pull-right" action="{{ app.request.basepath }}/{{repo}}/tree/{{branch}}/search" method="POST">
|
||||
<input type="search" name="query" class="form-control input-sm" placeholder="Search tree...">
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
{% endif %}
|
||||
</div><br />
|
||||
{% if show_ssh_remote %}
|
||||
<input type="text" class="form-control{{ show_ssh_remote ? ' visible' }}" id="clone-input-ssh" value="git clone {{ ssh_user }}{{ ssh_user ? '@' }}{{ ssh_host ? ssh_host : global.request.host }}:{{ ssh_url_subdir }}{{ repo }}">
|
||||
<input type="text" class="form-control{{ show_ssh_remote ? ' visible' }}" id="clone-input-ssh" value="git clone {{ ssh_port ? 'ssh://' }}{{ ssh_user }}{{ ssh_user ? '@' }}{{ ssh_host ? ssh_host : app.request.host }}:{{ ssh_port ? ssh_port ~ '/' : '' }}{{ ssh_url_subdir }}{{ repo }}">
|
||||
{% endif %}
|
||||
{% if show_http_remote %}
|
||||
<input type="text" class="form-control{{ show_ssh_remote is empty and show_http_remote ? ' visible' }}" id="clone-input-http" value="git clone http{{ use_https ? 's' }}://{{ http_user }}{{ http_user ? '@' }}{{ http_host ? http_host : global.request.host }}/{{ http_url_subdir }}{{ repo }}">
|
||||
<input type="text" class="form-control{{ show_ssh_remote is empty and show_http_remote ? ' visible' }}" id="clone-input-http" value="git clone http{{ use_https ? 's' }}://{{ http_user }}{{ http_user ? '@' }}{{ http_host ? http_host : app.request.host }}/{{ http_url_subdir }}{{ repo }}">
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
{% if page in ['commits', 'searchcommits'] %}
|
||||
<form class="form-search pull-right" action="{{ global.request.basepath }}/{{repo}}/commits/{{branch}}/search" method="POST">
|
||||
<form class="form-search pull-right" action="{{ app.request.basepath }}/{{repo}}/commits/{{branch}}/search" method="POST">
|
||||
<input type="text" name="query" class="input-medium search-query" placeholder="Search commits..." value="{{ query | default("") }}">
|
||||
</form>
|
||||
{% else %}
|
||||
<form class="form-search pull-right" action="{{ global.request.basepath }}/{{repo}}/tree/{{branch}}/search" method="POST">
|
||||
<form class="form-search pull-right" action="{{ app.request.basepath }}/{{repo}}/tree/{{branch}}/search" method="POST">
|
||||
<input type="text" name="query" class="input-medium search-query" placeholder="Search tree..." value="{{ query | default("") }}">
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
{% endif %}
|
||||
</div><br />
|
||||
{% if show_ssh_remote %}
|
||||
<input type="text" class="form-control{{ show_ssh_remote ? ' visible' }}" id="clone-input-ssh" value="git clone {{ ssh_user }}{{ ssh_user ? '@' }}{{ ssh_host ? ssh_host : global.request.host }}:{{ ssh_url_subdir }}{{ repo }}">
|
||||
<input type="text" class="form-control{{ show_ssh_remote ? ' visible' }}" id="clone-input-ssh" value="git clone {{ ssh_port ? 'ssh://' }}{{ ssh_user }}{{ ssh_user ? '@' }}{{ ssh_host ? ssh_host : app.request.host }}:{{ ssh_port ? ssh_port ~ '/' : '' }}{{ ssh_url_subdir }}{{ repo }}">
|
||||
{% endif %}
|
||||
{% if show_http_remote %}
|
||||
<input type="text" class="form-control{{ show_ssh_remote is empty and show_http_remote ? ' visible' }}" id="clone-input-http" value="git clone http{{ use_https ? 's' }}://{{ http_user }}{{ http_user ? '@' }}{{ http_host ? http_host : global.request.host }}/{{ http_url_subdir }}{{ repo }}">
|
||||
<input type="text" class="form-control{{ show_ssh_remote is empty and show_http_remote ? ' visible' }}" id="clone-input-http" value="git clone http{{ use_https ? 's' }}://{{ http_user }}{{ http_user ? '@' }}{{ http_host ? http_host : app.request.host }}/{{ http_url_subdir }}{{ repo }}">
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user