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 ...@@ -6,10 +6,10 @@ class Project
@initEvents() @initEvents()
initEvents: -> initEvents: ->
disableButtonIfEmptyField '#project_name', '.project-submit' disableButtonIfEmptyField '#project_name', '.project-submit'
$('#project_issues_enabled').change -> $('#project_issues_enabled').change ->
if ($(this).is(':checked') == true) if ($(this).is(':checked') == true)
$('#project_issues_tracker').removeAttr('disabled') $('#project_issues_tracker').removeAttr('disabled')
...@@ -29,7 +29,7 @@ class Project ...@@ -29,7 +29,7 @@ class Project
$ -> $ ->
# Git clone panel switcher # Git clone panel switcher
scope = $ '.project_clone_holder' scope = $ '.git-clone-holder'
if scope.length > 0 if scope.length > 0
$('a, button', scope).click -> $('a, button', scope).click ->
$('a, button', scope).removeClass 'active' $('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 @@ ...@@ -2,35 +2,31 @@
%h3.page-title %h3.page-title
Git access for Git access for
%strong= @gollum_wiki.path_with_namespace %strong= @gollum_wiki.path_with_namespace
= render 'main_links'
.content .form-horizontal.pull-right
.project_clone_panel .git-clone-holder
.row %button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH
.span7 %button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= gitlab_config.protocol.upcase
.form-horizontal = text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true
.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
%legend Clone Your Wiki: .git-empty
%pre.dark %fieldset
:preserve %legend Install Gollum:
git clone #{@gollum_wiki.ssh_url_to_repo} %pre.dark
cd #{@gollum_wiki.path} :preserve
gem install gollum
%legend Start Gollum And Edit Locally: %legend Clone Your Wiki:
%pre.dark %pre.dark
:preserve :preserve
gollum git clone #{@gollum_wiki.ssh_url_to_repo}
== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin cd #{@gollum_wiki.path}
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024 %legend Start Gollum And Edit Locally:
>> Listening on 0.0.0.0:4567, CTRL+C to stop %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