Commit 36a69b0a309e140cbf87e26422d22b6a634d12c0
1 parent
43dbd798
Exists in
master
and in
4 other branches
Update git-clone js. Use new style on wiki git access too
Showing
3 changed files
with
28 additions
and
88 deletions
Show diff stats
app/assets/javascripts/project.js.coffee
| @@ -6,10 +6,10 @@ class Project | @@ -6,10 +6,10 @@ class Project | ||
| 6 | 6 | ||
| 7 | @initEvents() | 7 | @initEvents() |
| 8 | 8 | ||
| 9 | - | 9 | + |
| 10 | initEvents: -> | 10 | initEvents: -> |
| 11 | disableButtonIfEmptyField '#project_name', '.project-submit' | 11 | disableButtonIfEmptyField '#project_name', '.project-submit' |
| 12 | - | 12 | + |
| 13 | $('#project_issues_enabled').change -> | 13 | $('#project_issues_enabled').change -> |
| 14 | if ($(this).is(':checked') == true) | 14 | if ($(this).is(':checked') == true) |
| 15 | $('#project_issues_tracker').removeAttr('disabled') | 15 | $('#project_issues_tracker').removeAttr('disabled') |
| @@ -29,7 +29,7 @@ class Project | @@ -29,7 +29,7 @@ class Project | ||
| 29 | 29 | ||
| 30 | $ -> | 30 | $ -> |
| 31 | # Git clone panel switcher | 31 | # Git clone panel switcher |
| 32 | - scope = $ '.project_clone_holder' | 32 | + scope = $ '.git-clone-holder' |
| 33 | if scope.length > 0 | 33 | if scope.length > 0 |
| 34 | $('a, button', scope).click -> | 34 | $('a, button', scope).click -> |
| 35 | $('a, button', scope).removeClass 'active' | 35 | $('a, button', scope).removeClass 'active' |
app/views/projects/_clone_panel.html.haml
| @@ -1,56 +0,0 @@ | @@ -1,56 +0,0 @@ | ||
| 1 | -.project_clone_panel | ||
| 2 | - .row | ||
| 3 | - .span8 | ||
| 4 | - .form-horizontal= render "shared/clone_panel" | ||
| 5 | - .span3.pull-right | ||
| 6 | - .pull-right | ||
| 7 | - - unless @project.empty_repo? | ||
| 8 | - - if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace | ||
| 9 | - - if current_user.already_forked?(@project) | ||
| 10 | - = link_to project_path(current_user.fork_of(@project)), class: 'btn grouped disabled' do | ||
| 11 | - %i.icon-code-fork | ||
| 12 | - Forked | ||
| 13 | - - else | ||
| 14 | - = link_to fork_project_path(@project), title: "Fork", class: "btn grouped", method: "POST" do | ||
| 15 | - %i.icon-code-fork | ||
| 16 | - Fork | ||
| 17 | - - if can? current_user, :download_code, @project | ||
| 18 | - = link_to archive_project_repository_path(@project), class: "btn grouped" do | ||
| 19 | - %i.icon-download-alt | ||
| 20 | - %span.only-wide Download | ||
| 21 | - | ||
| 22 | - - if current_user | ||
| 23 | - .dropdown.pull-right | ||
| 24 | - %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} | ||
| 25 | - %i.icon-plus-sign-alt | ||
| 26 | - %span.only-wide New | ||
| 27 | - %b.caret | ||
| 28 | - %ul.dropdown-menu | ||
| 29 | - - if @project.issues_enabled && can?(current_user, :write_issue, @project) | ||
| 30 | - %li | ||
| 31 | - = link_to url_for_new_issue, title: "New Issue" do | ||
| 32 | - Issue | ||
| 33 | - - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) | ||
| 34 | - %li | ||
| 35 | - = link_to new_project_merge_request_path(@project), title: "New Merge Request" do | ||
| 36 | - Merge Request | ||
| 37 | - - if @project.snippets_enabled && can?(current_user, :write_snippet, @project) | ||
| 38 | - %li | ||
| 39 | - = link_to new_project_snippet_path(@project), title: "New Snippet" do | ||
| 40 | - Snippet | ||
| 41 | - - if can? current_user, :push_code, @project | ||
| 42 | - %li.divider | ||
| 43 | - %li | ||
| 44 | - = link_to new_project_branch_path(@project) do | ||
| 45 | - %i.icon-code-fork | ||
| 46 | - Git branch | ||
| 47 | - %li | ||
| 48 | - = link_to new_project_tag_path(@project) do | ||
| 49 | - %i.icon-tag | ||
| 50 | - Git tag | ||
| 51 | - | ||
| 52 | - - if can?(current_user, :admin_team_member, @project) | ||
| 53 | - %li.divider | ||
| 54 | - %li | ||
| 55 | - = link_to new_project_team_member_path(@project), title: "New project member" do | ||
| 56 | - Project member |
app/views/projects/wikis/git_access.html.haml
| @@ -2,35 +2,31 @@ | @@ -2,35 +2,31 @@ | ||
| 2 | %h3.page-title | 2 | %h3.page-title |
| 3 | Git access for | 3 | Git access for |
| 4 | %strong= @gollum_wiki.path_with_namespace | 4 | %strong= @gollum_wiki.path_with_namespace |
| 5 | - = render 'main_links' | ||
| 6 | 5 | ||
| 7 | -.content | ||
| 8 | - .project_clone_panel | ||
| 9 | - .row | ||
| 10 | - .span7 | ||
| 11 | - .form-horizontal | ||
| 12 | - .input-prepend.project_clone_holder | ||
| 13 | - %button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH | ||
| 14 | - %button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= gitlab_config.protocol.upcase | ||
| 15 | - = text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true | ||
| 16 | - .git-empty | ||
| 17 | - %fieldset | ||
| 18 | - %legend Install Gollum: | ||
| 19 | - %pre.dark | ||
| 20 | - :preserve | ||
| 21 | - gem install gollum | 6 | + .form-horizontal.pull-right |
| 7 | + .git-clone-holder | ||
| 8 | + %button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH | ||
| 9 | + %button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= gitlab_config.protocol.upcase | ||
| 10 | + = text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true | ||
| 22 | 11 | ||
| 23 | - %legend Clone Your Wiki: | ||
| 24 | - %pre.dark | ||
| 25 | - :preserve | ||
| 26 | - git clone #{@gollum_wiki.ssh_url_to_repo} | ||
| 27 | - cd #{@gollum_wiki.path} | 12 | +.git-empty |
| 13 | + %fieldset | ||
| 14 | + %legend Install Gollum: | ||
| 15 | + %pre.dark | ||
| 16 | + :preserve | ||
| 17 | + gem install gollum | ||
| 28 | 18 | ||
| 29 | - %legend Start Gollum And Edit Locally: | ||
| 30 | - %pre.dark | ||
| 31 | - :preserve | ||
| 32 | - gollum | ||
| 33 | - == Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin | ||
| 34 | - >> Thin web server (v1.5.0 codename Knife) | ||
| 35 | - >> Maximum connections set to 1024 | ||
| 36 | - >> Listening on 0.0.0.0:4567, CTRL+C to stop | 19 | + %legend Clone Your Wiki: |
| 20 | + %pre.dark | ||
| 21 | + :preserve | ||
| 22 | + git clone #{@gollum_wiki.ssh_url_to_repo} | ||
| 23 | + cd #{@gollum_wiki.path} | ||
| 24 | + | ||
| 25 | + %legend Start Gollum And Edit Locally: | ||
| 26 | + %pre.dark | ||
| 27 | + :preserve | ||
| 28 | + gollum | ||
| 29 | + == Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin | ||
| 30 | + >> Thin web server (v1.5.0 codename Knife) | ||
| 31 | + >> Maximum connections set to 1024 | ||
| 32 | + >> Listening on 0.0.0.0:4567, CTRL+C to stop |