Skip to content
Snippets Groups Projects
Commit d75cc7ea authored by Marin Jankovski's avatar Marin Jankovski Committed by Sytse Sijbrandij
Browse files

Display https as repo clone indicator and prevent modification of web_protocol variable.

Rewrite build_url, use web_protocol for repo indicator.

Explicitly initialize custom port to make the logic obvious.
parent 2ff36e74
No related branches found
No related tags found
1 merge request!1605Rewrite build_url, use web_protocol for repo indicator.
Loading
Loading
@@ -6,5 +6,5 @@
%li.right
.input-prepend.project_clone_holder
%button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH
%button{class: "btn small", :"data-clone" => @project.http_url_to_repo} HTTP
%button{class: "btn small", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
Loading
Loading
@@ -4,7 +4,7 @@
.form-horizontal
.input-prepend.project_clone_holder
%button{class: "btn small active", :"data-clone" => @project.ssh_url_to_repo} SSH
%button{class: "btn small", :"data-clone" => @project.http_url_to_repo} HTTP
%button{class: "btn small", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.web_protocol.upcase
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5"
.span4.right
.right
Loading
Loading
Loading
Loading
@@ -31,15 +31,17 @@ class Settings < Settingslogic
end
 
def build_url
raw_url = self.web_protocol
raw_url << "://"
raw_url << web_host
if web_custom_port?
raw_url << ":#{web_port}"
custom_port = ":#{web_port}"
else
custom_port = nil
end
raw_url
[
web_protocol,
"://",
web_host,
custom_port
].join('')
end
 
def ssh_port
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment