BigW Consortium Gitlab

Commit a950783a by Sytse Sijbrandij

Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce

parents 0f673bb7 350877d0
...@@ -2,21 +2,26 @@ ...@@ -2,21 +2,26 @@
-# only show edit link for text files -# only show edit link for text files
- if @blob.text? - if @blob.text?
- if allowed_tree_edit? - if allowed_tree_edit?
= link_to "edit", project_edit_tree_path(@project, @id), class: "btn btn-small" = link_to 'Edit', project_edit_tree_path(@project, @id),
class: 'btn btn-small'
- else - else
%span.btn.btn-small.disabled edit %span.btn.btn-small.disabled Edit
= link_to "raw", project_raw_path(@project, @id), class: "btn btn-small", target: "_blank" = link_to 'Raw', project_raw_path(@project, @id),
class: 'btn btn-small', target: '_blank'
-# only show normal/blame view links for text files -# only show normal/blame view links for text files
- if @blob.text? - if @blob.text?
- if current_page? project_blame_path(@project, @id) - if current_page? project_blame_path(@project, @id)
= link_to "normal view", project_blob_path(@project, @id), class: "btn btn-small" = link_to 'Normal View', project_blob_path(@project, @id),
class: 'btn btn-small'
- else - else
= link_to "blame", project_blame_path(@project, @id), class: "btn btn-small" unless @blob.empty? = link_to 'Blame', project_blame_path(@project, @id),
= link_to "history", project_commits_path(@project, @id), class: "btn btn-small" class: 'btn btn-small' unless @blob.empty?
= link_to 'History', project_commits_path(@project, @id),
class: 'btn btn-small'
- if @ref != @commit.sha - if @ref != @commit.sha
= link_to 'permalink', project_blob_path(@project, = link_to 'Permalink', project_blob_path(@project,
tree_join(@commit.sha, @path)), class: 'btn btn-small' tree_join(@commit.sha, @path)), class: 'btn btn-small'
- if allowed_tree_edit? - if allowed_tree_edit?
= link_to '#modal-remove-blob', class: "remove-blob btn btn-small btn-remove", "data-toggle" => "modal" do = link_to '#modal-remove-blob', class: "remove-blob btn btn-small btn-remove", "data-toggle" => "modal" do
remove Remove
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
= link_to @commit.short_id, project_commit_path(@project, @commit) = link_to @commit.short_id, project_commit_path(@project, @commit)
– –
= truncate(@commit.title, length: 50) = truncate(@commit.title, length: 50)
= link_to "history", project_commits_path(@project, @id), class: "pull-right" = link_to 'History', project_commits_path(@project, @id), class: 'pull-right'
- if @path.present? - if @path.present?
%tr.tree-item %tr.tree-item
......
...@@ -17,7 +17,7 @@ Feature: Project Browse files ...@@ -17,7 +17,7 @@ Feature: Project Browse files
Scenario: I browse raw file Scenario: I browse raw file
Given I visit blob file from repo Given I visit blob file from repo
And I click link "raw" And I click link "Raw"
Then I should see raw file content Then I should see raw file content
Scenario: I can create file Scenario: I can create file
...@@ -37,13 +37,13 @@ Feature: Project Browse files ...@@ -37,13 +37,13 @@ Feature: Project Browse files
@javascript @javascript
Scenario: I can edit file Scenario: I can edit file
Given I click on ".gitignore" file in repo Given I click on ".gitignore" file in repo
And I click button "edit" And I click button "Edit"
Then I can edit code Then I can edit code
@javascript @javascript
Scenario: I can edit and commit file Scenario: I can edit and commit file
Given I click on ".gitignore" file in repo Given I click on ".gitignore" file in repo
And I click button "edit" And I click button "Edit"
And I edit code And I edit code
And I fill the commit message And I fill the commit message
And I click on "Commit changes" And I click on "Commit changes"
...@@ -53,7 +53,7 @@ Feature: Project Browse files ...@@ -53,7 +53,7 @@ Feature: Project Browse files
@javascript @javascript
Scenario: I can see editing preview Scenario: I can see editing preview
Given I click on ".gitignore" file in repo Given I click on ".gitignore" file in repo
And I click button "edit" And I click button "Edit"
And I edit code And I edit code
And I click link "Diff" And I click link "Diff"
Then I see diff Then I see diff
...@@ -62,7 +62,7 @@ Feature: Project Browse files ...@@ -62,7 +62,7 @@ Feature: Project Browse files
Scenario: I can remove file and commit Scenario: I can remove file and commit
Given I click on ".gitignore" file in repo Given I click on ".gitignore" file in repo
And I see the ".gitignore" And I see the ".gitignore"
And I click on "remove" And I click on "Remove"
And I fill the commit message And I fill the commit message
And I click on "Remove file" And I click on "Remove file"
Then I am redirected to the files URL Then I am redirected to the files URL
...@@ -70,23 +70,23 @@ Feature: Project Browse files ...@@ -70,23 +70,23 @@ Feature: Project Browse files
Scenario: I can browse directory with Browse Dir Scenario: I can browse directory with Browse Dir
Given I click on files directory Given I click on files directory
And I click on history link And I click on History link
Then I see Browse dir link Then I see Browse dir link
Scenario: I can browse file with Browse File Scenario: I can browse file with Browse File
Given I click on readme file Given I click on readme file
And I click on history link And I click on History link
Then I see Browse file link Then I see Browse file link
Scenario: I can browse code with Browse Code Scenario: I can browse code with Browse Code
Given I click on history link Given I click on History link
Then I see Browse code link Then I see Browse code link
# Permalink # Permalink
Scenario: I click on the permalink link from a branch ref Scenario: I click on the permalink link from a branch ref
Given I click on ".gitignore" file in repo Given I click on ".gitignore" file in repo
And I click on permalink And I click on Permalink
Then I am redirected to the permalink URL Then I am redirected to the permalink URL
Scenario: I don't see the permalink link from a SHA ref Scenario: I don't see the permalink link from a SHA ref
......
...@@ -6,5 +6,5 @@ Feature: Project Browse git repo ...@@ -6,5 +6,5 @@ Feature: Project Browse git repo
Scenario: I blame file Scenario: I blame file
Given I click on ".gitignore" file in repo Given I click on ".gitignore" file in repo
And I click blame button And I click Blame button
Then I should see git file blame Then I should see git file blame
...@@ -36,16 +36,16 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps ...@@ -36,16 +36,16 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
page.should have_content new_gitignore_content page.should have_content new_gitignore_content
end end
step 'I click link "raw"' do step 'I click link "Raw"' do
click_link "raw" click_link 'Raw'
end end
step 'I should see raw file content' do step 'I should see raw file content' do
source.should == sample_blob.data source.should == sample_blob.data
end end
step 'I click button "edit"' do step 'I click button "Edit"' do
click_link 'edit' click_link 'Edit'
end end
step 'I can edit code' do step 'I can edit code' do
...@@ -73,8 +73,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps ...@@ -73,8 +73,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
click_button 'Commit changes' click_button 'Commit changes'
end end
step 'I click on "remove"' do step 'I click on "Remove"' do
click_link 'remove' click_link 'Remove'
end end
step 'I click on "Remove file"' do step 'I click on "Remove file"' do
...@@ -99,8 +99,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps ...@@ -99,8 +99,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
click_link 'files' click_link 'files'
end end
step 'I click on history link' do step 'I click on History link' do
click_link 'history' click_link 'History'
end end
step 'I see Browse dir link' do step 'I see Browse dir link' do
...@@ -125,8 +125,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps ...@@ -125,8 +125,8 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps
page.should_not have_link 'Browse Dir »' page.should_not have_link 'Browse Dir »'
end end
step 'I click on permalink' do step 'I click on Permalink' do
click_link 'permalink' click_link 'Permalink'
end end
step 'I am redirected to the files URL' do step 'I am redirected to the files URL' do
......
...@@ -7,8 +7,8 @@ class Spinach::Features::ProjectBrowseGitRepo < Spinach::FeatureSteps ...@@ -7,8 +7,8 @@ class Spinach::Features::ProjectBrowseGitRepo < Spinach::FeatureSteps
click_link ".gitignore" click_link ".gitignore"
end end
step 'I click blame button' do step 'I click Blame button' do
click_link "blame" click_link 'Blame'
end end
step 'I should see git file blame' do step 'I should see git file blame' do
......
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