Commit 36a69b0a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Update git-clone js. Use new style on wiki git access too

parent 43dbd798
......@@ -6,10 +6,10 @@ class Project
@initEvents()
initEvents: ->
disableButtonIfEmptyField '#project_name', '.project-submit'
$('#project_issues_enabled').change ->
if ($(this).is(':checked') == true)
$('#project_issues_tracker').removeAttr('disabled')
......@@ -29,7 +29,7 @@ class Project
$ ->
# Git clone panel switcher
scope = $ '.project_clone_holder'
scope = $ '.git-clone-holder'
if scope.length > 0
$('a, button', scope).click ->
$('a, button', scope).removeClass 'active'
......
.project_clone_panel
.row
.span8
.form-horizontal= render "shared/clone_panel"
.span3.pull-right
.pull-right
- unless @project.empty_repo?
- if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
- if current_user.already_forked?(@project)
= link_to project_path(current_user.fork_of(@project)), class: 'btn grouped disabled' do
%i.icon-code-fork
Forked
- else
= link_to fork_project_path(@project), title: "Fork", class: "btn grouped", method: "POST" do
%i.icon-code-fork
Fork
- if can? current_user, :download_code, @project
= link_to archive_project_repository_path(@project), class: "btn grouped" do
%i.icon-download-alt
%span.only-wide Download
- if current_user
.dropdown.pull-right
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%i.icon-plus-sign-alt
%span.only-wide New
%b.caret
%ul.dropdown-menu
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
%li
= link_to url_for_new_issue, title: "New Issue" do
Issue
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
%li
= link_to new_project_merge_request_path(@project), title: "New Merge Request" do
Merge Request
- if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
%li
= link_to new_project_snippet_path(@project), title: "New Snippet" do
Snippet
- if can? current_user, :push_code, @project
%li.divider
%li
= link_to new_project_branch_path(@project) do
%i.icon-code-fork
Git branch
%li
= link_to new_project_tag_path(@project) do
%i.icon-tag
Git tag
- if can?(current_user, :admin_team_member, @project)
%li.divider
%li
= link_to new_project_team_member_path(@project), title: "New project member" do
Project member
......@@ -2,35 +2,31 @@
%h3.page-title
Git access for
%strong= @gollum_wiki.path_with_namespace
= render 'main_links'
.content
.project_clone_panel
.row
.span7
.form-horizontal
.input-prepend.project_clone_holder
%button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH
%button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= gitlab_config.protocol.upcase
= text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true
.git-empty
%fieldset
%legend Install Gollum:
%pre.dark
:preserve
gem install gollum
.form-horizontal.pull-right
.git-clone-holder
%button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH
%button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= gitlab_config.protocol.upcase
= text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true
%legend Clone Your Wiki:
%pre.dark
:preserve
git clone #{@gollum_wiki.ssh_url_to_repo}
cd #{@gollum_wiki.path}
.git-empty
%fieldset
%legend Install Gollum:
%pre.dark
:preserve
gem install gollum
%legend Start Gollum And Edit Locally:
%pre.dark
:preserve
gollum
== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
%legend Clone Your Wiki:
%pre.dark
:preserve
git clone #{@gollum_wiki.ssh_url_to_repo}
cd #{@gollum_wiki.path}
%legend Start Gollum And Edit Locally:
%pre.dark
:preserve
gollum
== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment