Epic: Gitlab configuration with default values
This commit is contained in:
parent
b3a0ee8e63
commit
9b337b8328
25 changed files with 147 additions and 45 deletions
|
@ -13,7 +13,7 @@
|
|||
Path
|
||||
.input
|
||||
.input-prepend
|
||||
%span.add-on= "#{GIT_HOST["git_user"]}@#{GIT_HOST["host"]}:"
|
||||
%span.add-on= Gitlab.config.ssh_path
|
||||
= f.text_field :path, :placeholder => "example_project", :disabled => !@admin_project.new_record?
|
||||
.clearfix
|
||||
= f.label :code do
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
Git Clone
|
||||
.input
|
||||
.input-prepend
|
||||
%span.add-on= "#{GIT_HOST["git_user"]}@#{GIT_HOST["host"]}:"
|
||||
%span.add-on= Gitlab.config.ssh_path
|
||||
= f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record?
|
||||
%span.add-on= ".git"
|
||||
.clearfix
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
Git Clone
|
||||
.input
|
||||
.input-prepend
|
||||
%span.add-on= "#{GIT_HOST["git_user"]}@#{GIT_HOST["host"]}:"
|
||||
%span.add-on= Gitlab.config.ssh_path
|
||||
= f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record?
|
||||
%span.add-on= ".git"
|
||||
.clearfix
|
||||
|
|
|
@ -4,8 +4,11 @@
|
|||
.row
|
||||
.span7
|
||||
.form-horizontal
|
||||
.input-prepend
|
||||
.input-prepend.project_clone_holder
|
||||
|
||||
%span.add-on git clone
|
||||
= link_to "SSH", "#", :class => "btn small active", :"data-clone" => @project.ssh_url_to_repo
|
||||
= link_to "HTTP", "#", :class => "btn small", :"data-clone" => @project.http_url_to_repo
|
||||
= text_field_tag :project_clone, @project.url_to_repo, :class => "one_click_select span5"
|
||||
.span4.right
|
||||
.right
|
||||
|
@ -23,4 +26,12 @@
|
|||
= render "events/event_last_push", :event => @last_push
|
||||
.content_list= render @events
|
||||
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
var link_sel = ".project_clone_holder a";
|
||||
$(link_sel).bind("click", function() {
|
||||
$(link_sel).removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$("#project_clone").val($(this).attr("data-clone"));
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue