Commit ca7e31c4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ui/consistency' into 'master'

UI: Improve consistency across the board

Depends on !1953

See the commits for more details, the messages mostly speak for themselves.

Fixes https://dev.gitlab.org/gitlab/gitlabhq/issues/2577

See merge request !1954
parents bb76a9e2 854deae4
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
display: block; display: block;
} }
.commit-title{
margin-bottom: 10px;
}
.commit-author, .commit-committer{ .commit-author, .commit-committer{
display: block; display: block;
color: #999; color: #999;
...@@ -41,6 +37,8 @@ ...@@ -41,6 +37,8 @@
.commit-box { .commit-box {
.commit-title { .commit-title {
margin: 0; margin: 0;
font-size: 23px;
color: #313236;
} }
.commit-description { .commit-description {
......
...@@ -60,7 +60,7 @@ module BlobHelper ...@@ -60,7 +60,7 @@ module BlobHelper
if Gitlab::MarkupHelper.previewable?(filename) if Gitlab::MarkupHelper.previewable?(filename)
'Preview' 'Preview'
else else
'Preview changes' 'Preview Changes'
end end
end end
......
...@@ -109,7 +109,7 @@ module CommitsHelper ...@@ -109,7 +109,7 @@ module CommitsHelper
) )
elsif @path.present? elsif @path.present?
return link_to( return link_to(
"Browse Dir »", "Browse Directory »",
namespace_project_tree_path(project.namespace, project, namespace_project_tree_path(project.namespace, project,
tree_join(commit.id, @path)), tree_join(commit.id, @path)),
class: "pull-right" class: "pull-right"
...@@ -117,7 +117,7 @@ module CommitsHelper ...@@ -117,7 +117,7 @@ module CommitsHelper
end end
end end
link_to( link_to(
"Browse Code »", "Browse Files »",
namespace_project_tree_path(project.namespace, project, commit), namespace_project_tree_path(project.namespace, project, commit),
class: "pull-right" class: "pull-right"
) )
......
...@@ -146,9 +146,9 @@ module DiffHelper ...@@ -146,9 +146,9 @@ module DiffHelper
def submodule_link(blob, ref, repository = @repository) def submodule_link(blob, ref, repository = @repository)
tree, commit = submodule_links(blob, ref, repository) tree, commit = submodule_links(blob, ref, repository)
commit_id = if commit.nil? commit_id = if commit.nil?
blob.id[0..10] Commit.truncate_sha(blob.id)
else else
link_to "#{blob.id[0..10]}", commit link_to Commit.truncate_sha(blob.id), commit
end end
[ [
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.form-group .form-group
= search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search", spellcheck: false = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search", spellcheck: false
.form-group .form-group
= button_tag 'Search', class: "btn btn-success" = button_tag 'Search', class: "btn"
.pull-right.hidden-sm.hidden-xs .pull-right.hidden-sm.hidden-xs
- if current_user - if current_user
......
- page_title "Bitbucket import" - page_title "Bitbucket import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-bitbucket %i.fa.fa-bitbucket
Import projects from Bitbucket Import projects from Bitbucket
......
- page_title "FogBugz Import" - page_title "FogBugz Import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-bug %i.fa.fa-bug
Import projects from FogBugz Import projects from FogBugz
......
- page_title 'User map', 'FogBugz import' - page_title 'User map', 'FogBugz import'
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-bug %i.fa.fa-bug
Import projects from FogBugz Import projects from FogBugz
......
- page_title "FogBugz import" - page_title "FogBugz import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-bug %i.fa.fa-bug
Import projects from FogBugz Import projects from FogBugz
......
- page_title "GitHub import" - page_title "GitHub import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-github %i.fa.fa-github
Import projects from GitHub Import projects from GitHub
......
- page_title "GitLab.com import" - page_title "GitLab.com import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-heart %i.fa.fa-heart
Import projects from GitLab.com Import projects from GitLab.com
......
- page_title "Gitorious import" - page_title "Gitorious import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.icon-gitorious.icon-gitorious-big %i.icon-gitorious.icon-gitorious-big
Import projects from Gitorious.org Import projects from Gitorious.org
......
- page_title "Google Code import" - page_title "Google Code import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-google %i.fa.fa-google
Import projects from Google Code Import projects from Google Code
......
- page_title "User map", "Google Code import" - page_title "User map", "Google Code import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-google %i.fa.fa-google
Import projects from Google Code Import projects from Google Code
......
- page_title "Google Code import" - page_title "Google Code import"
- header_title "Projects", root_path
%h3.page-title %h3.page-title
%i.fa.fa-google %i.fa.fa-google
Import projects from Google Code Import projects from Google Code
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
.gray-content-block.top-block .gray-content-block.top-block
.pull-right .pull-right
= link_to "Add SSH Key", new_profile_key_path, class: "btn btn-new" = link_to new_profile_key_path, class: "btn btn-new" do
= icon('plus')
Add SSH Key
.oneline .oneline
Before you can add an SSH key you need to Before you can add an SSH key you need to
= link_to "generate it.", help_page_path("ssh", "README") = link_to "generate it.", help_page_path("ssh", "README")
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#tree-holder.tree-holder #tree-holder.tree-holder
.file-holder .file-holder
.file-title .file-title
%i.fa.fa-file = blob_icon @blob.mode, @blob.name
%strong %strong
= @path = @path
%small= number_to_human_size @blob.size %small= number_to_human_size @blob.size
...@@ -43,4 +43,3 @@ ...@@ -43,4 +43,3 @@
- blame_group[:lines].each do |line| - blame_group[:lines].each do |line|
:erb :erb
<%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %> <%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %>
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
%ul.center-top-menu.no-bottom.js-edit-mode %ul.center-top-menu.no-bottom.js-edit-mode
%li.active %li.active
= link_to '#editor' do = link_to '#editor' do
%i.fa.fa-edit = icon('edit')
Edit file Edit File
%li %li
= link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do = link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
%i.fa.fa-eye = icon('eye')
= editing_preview_title(@blob.name) = editing_preview_title(@blob.name)
= form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-requires-input js-edit-blob-form') do = form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-requires-input js-edit-blob-form') do
......
.branch-commit .branch-commit
= link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-id" = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-id monospace"
&middot; &middot;
%span.str-truncated %span.str-truncated
= link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message" = link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.pull-right .pull-right
- if can? current_user, :push_code, @project - if can? current_user, :push_code, @project
= link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do
%i.fa.fa-add-sign = icon('plus')
New branch New branch
&nbsp; &nbsp;
.dropdown.inline .dropdown.inline
......
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
- unless @commit.parents.length > 1 - unless @commit.parents.length > 1
%li= link_to "Email Patches", namespace_project_commit_path(@project.namespace, @project, @commit, format: :patch) %li= link_to "Email Patches", namespace_project_commit_path(@project.namespace, @project, @commit, format: :patch)
%li= link_to "Plain Diff", namespace_project_commit_path(@project.namespace, @project, @commit, format: :diff) %li= link_to "Plain Diff", namespace_project_commit_path(@project.namespace, @project, @commit, format: :diff)
= link_to namespace_project_tree_path(@project.namespace, @project, @commit), class: "btn btn-primary btn-grouped" do = link_to namespace_project_tree_path(@project.namespace, @project, @commit), class: "btn btn-grouped" do
%span Browse Code » = icon('files-o')
Browse Files
%div %div
%p %p
......
...@@ -2,19 +2,27 @@ ...@@ -2,19 +2,27 @@
.diff-header{id: "file-path-#{hexdigest(diff_file.file_path)}"} .diff-header{id: "file-path-#{hexdigest(diff_file.file_path)}"}
- if diff_file.diff.submodule? - if diff_file.diff.submodule?
%span %span
= icon('archive fw')
- submodule_item = project.repository.blob_at(@commit.id, diff_file.file_path) - submodule_item = project.repository.blob_at(@commit.id, diff_file.file_path)
%strong
= submodule_link(submodule_item, @commit.id, project.repository) = submodule_link(submodule_item, @commit.id, project.repository)
- else - else
%span %span
= blob_icon blob.mode, blob.name
= link_to "#diff-#{i}" do
%strong
= diff_file.new_path
- if diff_file.deleted_file - if diff_file.deleted_file
= "#{diff_file.old_path} deleted" deleted
- elsif diff_file.renamed_file - elsif diff_file.renamed_file
= "#{diff_file.old_path} renamed to #{diff_file.new_path}" renamed from
- else %strong
= diff_file.new_path = diff_file.old_path
- if diff_file.mode_changed? - if diff_file.mode_changed?
%span.file-mode= "#{diff_file.diff.a_mode}#{diff_file.diff.b_mode}" %small
= "#{diff_file.diff.a_mode}#{diff_file.diff.b_mode}"
.diff-controls .diff-controls
- if blob.text? - if blob.text?
......
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
- if can? current_user, :admin_label, @project - if can? current_user, :admin_label, @project
= link_to 'Edit', edit_namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm' = link_to 'Edit', edit_namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm'
= link_to 'Remove', namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm btn-remove remove-row', method: :delete, remote: true, data: {confirm: "Remove this label? Are you sure?"} = link_to 'Delete', namespace_project_label_path(@project.namespace, @project, label), class: 'btn btn-sm btn-remove remove-row', method: :delete, remote: true, data: {confirm: "Remove this label? Are you sure?"}
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
.gray-content-block.top-block .gray-content-block.top-block
- if can? current_user, :admin_label, @project - if can? current_user, :admin_label, @project
= link_to new_namespace_project_label_path(@project.namespace, @project), class: "pull-right btn btn-new" do = link_to new_namespace_project_label_path(@project.namespace, @project), class: "pull-right btn btn-new" do
= icon('plus')
New label New label
.oneline .oneline
Labels can be applied to issues and merge requests. Labels can be applied to issues and merge requests.
......
...@@ -31,4 +31,4 @@ ...@@ -31,4 +31,4 @@
= link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-xs btn-close" = link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-xs btn-close"
= link_to namespace_project_milestone_path(milestone.project.namespace, milestone.project, milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-xs btn-remove" do = link_to namespace_project_milestone_path(milestone.project.namespace, milestone.project, milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-xs btn-remove" do
%i.fa.fa-trash-o %i.fa.fa-trash-o
Remove Delete
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
- split_button = split_button || false - split_button = split_button || false
- if split_button == true - if split_button == true
%span.btn-group{class: btn_class} %span.btn-group{class: btn_class}
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn btn-success col-xs-10', rel: 'nofollow' do = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn col-xs-10', rel: 'nofollow' do
%i.fa.fa-download %i.fa.fa-download
%span Download zip %span Download zip
%a.col-xs-2.btn.btn-success.dropdown-toggle{ 'data-toggle' => 'dropdown' } %a.col-xs-2.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' }
%span.caret %span.caret
%span.sr-only %span.sr-only
Select Archive Format Select Archive Format
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- if can? current_user, :push_code, @project - if can? current_user, :push_code, @project
.pull-right .pull-right
= link_to new_namespace_project_tag_path(@project.namespace, @project), class: 'btn btn-create new-tag-btn' do = link_to new_namespace_project_tag_path(@project.namespace, @project), class: 'btn btn-create new-tag-btn' do
%i.fa.fa-add-sign = icon('plus')
New tag New tag
.oneline .oneline
Tags give the ability to mark specific points in history as being important Tags give the ability to mark specific points in history as being important
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%i.fa.fa-angle-right %i.fa.fa-angle-right
&nbsp; &nbsp;
%small.light %small.light
= link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit) = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace"
&ndash; &ndash;
= truncate(@commit.title, length: 50) = truncate(@commit.title, length: 50)
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right' = link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right'
......
...@@ -17,7 +17,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps ...@@ -17,7 +17,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps
step 'I remove label \'bug\'' do step 'I remove label \'bug\'' do
page.within "#label_#{bug_label.id}" do page.within "#label_#{bug_label.id}" do
click_link 'Remove' click_link 'Delete'
end end
end end
......
...@@ -9,7 +9,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps ...@@ -9,7 +9,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
step 'I remove label \'bug\'' do step 'I remove label \'bug\'' do
page.within "#label_#{bug_label.id}" do page.within "#label_#{bug_label.id}" do
click_link 'Remove' click_link 'Delete'
end end
end end
......
...@@ -63,7 +63,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps ...@@ -63,7 +63,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps
end end
step 'I click link to remove milestone' do step 'I click link to remove milestone' do
click_link 'Remove' click_link 'Delete'
end end
step 'I should see no milestones' do step 'I should see no milestones' do
......
...@@ -87,7 +87,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -87,7 +87,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end end
step 'I click link "Diff"' do step 'I click link "Diff"' do
click_link 'Preview changes' click_link 'Preview Changes'
end end
step 'I click on "Commit Changes"' do step 'I click on "Commit Changes"' do
...@@ -192,7 +192,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -192,7 +192,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end end
step 'I see Browse dir link' do step 'I see Browse dir link' do
expect(page).to have_link 'Browse Dir »' expect(page).to have_link 'Browse Directory »'
expect(page).not_to have_link 'Browse Code »' expect(page).not_to have_link 'Browse Code »'
end end
...@@ -204,13 +204,13 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -204,13 +204,13 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step 'I see Browse file link' do step 'I see Browse file link' do
expect(page).to have_link 'Browse File »' expect(page).to have_link 'Browse File »'
expect(page).not_to have_link 'Browse Code »' expect(page).not_to have_link 'Browse Files »'
end end
step 'I see Browse code link' do step 'I see Browse code link' do
expect(page).to have_link 'Browse Code »' expect(page).to have_link 'Browse Files »'
expect(page).not_to have_link 'Browse File »' expect(page).not_to have_link 'Browse File »'
expect(page).not_to have_link 'Browse Dir »' expect(page).not_to have_link 'Browse Directory »'
end end
step 'I click on Permalink' do step 'I click on Permalink' 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