From 92160789aa2134a582211efeb0fd1a3034e4ca0f Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Sun, 24 Aug 2014 23:47:19 -0700 Subject: [PATCH 01/25] add sign-in count add sign-in count to admin section profile view --- app/views/admin/users/show.html.haml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 3c30ccd78b..f3d7b857e0 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -78,6 +78,11 @@ - else never + %li + %span.light Sign-in count: + %strong + = @user.sign_in_count + - if @user.ldap_user? %li %span.light LDAP uid: From 765eabeacccbc199bb2a762dffdb7abde6adb246 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Mon, 1 Sep 2014 15:47:15 -0700 Subject: [PATCH 02/25] add HSTS Policy warning Add warning about HSTS header as it means user will need to provide secure connection access to site for next 24 months from page view. See https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security for more details. --- lib/support/nginx/gitlab-ssl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/support/nginx/gitlab-ssl b/lib/support/nginx/gitlab-ssl index 9ab228b46d..9125a81388 100644 --- a/lib/support/nginx/gitlab-ssl +++ b/lib/support/nginx/gitlab-ssl @@ -83,6 +83,8 @@ server { ssl_prefer_server_ciphers on; + ## [WARNING] The following header states that the browser should only communicate + ## with your server over a secure connection for the next 24 months. add_header Strict-Transport-Security max-age=63072000; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; From 7d9cdc2d37cec34544069cf85dc7ea33137589eb Mon Sep 17 00:00:00 2001 From: uran Date: Fri, 12 Sep 2014 17:53:08 +0300 Subject: [PATCH 03/25] Source repo is now clickable. --- app/views/projects/merge_requests/show/_mr_title.html.haml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/projects/merge_requests/show/_mr_title.html.haml b/app/views/projects/merge_requests/show/_mr_title.html.haml index 563a524499..1c319b83e2 100644 --- a/app/views/projects/merge_requests/show/_mr_title.html.haml +++ b/app/views/projects/merge_requests/show/_mr_title.html.haml @@ -31,7 +31,12 @@ %span.prepend-left-20 %span From - if @merge_request.for_fork? - %strong.label-branch #{@merge_request.source_project_namespace}:#{@merge_request.source_branch} + %strong.label-branch< + - if @merge_request.source_project + = link_to @merge_request.source_project_namespace, project_path(@merge_request.source_project) + - else + \ #{@merge_request.source_project_namespace} + \:#{@merge_request.source_branch} %span into %strong.label-branch #{@merge_request.target_project_namespace}:#{@merge_request.target_branch} - else From 99bc22d7b47e95902972a4e996cb22d6b06a6202 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 23 Sep 2014 23:55:23 +0200 Subject: [PATCH 04/25] Remove test line without effect because no should. --- features/steps/project/issues.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/features/steps/project/issues.rb b/features/steps/project/issues.rb index 1aaf8b1cb7..6619edd96b 100644 --- a/features/steps/project/issues.rb +++ b/features/steps/project/issues.rb @@ -232,9 +232,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps def filter_issue(text) fill_in 'issue_search', with: text - - # make sure AJAX request finished - URI.parse(current_url).request_uri == project_issues_path(project, issue_search: text) end def project From 0c84ffad1c2d1e10e255d832fa16b7eb097f566c Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 30 Sep 2014 21:15:33 +0200 Subject: [PATCH 05/25] Improve remove file textarea placeholder. --- app/views/projects/blob/_remove.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml index 93ffd4463b..90659343d9 100644 --- a/app/views/projects/blob/_remove.html.haml +++ b/app/views/projects/blob/_remove.html.haml @@ -15,7 +15,8 @@ Commit message .col-sm-10 = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', - params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control')} + params[:commit_message], placeholder: "Remove #{@blob.name}", + required: true, rows: 3, class: 'form-control')} .form-group .col-sm-2 .col-sm-10 From 093c2c6a01fe2cfaff72b2624b65896fed339ab5 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Wed, 1 Oct 2014 09:10:13 +0200 Subject: [PATCH 06/25] Apply ZEN mode to all GFM forms --- CHANGELOG | 1 + app/assets/javascripts/dispatcher.js.coffee | 3 +++ app/assets/stylesheets/generic/gfm.scss | 20 +++++++++++++++++++ app/assets/stylesheets/generic/issuable.scss | 9 --------- app/views/projects/milestones/_form.html.haml | 4 ++-- app/views/projects/wikis/_form.html.haml | 4 ++-- 6 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 app/assets/stylesheets/generic/gfm.scss delete mode 100644 app/assets/stylesheets/generic/issuable.scss diff --git a/CHANGELOG b/CHANGELOG index 2f71891a7b..996a5bf869 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ v 7.4.0 - Prevent notes polling when there are not notes - API: Add support for forking a project via the API (Bernhard Kaindl) - API: filter project issues by milestone (Julien Bianchi) + - Zen mode for wiki and milestones (Robert Schilling) v 7.3.2 - Fix creating new file via web editor diff --git a/app/assets/javascripts/dispatcher.js.coffee b/app/assets/javascripts/dispatcher.js.coffee index 086c09f196..00b52758fa 100644 --- a/app/assets/javascripts/dispatcher.js.coffee +++ b/app/assets/javascripts/dispatcher.js.coffee @@ -27,6 +27,8 @@ class Dispatcher new ZenMode() when 'projects:milestones:show' new Milestone() + when 'projects:milestones:new' + new ZenMode() when 'projects:issues:new','projects:issues:edit' GitLab.GfmAutoComplete.setup() shortcut_handler = new ShortcutsNavigation() @@ -87,6 +89,7 @@ class Dispatcher when 'wikis' new Wikis() shortcut_handler = new ShortcutsNavigation() + new ZenMode() when 'snippets', 'labels', 'graphs' shortcut_handler = new ShortcutsNavigation() when 'team_members', 'deploy_keys', 'hooks', 'services', 'protected_branches' diff --git a/app/assets/stylesheets/generic/gfm.scss b/app/assets/stylesheets/generic/gfm.scss new file mode 100644 index 0000000000..e257f05361 --- /dev/null +++ b/app/assets/stylesheets/generic/gfm.scss @@ -0,0 +1,20 @@ +/** + * Styles that apply to all GFM related forms. + */ +.issue-form, .merge-request-form, .wiki-form { + .description { + height: 20em; + } +} + +.wiki-form { + .description { + height: 26em; + } +} + +.milestone-form { + .description { + height: 14em; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/generic/issuable.scss b/app/assets/stylesheets/generic/issuable.scss deleted file mode 100644 index f456b3ace1..0000000000 --- a/app/assets/stylesheets/generic/issuable.scss +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Styles that apply to both issues and merge requests. - */ - -.issue-form, .merge-request-form { - .description { - height: 20em; - } -} diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index 27069802d5..5fb01a11cc 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -5,7 +5,7 @@ %hr -= form_for [@project, @milestone], html: {class: "new_milestone form-horizontal gfm-form"} do |f| += form_for [@project, @milestone], html: {class: 'form-horizontal milestone-form gfm-form'} do |f| -if @milestone.errors.any? .alert.alert-danger %ul @@ -21,7 +21,7 @@ .form-group = f.label :description, "Description", class: "control-label" .col-sm-10 - = f.text_area :description, maxlength: 65535, class: "form-control markdown-area", rows: 10 + = render 'projects/zen', f: f, attr: :description, classes: 'description form-control' .hint .pull-left Milestones are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}. .pull-left Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index 1e39e4dd77..f37c086716 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal gfm-form' } do |f| += form_for [@project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal wiki-form gfm-form' } do |f| -if @page.errors.any? #error_explanation .alert.alert-danger @@ -22,7 +22,7 @@ .form-group = f.label :content, class: 'control-label' .col-sm-10 - = f.text_area :content, class: 'form-control js-gfm-input markdown-area', rows: 18 + = render 'projects/zen', f: f, attr: :content, classes: 'description form-control' .col-sm-12.hint .pull-left Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'} .pull-right Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. From 1c9d2e39c1aef8e10ebff6e57c174c197a3a1c93 Mon Sep 17 00:00:00 2001 From: Kirill Zaitsev Date: Mon, 15 Sep 2014 11:10:35 +0400 Subject: [PATCH 07/25] Hook attributes --- app/models/commit.rb | 15 +++++++++++++++ app/models/concerns/issuable.rb | 2 +- app/models/issue.rb | 4 ++++ app/models/merge_request.rb | 14 ++++++++++++++ app/models/project.rb | 10 ++++++++++ app/services/git_push_service.rb | 11 +---------- doc/web_hooks/web_hooks.md | 26 +++++++++++++++++++++++++- 7 files changed, 70 insertions(+), 12 deletions(-) diff --git a/app/models/commit.rb b/app/models/commit.rb index c8b2e0475f..d18738a72d 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -88,6 +88,21 @@ class Commit description.present? end + def hook_attrs(project) + path_with_namespace = project.path_with_namespace + + { + id: id, + message: safe_message, + timestamp: committed_date.xmlschema, + url: "#{Gitlab.config.gitlab.url}/#{path_with_namespace}/commit/#{id}", + author: { + name: author_name, + email: author_email + } + } + end + # Discover issues should be closed when this commit is pushed to a project's # default branch. def closes_issues project diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index 698b5b8c30..553087946d 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -134,7 +134,7 @@ module Issuable def to_hook_data { object_kind: self.class.name.underscore, - object_attributes: self.attributes + object_attributes: hook_attrs } end diff --git a/app/models/issue.rb b/app/models/issue.rb index 45a8e43b03..7c0344d38c 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -48,6 +48,10 @@ class Issue < ActiveRecord::Base state :closed end + def hook_attrs + attributes + end + # Mentionable overrides. def gfm_reference diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 4894c61767..e0358c1889 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -211,6 +211,20 @@ class MergeRequest < ActiveRecord::Base Gitlab::Satellite::MergeAction.new(current_user, self).format_patch end + def hook_attrs + attrs = { + source: source_project.hook_attrs, + target: target_project.hook_attrs, + last_commit: nil + } + + unless last_commit.nil? + attrs.merge!(last_commit: last_commit.hook_attrs(source_project)) + end + + attributes.merge!(attrs) + end + def for_fork? target_project != source_project end diff --git a/app/models/project.rb b/app/models/project.rb index f9278f19da..f070e16b97 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -544,6 +544,16 @@ class Project < ActiveRecord::Base end end + def hook_attrs + { + name: name, + ssh_url: ssh_url_to_repo, + http_url: http_url_to_repo, + namespace: namespace.name, + visibility_level: visibility_level + } + end + # Reset events cache related to this project # # Since we do cache @event we need to reset cache in special cases: diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index 17c84c78d2..b2d2049139 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -150,16 +150,7 @@ class GitPushService # will be passed as post receive hook data. # push_commits_limited.each do |commit| - data[:commits] << { - id: commit.id, - message: commit.safe_message, - timestamp: commit.committed_date.xmlschema, - url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/commit/#{commit.id}", - author: { - name: commit.author_name, - email: commit.author_email - } - } + data[:commits] << commit.hook_attrs(project) end data diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md index 16817d1933..31791da807 100644 --- a/doc/web_hooks/web_hooks.md +++ b/doc/web_hooks/web_hooks.md @@ -109,7 +109,31 @@ Triggered when a new merge request is created or an existing merge request was u "merge_status": "unchecked", "target_project_id": 14, "iid": 1, - "description": "" + "description": "", + "source": { + "name": "awesome_project", + "ssh_url": "ssh://git@example.com/awesome_space/awesome_project.git", + "http_url": "http://example.com/awesome_space/awesome_project.git", + "visibility_level": 20, + "namespace": "awesome_space" + }, + "target": { + "name": "awesome_project", + "ssh_url": "ssh://git@example.com/awesome_space/awesome_project.git", + "http_url": "http://example.com/awesome_space/awesome_project.git", + "visibility_level": 20, + "namespace": "awesome_space" + }, + "last_commit": { + "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "message": "fixed readme", + "timestamp": "2012-01-03T23:36:29+02:00", + "url": "http://example.com/awesome_space/awesome_project/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "author": { + "name": "GitLab dev user", + "email": "gitlabdev@dv6700.(none)" + } + } } } ``` From a68a3f65af50e3e49f75ef5be4ec1e8eae183300 Mon Sep 17 00:00:00 2001 From: Martijn Date: Thu, 2 Oct 2014 11:20:54 +0200 Subject: [PATCH 08/25] Edit GitHub Flow url --- doc/workflow/gitlab_flow.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/workflow/gitlab_flow.md b/doc/workflow/gitlab_flow.md index 2e21e3f27b..947646c756 100644 --- a/doc/workflow/gitlab_flow.md +++ b/doc/workflow/gitlab_flow.md @@ -26,7 +26,7 @@ After getting used to these three steps the branching model becomes the challeng Since many organizations new to git have no conventions how to work with it, it can quickly become a mess. The biggest problem they run into is that many long running branches that each contain part of the changes are around. People have a hard time figuring out which branch they should develop on or deploy to production. -Frequently the reaction to this problem is to adopt a standardized pattern such as [git flow](http://nvie.com/posts/a-successful-git-branching-model/) and [GitHub flow]() +Frequently the reaction to this problem is to adopt a standardized pattern such as [git flow](http://nvie.com/posts/a-successful-git-branching-model/) and [GitHub flow](https://guides.github.com/introduction/flow/index.html) We think there is still room for improvement and will detail a set of practices we call GitLab flow. # Git flow and its problems @@ -54,7 +54,7 @@ And doing releases doesn't automatically mean also doing hotfixes. ![Master branch with feature branches merged in](github_flow.png) - In reaction to git flow a simpler alternative was detailed, [GitHub flow](http://scottchacon.com/2011/08/31/github-flow.html). + In reaction to git flow a simpler alternative was detailed, [GitHub flow](https://guides.github.com/introduction/flow/index.html). This flow has only feature branches and a master branch. This is very simple and clean, many organizations have adopted it with great success. Atlassian recommends [a similar strategy](http://blogs.atlassian.com/2014/01/simple-git-workflow-simple/) although they rebase feature branches. From d2808476e3f85c9940500b84ee14d38615ceca41 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Oct 2014 12:49:31 +0300 Subject: [PATCH 09/25] Add new milestone link. Hide empty milestone selectbox Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/_issuable_form.html.haml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml index 0ae1fb3cab..316b71f6be 100644 --- a/app/views/projects/_issuable_form.html.haml +++ b/app/views/projects/_issuable_form.html.haml @@ -42,8 +42,14 @@ = f.label :milestone_id, class: 'control-label' do %i.icon-time Milestone - .col-sm-10= f.select(:milestone_id, milestone_options(issuable), - { include_blank: 'Select milestone' }, { class: 'select2' }) + .col-sm-10 + - if milestone_options(issuable).present? + = f.select(:milestone_id, milestone_options(issuable), + { include_blank: 'Select milestone' }, { class: 'select2' }) + - else + %span.light No open milestones available. +   + = link_to 'Create new milestone', new_project_milestone_path .form-group = f.label :label_ids, class: 'control-label' do %i.icon-tag From d3388d4790c6d09e97d9961e3e9de2d0c60d704b Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Oct 2014 12:55:02 +0300 Subject: [PATCH 10/25] New label link Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/_issuable_form.html.haml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml index 316b71f6be..114470f1db 100644 --- a/app/views/projects/_issuable_form.html.haml +++ b/app/views/projects/_issuable_form.html.haml @@ -49,14 +49,20 @@ - else %span.light No open milestones available.   - = link_to 'Create new milestone', new_project_milestone_path + = link_to 'Create new milestone', new_project_milestone_path(issuable.project) .form-group = f.label :label_ids, class: 'control-label' do %i.icon-tag Labels .col-sm-10 - = f.collection_select :label_ids, issuable.project.labels.all, :id, :name, + - if issuable.project.labels.any? + = f.collection_select :label_ids, issuable.project.labels.all, :id, :name, { selected: issuable.label_ids }, multiple: true, class: 'select2' + - else + %span.light No labels yet. +   + = link_to 'Create new label', new_project_label_path(issuable.project) + .form-actions - if issuable.new_record? = f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create' From 3098e7a453c84ac4df1686b8bad6ef8004aca60d Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sat, 27 Sep 2014 00:41:17 +0200 Subject: [PATCH 11/25] Factor commit message textareas. --- app/assets/javascripts/merge_request.js.coffee | 2 +- .../projects/merge_requests_controller.rb | 2 +- app/views/projects/blob/_remove.html.haml | 8 ++------ app/views/projects/edit_tree/show.html.haml | 9 ++------- .../merge_requests/show/_mr_accept.html.haml | 12 +++--------- app/views/projects/new_tree/show.html.haml | 11 ++--------- .../shared/_commit_message_container.html.haml | 17 ++++++++++++++--- features/steps/project/merge_requests.rb | 2 +- 8 files changed, 26 insertions(+), 37 deletions(-) diff --git a/app/assets/javascripts/merge_request.js.coffee b/app/assets/javascripts/merge_request.js.coffee index 59e53b69e3..86dff05849 100644 --- a/app/assets/javascripts/merge_request.js.coffee +++ b/app/assets/javascripts/merge_request.js.coffee @@ -15,7 +15,7 @@ class MergeRequest modal = $('#modal_merge_info').modal(show: false) - disableButtonIfEmptyField '#merge_commit_message', '.accept_merge_request' + disableButtonIfEmptyField '#commit_message', '.accept_merge_request' # Local jQuery finder diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 2667cc7a4f..4bab3ae6e6 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -122,7 +122,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController if @merge_request.open? && @merge_request.can_be_merged? @merge_request.should_remove_source_branch = params[:should_remove_source_branch] - @merge_request.automerge!(current_user, params[:merge_commit_message]) + @merge_request.automerge!(current_user, params[:commit_message]) @status = true else @status = false diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml index 93ffd4463b..da84dc4b6c 100644 --- a/app/views/projects/blob/_remove.html.haml +++ b/app/views/projects/blob/_remove.html.haml @@ -10,12 +10,8 @@ .modal-body = form_tag project_blob_path(@project, @id), method: :delete, class: 'form-horizontal' do - .form-group.commit_message-group - = label_tag 'commit_message', class: "control-label" do - Commit message - .col-sm-10 - = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', - params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control')} + = render 'shared/commit_message_container', params: params, + placeholder: 'Removed this file because...' .form-group .col-sm-2 .col-sm-10 diff --git a/app/views/projects/edit_tree/show.html.haml b/app/views/projects/edit_tree/show.html.haml index 62798b51d8..aca7d874ab 100644 --- a/app/views/projects/edit_tree/show.html.haml +++ b/app/views/projects/edit_tree/show.html.haml @@ -21,13 +21,8 @@ .center %h2 %i.icon-spinner.icon-spin - - .form-group.commit_message-group - = label_tag 'commit_message', class: "control-label" do - Commit message - .col-sm-10 - = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', '', - placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control')} + = render 'shared/commit_message_container', params: params, + placeholder: "Update #{@blob.name}" .form-actions = hidden_field_tag 'last_commit', @last_commit = hidden_field_tag 'content', '', id: "file-content" diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml index 88cc8e17fa..e2cf2b6023 100644 --- a/app/views/projects/merge_requests/show/_mr_accept.html.haml +++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml @@ -22,15 +22,9 @@ %strong= link_to "modify merge commit message", "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message" before accepting merge request .js-toggle-content.hide - .form-group - = label_tag :merge_commit_message, "Commit message", class: 'control-label' - .col-sm-10 - = render 'shared/commit_message_container', {textarea: text_area_tag(:merge_commit_message, - @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true)} - %p.hint - Try to keep the first line under 52 characters - and the others under 72. - + = render 'shared/commit_message_container', params: params, + text: @merge_request.merge_commit_message, + rows: 14, hint: true .accept-group .pull-left = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request" diff --git a/app/views/projects/new_tree/show.html.haml b/app/views/projects/new_tree/show.html.haml index 24d77344fd..3df1c032ba 100644 --- a/app/views/projects/new_tree/show.html.haml +++ b/app/views/projects/new_tree/show.html.haml @@ -19,15 +19,8 @@ Encoding .col-sm-10 = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'form-control' - - .form-group.commit_message-group - = label_tag 'commit_message', class: "control-label" do - Commit message - .col-sm-10 - = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', - params[:commit_message], placeholder: 'Add new file', - required: true, rows: 3, class: 'form-control')} - + = render 'shared/commit_message_container', params: params, + placeholder: 'Add new file' .file-holder .file-title %i.icon-file diff --git a/app/views/shared/_commit_message_container.html.haml b/app/views/shared/_commit_message_container.html.haml index 4365947e70..5071ff640f 100644 --- a/app/views/shared/_commit_message_container.html.haml +++ b/app/views/shared/_commit_message_container.html.haml @@ -1,3 +1,14 @@ -.commit-message-container - .max-width-marker - = textarea +.form-group.commit_message-group + = label_tag 'commit_message', class: 'control-label' do + Commit message + .col-sm-10 + .commit-message-container + .max-width-marker + = text_area_tag 'commit_message', + (params[:commit_message] || local_assigns[:text]), + class: 'form-control', placeholder: local_assigns[:placeholder], + required: true, rows: (local_assigns[:rows] || 3) + - if local_assigns[:hint] + %p.hint + Try to keep the first line under 52 characters + and the others under 72. diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 0cc78f0f58..c101c69625 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -154,7 +154,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'I modify merge commit message' do find('.modify-merge-commit-link').click - fill_in 'merge_commit_message', with: "wow such merge" + fill_in 'commit_message', with: 'wow such merge' end step 'merge request "Bug NS-05" is mergeable' do From 1489b8d50eb420b884d5d7b142d55a718a76ea82 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 2 Oct 2014 13:39:26 +0300 Subject: [PATCH 12/25] Update the help/update docs to include omnibus as well. --- doc/update/README.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/update/README.md b/doc/update/README.md index 9a6f09b370..30e9137d7b 100644 --- a/doc/update/README.md +++ b/doc/update/README.md @@ -1,4 +1,16 @@ -- [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update) -- [Upgrader](upgrader.md) -- [Patch versions](patch_versions.md) -- [MySQL to PostgreSQL](mysql_to_postgresql.md) +Depending on the installation method and your GitLab version, there are multiple update guides. Choose one that fits your needs. + +## Omnibus Packages + +- [Omnibus update guide](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md) contains the steps needed to update a GitLab [package](https://about.gitlab.com/downloads/). + +## Manual Installation + +- [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update) are for those who have installed GitLab manually. +- [The CE to EE update guides](https://gitlab.com/subscribers/gitlab-ee/tree/master/doc/update) are for subscribers of the Enterprise Edition only. The steps are very similar to a version upgrade: stop the server, get the code, update config files for the new functionality, install libs and do migrations, update the init script, start the application and check the application status. +- [Upgrader](upgrader.md) is an automatic ruby script that performs the update for manual installations. +- [Patch versions](patch_versions.md) guide includes the steps needed for a patch version, eg. 6.2.0 to 6.2.1. + +## Miscellaneous + +- [MySQL to PostgreSQL](mysql_to_postgresql.md) guides you through migrating your database from MySQL to PostrgreSQL. From 30c447ed2f35a0d1f4eb0f6200aa9ab952c46768 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Thu, 2 Oct 2014 14:38:26 +0200 Subject: [PATCH 13/25] Try signing in the user after user confirmation is correct and redirect to dashboard, otherwise redirect to signin page --- app/controllers/confirmations_controller.rb | 17 +++++++++++++++++ config/routes.rb | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 app/controllers/confirmations_controller.rb diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb new file mode 100644 index 0000000000..bc98eab133 --- /dev/null +++ b/app/controllers/confirmations_controller.rb @@ -0,0 +1,17 @@ +class ConfirmationsController < Devise::ConfirmationsController + + protected + + def after_confirmation_path_for(resource_name, resource) + if signed_in?(resource_name) + signed_in_root_path(resource) + else + sign_in(resource) + if signed_in?(resource_name) + signed_in_root_path(resource) + else + new_session_path(resource_name) + end + end + end +end diff --git a/config/routes.rb b/config/routes.rb index 00267b1316..2534153758 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -170,7 +170,7 @@ Gitlab::Application.routes.draw do resources :projects, constraints: { id: /[^\/]+/ }, only: [:new, :create] - devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations , passwords: :passwords, sessions: :sessions } + devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations , passwords: :passwords, sessions: :sessions, confirmations: :confirmations } devise_scope :user do get "/users/auth/:provider/omniauth_error" => "omniauth_callbacks#omniauth_error", as: :omniauth_error From c41805f60e6b0fe97ca545a1ac99cbb1e0406100 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Oct 2014 17:14:42 +0300 Subject: [PATCH 14/25] Add test for broken admin user page Signed-off-by: Dmitriy Zaporozhets --- features/admin/users.feature | 6 ++++++ features/steps/admin/users.rb | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/features/admin/users.feature b/features/admin/users.feature index d8c1288e5f..278f6a43e9 100644 --- a/features/admin/users.feature +++ b/features/admin/users.feature @@ -16,6 +16,12 @@ Feature: Admin Users Then See username error message And Not changed form action url + Scenario: Show user attributes + Given user "Mike" with groups and projects + Given I visit admin users page + And click on "Mike" link + Then I should see user "Mike" details + Scenario: Edit my user attributes Given I visit admin users page And click edit on my user diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb index 3422dc2b5a..546c1bf2a1 100644 --- a/features/steps/admin/users.rb +++ b/features/steps/admin/users.rb @@ -63,4 +63,23 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps step 'I should not see secondary email anymore' do page.should_not have_content "Secondary email:" end + + step 'user "Mike" with groups and projects' do + user = create(:user, name: 'Mike') + + project = create(:empty_project) + project.team << [user, :developer] + + group = create(:group) + group.add_user(user, Gitlab::Access::DEVELOPER) + end + + step 'click on "Mike" link' do + click_link "Mike" + end + + step 'I should see user "Mike" details' do + page.should have_content 'Account' + page.should have_content 'Personal projects limit' + end end From 929678899d462e4a43f66c256621144ea65ff630 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Oct 2014 17:15:09 +0300 Subject: [PATCH 15/25] Fix 500 error on admin user page Signed-off-by: Dmitriy Zaporozhets --- app/views/admin/users/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index a172d12edb..3883d95e13 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -171,7 +171,7 @@ .pull-right %span.light= user_group.human_access - unless user_group.owner? - = link_to group_users_group_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do + = link_to group_group_member_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do %i.icon-remove.icon-white - else .nothing-here-block This user has no groups. From 71fce0b2f82fa4c6dea4fef4c0672514a00ec72c Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Oct 2014 17:49:11 +0300 Subject: [PATCH 16/25] Comment random failing test Signed-off-by: Dmitriy Zaporozhets --- .../project/forked_merge_requests.feature | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/features/project/forked_merge_requests.feature b/features/project/forked_merge_requests.feature index 7442145d87..d9fbb875c2 100644 --- a/features/project/forked_merge_requests.feature +++ b/features/project/forked_merge_requests.feature @@ -11,18 +11,20 @@ Feature: Project Forked Merge Requests And I submit the merge request Then I should see merge request "Merge Request On Forked Project" - @javascript - Scenario: I can edit a forked merge request - Given I visit project "Forked Shop" merge requests page - And I click link "New Merge Request" - And I fill out a "Merge Request On Forked Project" merge request - And I submit the merge request - And I should see merge request "Merge Request On Forked Project" - And I click link edit "Merge Request On Forked Project" - Then I see the edit page prefilled for "Merge Request On Forked Project" - And I update the merge request title - And I save the merge request - Then I should see the edited merge request + # TODO: Improve it so it does not fail randomly + # + #@javascript + #Scenario: I can edit a forked merge request + #Given I visit project "Forked Shop" merge requests page + #And I click link "New Merge Request" + #And I fill out a "Merge Request On Forked Project" merge request + #And I submit the merge request + #And I should see merge request "Merge Request On Forked Project" + #And I click link edit "Merge Request On Forked Project" + #Then I see the edit page prefilled for "Merge Request On Forked Project" + #And I update the merge request title + #And I save the merge request + #Then I should see the edited merge request @javascript Scenario: I cannot submit an invalid merge request From 8e33f9460c6f98df089eb367b96d9a1fc91c5d52 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Oct 2014 18:17:47 +0300 Subject: [PATCH 17/25] Show test coverage results in MR if available Signed-off-by: Dmitriy Zaporozhets --- app/assets/javascripts/merge_request.js.coffee | 8 +++++++- .../stylesheets/sections/merge_requests.scss | 4 ++++ .../projects/merge_requests_controller.rb | 13 +++++++++++-- .../project_services/gitlab_ci_service.rb | 17 +++++++++++++++-- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/merge_request.js.coffee b/app/assets/javascripts/merge_request.js.coffee index 59e53b69e3..1c391c61bb 100644 --- a/app/assets/javascripts/merge_request.js.coffee +++ b/app/assets/javascripts/merge_request.js.coffee @@ -40,6 +40,8 @@ class MergeRequest if @opts.ci_enable $.get @opts.url_to_ci_check, (data) => this.showCiState data.status + if data.coverage + this.showCiCoverage data.coverage , 'json' bindEvents: -> @@ -102,7 +104,11 @@ class MergeRequest when "running", "pending" $('.mr-state-widget').addClass("panel-warning") - + showCiCoverage: (coverage) -> + cov_html = $('') + cov_html.addClass('ci-coverage') + cov_html.text('Coverage ' + coverage + '%') + $('.ci_widget:visible').append(cov_html) loadDiff: (event) -> $.ajax diff --git a/app/assets/stylesheets/sections/merge_requests.scss b/app/assets/stylesheets/sections/merge_requests.scss index 3db6da2a9f..acaad51977 100644 --- a/app/assets/stylesheets/sections/merge_requests.scss +++ b/app/assets/stylesheets/sections/merge_requests.scss @@ -113,6 +113,10 @@ margin-bottom: 0; } } + + .ci-coverage { + float: right; + } } .merge-request-show-labels .label { diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 2667cc7a4f..16bb3a5476 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -150,8 +150,17 @@ class Projects::MergeRequestsController < Projects::ApplicationController end def ci_status - status = @merge_request.source_project.ci_service.commit_status(merge_request.last_commit.sha) - response = {status: status} + ci_service = @merge_request.source_project.ci_service + status = ci_service.commit_status(merge_request.last_commit.sha) + + if ci_service.respond_to?(:commit_coverage) + coverage = ci_service.commit_coverage(merge_request.last_commit.sha) + end + + response = { + status: status, + coverage: coverage + } render json: response end diff --git a/app/models/project_services/gitlab_ci_service.rb b/app/models/project_services/gitlab_ci_service.rb index 0f327e7528..4a19ca2f65 100644 --- a/app/models/project_services/gitlab_ci_service.rb +++ b/app/models/project_services/gitlab_ci_service.rb @@ -31,8 +31,13 @@ class GitlabCiService < CiService project_url + "/builds/#{sha}/status.json?token=#{token}" end - def commit_status sha - response = HTTParty.get(commit_status_path(sha), verify: false) + def get_ci_build(sha) + @ci_builds ||= {} + @ci_builds[sha] ||= HTTParty.get(commit_status_path(sha), verify: false) + end + + def commit_status(sha) + response = get_ci_build(sha) if response.code == 200 and response["status"] response["status"] @@ -41,6 +46,14 @@ class GitlabCiService < CiService end end + def commit_coverage(sha) + response = get_ci_build(sha) + + if response.code == 200 and response["coverage"] + response["coverage"] + end + end + def build_page sha project_url + "/builds/#{sha}" end From 97c5d38097a6308c31e0e5f9afaef719d5080b5f Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 2 Oct 2014 18:27:18 +0200 Subject: [PATCH 18/25] Add a counterexample to 'do it in Ruby' --- doc/development/shell_commands.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/development/shell_commands.md b/doc/development/shell_commands.md index 1f3908f4e2..23c8365c34 100644 --- a/doc/development/shell_commands.md +++ b/doc/development/shell_commands.md @@ -22,6 +22,12 @@ FileUtils.mkdir_p "tmp/special/directory" contents = `cat #{filename}` # Correct contents = File.read(filename) + +# Sometimes a shell command is just the best solution. The example below has no +# user input, and is hard to implement correctly in Ruby: delete all files and +# directories older than 120 minutes under /some/path, but not /some/path +# itself. +Gitlab::Popen.popen(%W(find /some/path -not -path /some/path -mmin +120 -delete)) ``` This coding style could have prevented CVE-2013-4490. From b0a3276253498475029fe25bcaef0eacc9e27ee6 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Thu, 2 Oct 2014 18:53:07 +0200 Subject: [PATCH 19/25] Bump org-mode to 0.9.9 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 3d9af1c91c..4d831c1c23 100644 --- a/Gemfile +++ b/Gemfile @@ -89,7 +89,7 @@ gem "github-markup" gem 'redcarpet', '~> 3.1.2' gem 'RedCloth' gem 'rdoc', '~>3.6' -gem 'org-ruby' +gem 'org-ruby', '= 0.9.9' gem 'creole', '~>0.3.6' gem 'wikicloth', '=0.8.1' gem 'asciidoctor', '= 0.1.4' diff --git a/Gemfile.lock b/Gemfile.lock index d0f29258ff..3e029481ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -332,7 +332,7 @@ GEM omniauth-twitter (1.0.1) multi_json (~> 1.3) omniauth-oauth (~> 1.0) - org-ruby (0.9.8) + org-ruby (0.9.9) rubypants (~> 0.2) orm_adapter (0.5.0) pg (0.15.1) @@ -655,7 +655,7 @@ DEPENDENCIES omniauth-google-oauth2 omniauth-shibboleth omniauth-twitter - org-ruby + org-ruby (= 0.9.9) pg poltergeist (~> 1.5.1) pry From d5c8ca7412f024a254653f0a72e3b1fe026adcde Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Fri, 3 Oct 2014 08:01:54 +0200 Subject: [PATCH 20/25] Add move to html-pipeline-gitlab to changelog --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index b9020d825c..0250b4a23c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,7 @@ v 7.4.0 - API: filter project issues by milestone (Julien Bianchi) - Fail harder in the backup script - Zen mode for wiki and milestones (Robert Schilling) + - Move Emoji parsing to html-pipeline-gitlab (Robert Schilling) v 7.3.2 - Fix creating new file via web editor From b4963e9dda1ced7c219f24172e9fa4c8a5076b69 Mon Sep 17 00:00:00 2001 From: Kirill Zaitsev Date: Fri, 19 Sep 2014 12:23:18 +0400 Subject: [PATCH 21/25] Add tag_push_events to project hook api --- app/models/hooks/web_hook.rb | 1 + doc/api/projects.md | 2 ++ lib/api/entities.rb | 3 ++- lib/api/project_hooks.rb | 16 ++++++++++++++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb index 752eb8074a..23fa01e0b7 100644 --- a/app/models/hooks/web_hook.rb +++ b/app/models/hooks/web_hook.rb @@ -21,6 +21,7 @@ class WebHook < ActiveRecord::Base default_value_for :push_events, true default_value_for :issues_events, false default_value_for :merge_requests_events, false + default_value_for :tag_push_events, false # HTTParty timeout default_timeout Gitlab.config.gitlab.webhook_timeout diff --git a/doc/api/projects.md b/doc/api/projects.md index 8385e11b80..dfe3502b6e 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -447,6 +447,7 @@ Parameters: - `push_events` - Trigger hook on push events - `issues_events` - Trigger hook on issues events - `merge_requests_events` - Trigger hook on merge_requests events +- `tag_push_events` - Trigger hook on push_tag events ### Edit project hook @@ -464,6 +465,7 @@ Parameters: - `push_events` - Trigger hook on push events - `issues_events` - Trigger hook on issues events - `merge_requests_events` - Trigger hook on merge_requests events +- `tag_push_events` - Trigger hook on push_tag events ### Delete project hook diff --git a/lib/api/entities.rb b/lib/api/entities.rb index ffa3e8a149..80e9470195 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -30,7 +30,8 @@ module API end class ProjectHook < Hook - expose :project_id, :push_events, :issues_events, :merge_requests_events + expose :project_id, :push_events + expose :issues_events, :merge_requests_events, :tag_push_events end class ForkedFromProject < Grape::Entity diff --git a/lib/api/project_hooks.rb b/lib/api/project_hooks.rb index 79c3d122d3..7d056b9bf5 100644 --- a/lib/api/project_hooks.rb +++ b/lib/api/project_hooks.rb @@ -38,7 +38,13 @@ module API # POST /projects/:id/hooks post ":id/hooks" do required_attributes! [:url] - attrs = attributes_for_keys [:url, :push_events, :issues_events, :merge_requests_events] + attrs = attributes_for_keys [ + :url, + :push_events, + :issues_events, + :merge_requests_events, + :tag_push_events + ] @hook = user_project.hooks.new(attrs) if @hook.save @@ -62,7 +68,13 @@ module API put ":id/hooks/:hook_id" do @hook = user_project.hooks.find(params[:hook_id]) required_attributes! [:url] - attrs = attributes_for_keys [:url, :push_events, :issues_events, :merge_requests_events] + attrs = attributes_for_keys [ + :url, + :push_events, + :issues_events, + :merge_requests_events, + :tag_push_events + ] if @hook.update_attributes attrs present @hook, with: Entities::ProjectHook From 2e9f5de86896e53e9cf34aef52bbc2ad08019a21 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Fri, 26 Sep 2014 00:07:40 +0200 Subject: [PATCH 22/25] Add parenthesis to function def with arguments. --- app/controllers/application_controller.rb | 2 +- app/controllers/registrations_controller.rb | 4 ++-- app/helpers/events_helper.rb | 2 +- app/helpers/issues_helper.rb | 4 ++-- app/helpers/merge_requests_helper.rb | 4 ++-- app/helpers/profile_helper.rb | 2 +- app/helpers/projects_helper.rb | 4 ++-- app/helpers/tab_helper.rb | 2 +- app/helpers/tags_helper.rb | 4 ++-- app/helpers/tree_helper.rb | 2 +- app/models/ability.rb | 4 ++-- app/models/commit.rb | 2 +- app/models/concerns/mentionable.rb | 10 +++++----- app/models/members/project_member.rb | 2 +- app/models/namespace.rb | 2 +- app/models/network/graph.rb | 2 +- app/models/project.rb | 4 ++-- app/models/project_services/gitlab_ci_service.rb | 4 ++-- app/models/project_team.rb | 2 +- app/models/user.rb | 14 +++++++------- app/services/base_service.rb | 2 +- app/services/git_push_service.rb | 14 +++++++------- app/workers/repository_import_worker.rb | 2 +- features/steps/group.rb | 2 +- lib/api/helpers.rb | 2 +- lib/event_filter.rb | 8 ++++---- lib/gitlab/backend/shell.rb | 2 +- lib/gitlab/diff/parser.rb | 2 +- lib/gitlab/inline_diff.rb | 6 +++--- lib/gitlab/logger.rb | 2 +- lib/gitlab/reference_extractor.rb | 12 ++++++------ lib/gitlab/satellite/satellite.rb | 2 +- spec/lib/gitlab/satellite/action_spec.rb | 2 +- 33 files changed, 67 insertions(+), 67 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5ffec7f75b..1a5215ca30 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -62,7 +62,7 @@ class ApplicationController < ActionController::Base end end - def after_sign_in_path_for resource + def after_sign_in_path_for(resource) if resource.is_a?(User) && resource.respond_to?(:blocked?) && resource.blocked? sign_out resource flash[:alert] = "Your account is blocked. Retry when an admin has unblocked it." diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 9e70978992..6d3214b70a 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -15,11 +15,11 @@ class RegistrationsController < Devise::RegistrationsController super end - def after_sign_up_path_for resource + def after_sign_up_path_for(resource) new_user_session_path end - def after_inactive_sign_up_path_for resource + def after_inactive_sign_up_path_for(resource) new_user_session_path end diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 6f738764b0..10a895d8ca 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -19,7 +19,7 @@ module EventsHelper [event.action_name, target].join(" ") end - def event_filter_link key, tooltip + def event_filter_link(key, tooltip) key = key.to_s inactive = if @event_filter.active? key nil diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 2031519c32..7671033b53 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -1,5 +1,5 @@ module IssuesHelper - def issue_css_classes issue + def issue_css_classes(issue) classes = "issue" classes << " closed" if issue.closed? classes << " today" if issue.today? @@ -84,7 +84,7 @@ module IssuesHelper 'id', 'name', object.assignee_id) end - def milestone_options object + def milestone_options(object) options_from_collection_for_select(object.project.milestones.active, 'id', 'title', object.milestone_id) end diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb index cc63db2035..d1ea47eb7b 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -24,14 +24,14 @@ module MergeRequestsHelper } end - def mr_css_classes mr + def mr_css_classes(mr) classes = "merge-request" classes << " closed" if mr.closed? classes << " merged" if mr.merged? classes end - def ci_build_details_path merge_request + def ci_build_details_path(merge_request) merge_request.source_project.ci_service.build_page(merge_request.last_commit.sha) end diff --git a/app/helpers/profile_helper.rb b/app/helpers/profile_helper.rb index 297ae83d89..0b37555830 100644 --- a/app/helpers/profile_helper.rb +++ b/app/helpers/profile_helper.rb @@ -1,5 +1,5 @@ module ProfileHelper - def oauth_active_class provider + def oauth_active_class(provider) if current_user.provider == provider.to_s 'active' end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index f7da30bcc4..6a16f112cb 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -3,7 +3,7 @@ module ProjectsHelper "You are going to remove #{user.name} from #{project.name} project team. Are you sure?" end - def link_to_project project + def link_to_project(project) link_to project do title = content_tag(:span, project.name, class: 'project-name') @@ -39,7 +39,7 @@ module ProjectsHelper end end - def project_title project + def project_title(project) if project.group content_tag :span do link_to(simple_sanitize(project.group.name), group_path(project.group)) + " / " + project.name diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb index 610175f844..bc43e07856 100644 --- a/app/helpers/tab_helper.rb +++ b/app/helpers/tab_helper.rb @@ -89,7 +89,7 @@ module TabHelper end # Use nav_tab for save controller/action but different params - def nav_tab key, value, &block + def nav_tab(key, value, &block) o = {} o[:class] = "" diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb index ebed6a8374..ef89bb32c6 100644 --- a/app/helpers/tags_helper.rb +++ b/app/helpers/tags_helper.rb @@ -1,9 +1,9 @@ module TagsHelper - def tag_path tag + def tag_path(tag) "/tags/#{tag}" end - def tag_list project + def tag_list(project) html = '' project.tag_list.each do |tag| html += link_to tag, tag_path(tag) diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index d815257a4e..ed3c401d87 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -80,7 +80,7 @@ module TreeHelper end end - def up_dir_path tree + def up_dir_path(tree) file = File.join(@path, "..") tree_join(@ref, file) end diff --git a/app/models/ability.rb b/app/models/ability.rb index 716a23a428..e155abc144 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -184,7 +184,7 @@ class Ability ] end - def group_abilities user, group + def group_abilities(user, group) rules = [] if user.admin? || group.users.include?(user) || ProjectsFinder.new.execute(user, group: group).any? @@ -209,7 +209,7 @@ class Ability rules.flatten end - def namespace_abilities user, namespace + def namespace_abilities(user, namespace) rules = [] # Only namespace owner and administrators can manage it diff --git a/app/models/commit.rb b/app/models/commit.rb index c8b2e0475f..7f586ebe78 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -90,7 +90,7 @@ class Commit # Discover issues should be closed when this commit is pushed to a project's # default branch. - def closes_issues project + def closes_issues(project) Gitlab::ClosingIssueExtractor.closed_by_message_in_project(safe_message, project) end diff --git a/app/models/concerns/mentionable.rb b/app/models/concerns/mentionable.rb index 81414959f3..71dd2f8c69 100644 --- a/app/models/concerns/mentionable.rb +++ b/app/models/concerns/mentionable.rb @@ -10,7 +10,7 @@ module Mentionable module ClassMethods # Indicate which attributes of the Mentionable to search for GFM references. - def attr_mentionable *attrs + def attr_mentionable(*attrs) mentionable_attrs.concat(attrs.map(&:to_s)) end @@ -38,7 +38,7 @@ module Mentionable # Determine whether or not a cross-reference Note has already been created between this Mentionable and # the specified target. - def has_mentioned? target + def has_mentioned?(target) Note.cross_reference_exists?(target, local_reference) end @@ -64,7 +64,7 @@ module Mentionable end # Extract GFM references to other Mentionables from this Mentionable. Always excludes its #local_reference. - def references p = project, text = mentionable_text + def references(p = project, text = mentionable_text) return [] if text.blank? ext = Gitlab::ReferenceExtractor.new ext.analyze(text) @@ -72,7 +72,7 @@ module Mentionable end # Create a cross-reference Note for each GFM reference to another Mentionable found in +mentionable_text+. - def create_cross_references! p = project, a = author, without = [] + def create_cross_references!(p = project, a = author, without = []) refs = references(p) - without refs.each do |ref| Note.create_cross_reference_note(ref, local_reference, a, p) @@ -81,7 +81,7 @@ module Mentionable # If the mentionable_text field is about to change, locate any *added* references and create cross references for # them. Invoke from an observer's #before_save implementation. - def notice_added_references p = project, a = author + def notice_added_references(p = project, a = author) ch = changed_attributes original, mentionable_changed = "", false self.class.mentionable_attrs.each do |attr| diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb index f14900ad3e..71525f9196 100644 --- a/app/models/members/project_member.rb +++ b/app/models/members/project_member.rb @@ -77,7 +77,7 @@ class ProjectMember < Member false end - def truncate_team project + def truncate_team(project) truncate_teams [project.id] end diff --git a/app/models/namespace.rb b/app/models/namespace.rb index b19b72906e..c0c6de0ee7 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -38,7 +38,7 @@ class Namespace < ActiveRecord::Base scope :root, -> { where('type IS NULL') } - def self.search query + def self.search(query) where("name LIKE :query OR path LIKE :query", query: "%#{query}%") end diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb index 9c95470beb..43979b5e80 100644 --- a/app/models/network/graph.rb +++ b/app/models/network/graph.rb @@ -6,7 +6,7 @@ module Network @max_count ||= 650 end - def initialize project, ref, commit, filter_ref + def initialize(project, ref, commit, filter_ref) @project = project @ref = ref @commit = commit diff --git a/app/models/project.rb b/app/models/project.rb index f9278f19da..0e940bca2c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -331,7 +331,7 @@ class Project < ActiveRecord::Base path end - def items_for entity + def items_for(entity) case entity when 'issue' then issues @@ -504,7 +504,7 @@ class Project < ActiveRecord::Base end # Check if current branch name is marked as protected in the system - def protected_branch? branch_name + def protected_branch?(branch_name) protected_branches_names.include?(branch_name) end diff --git a/app/models/project_services/gitlab_ci_service.rb b/app/models/project_services/gitlab_ci_service.rb index 4a19ca2f65..001b11c596 100644 --- a/app/models/project_services/gitlab_ci_service.rb +++ b/app/models/project_services/gitlab_ci_service.rb @@ -27,7 +27,7 @@ class GitlabCiService < CiService hook.save end - def commit_status_path sha + def commit_status_path(sha) project_url + "/builds/#{sha}/status.json?token=#{token}" end @@ -54,7 +54,7 @@ class GitlabCiService < CiService end end - def build_page sha + def build_page(sha) project_url + "/builds/#{sha}" end diff --git a/app/models/project_team.rb b/app/models/project_team.rb index e2af10c689..e065554d3b 100644 --- a/app/models/project_team.rb +++ b/app/models/project_team.rb @@ -11,7 +11,7 @@ class ProjectTeam # @team << [@user, :master] # @team << [@users, :master] # - def << args + def <<(args) users = args.first if users.respond_to?(:each) diff --git a/app/models/user.rb b/app/models/user.rb index ed3eba4cdf..c90f246242 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -203,7 +203,7 @@ class User < ActiveRecord::Base User.where(name: name).first end - def filter filter_name + def filter(filter_name) case filter_name when "admins"; self.admins when "blocked"; self.blocked @@ -213,7 +213,7 @@ class User < ActiveRecord::Base end end - def search query + def search(query) where("lower(name) LIKE :query OR lower(email) LIKE :query OR lower(username) LIKE :query", query: "%#{query.downcase}%") end @@ -332,7 +332,7 @@ class User < ActiveRecord::Base several_namespaces? || admin end - def can? action, subject + def can?(action, subject) abilities.allowed?(self, action, subject) end @@ -353,7 +353,7 @@ class User < ActiveRecord::Base (personal_projects.count.to_f / projects_limit) * 100 end - def recent_push project_id = nil + def recent_push(project_id = nil) # Get push events not earlier than 2 hours ago events = recent_events.code_push.where("created_at > ?", Time.now - 2.hours) events = events.where(project_id: project_id) if project_id @@ -382,11 +382,11 @@ class User < ActiveRecord::Base project.team_member_by_id(self.id) end - def already_forked? project + def already_forked?(project) !!fork_of(project) end - def fork_of project + def fork_of(project) links = ForkedProjectLink.where(forked_from_project_id: project, forked_to_project_id: personal_projects) if links.any? @@ -512,7 +512,7 @@ class User < ActiveRecord::Base NotificationService.new end - def log_info message + def log_info(message) Gitlab::AppLogger.info message end diff --git a/app/services/base_service.rb b/app/services/base_service.rb index 051612633c..ed286c0409 100644 --- a/app/services/base_service.rb +++ b/app/services/base_service.rb @@ -25,7 +25,7 @@ class BaseService EventCreateService.new end - def log_info message + def log_info(message) Gitlab::AppLogger.info message end diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index 17c84c78d2..1fe43f46c1 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -75,7 +75,7 @@ class GitPushService # Extract any GFM references from the pushed commit messages. If the configured issue-closing regex is matched, # close the referenced Issue. Create cross-reference Notes corresponding to any other referenced Mentionables. - def process_commit_messages ref + def process_commit_messages(ref) is_default_branch = is_default_branch?(ref) @push_commits.each do |commit| @@ -165,34 +165,34 @@ class GitPushService data end - def push_to_existing_branch? ref, oldrev + def push_to_existing_branch?(ref, oldrev) ref_parts = ref.split('/') # Return if this is not a push to a branch (e.g. new commits) ref_parts[1] =~ /heads/ && oldrev != "0000000000000000000000000000000000000000" end - def push_to_new_branch? ref, oldrev + def push_to_new_branch?(ref, oldrev) ref_parts = ref.split('/') ref_parts[1] =~ /heads/ && oldrev == "0000000000000000000000000000000000000000" end - def push_remove_branch? ref, newrev + def push_remove_branch?(ref, newrev) ref_parts = ref.split('/') ref_parts[1] =~ /heads/ && newrev == "0000000000000000000000000000000000000000" end - def push_to_branch? ref + def push_to_branch?(ref) ref =~ /refs\/heads/ end - def is_default_branch? ref + def is_default_branch?(ref) ref == "refs/heads/#{project.default_branch}" end - def commit_user commit + def commit_user(commit) User.find_for_commit(commit.author_email, commit.author_name) || user end end diff --git a/app/workers/repository_import_worker.rb b/app/workers/repository_import_worker.rb index 43ef54631a..01586150cd 100644 --- a/app/workers/repository_import_worker.rb +++ b/app/workers/repository_import_worker.rb @@ -19,4 +19,4 @@ class RepositoryImportWorker project.import_fail end end -end \ No newline at end of file +end diff --git a/features/steps/group.rb b/features/steps/group.rb index da0cf7bbd4..616a297db9 100644 --- a/features/steps/group.rb +++ b/features/steps/group.rb @@ -201,7 +201,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps protected - def assigned_to_me key + def assigned_to_me(key) project.send(key).where(assignee_id: current_user.id) end diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 3a619169ec..3262884f6d 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -71,7 +71,7 @@ module API forbidden! unless current_user.is_admin? end - def authorize! action, subject + def authorize!(action, subject) unless abilities.allowed?(current_user, action, subject) forbidden! end diff --git a/lib/event_filter.rb b/lib/event_filter.rb index 9b4b8c3801..163937c02c 100644 --- a/lib/event_filter.rb +++ b/lib/event_filter.rb @@ -23,7 +23,7 @@ class EventFilter end end - def initialize params + def initialize(params) @params = if params params.dup else @@ -31,7 +31,7 @@ class EventFilter end end - def apply_filter events + def apply_filter(events) return events unless params.present? filter = params.dup @@ -50,7 +50,7 @@ class EventFilter events = events.where(action: actions) end - def options key + def options(key) filter = params.dup if filter.include? key @@ -62,7 +62,7 @@ class EventFilter filter end - def active? key + def active?(key) params.include? key end end diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb index 907373ab99..f95bbde5b3 100644 --- a/lib/gitlab/backend/shell.rb +++ b/lib/gitlab/backend/shell.rb @@ -213,7 +213,7 @@ module Gitlab FileUtils.rm_r(satellites_path, force: true) end - def url_to_repo path + def url_to_repo(path) Gitlab.config.gitlab_shell.ssh_path_prefix + "#{path}.git" end diff --git a/lib/gitlab/diff/parser.rb b/lib/gitlab/diff/parser.rb index 9d6309954a..f7c1f20d76 100644 --- a/lib/gitlab/diff/parser.rb +++ b/lib/gitlab/diff/parser.rb @@ -72,7 +72,7 @@ module Gitlab end end - def html_escape str + def html_escape(str) replacements = { '&' => '&', '>' => '>', '<' => '<', '"' => '"', "'" => ''' } str.gsub(/[&"'><]/, replacements) end diff --git a/lib/gitlab/inline_diff.rb b/lib/gitlab/inline_diff.rb index 89c8e0680c..3517ecdf5c 100644 --- a/lib/gitlab/inline_diff.rb +++ b/lib/gitlab/inline_diff.rb @@ -5,7 +5,7 @@ module Gitlab START = "#!idiff-start!#" FINISH = "#!idiff-finish!#" - def processing diff_arr + def processing(diff_arr) indexes = _indexes_of_changed_lines diff_arr indexes.each do |index| @@ -52,7 +52,7 @@ module Gitlab diff_arr end - def _indexes_of_changed_lines diff_arr + def _indexes_of_changed_lines(diff_arr) chain_of_first_symbols = "" diff_arr.each_with_index do |line, i| chain_of_first_symbols += line[0] @@ -68,7 +68,7 @@ module Gitlab indexes end - def replace_markers line + def replace_markers(line) line.gsub!(START, "") line.gsub!(FINISH, "") line diff --git a/lib/gitlab/logger.rb b/lib/gitlab/logger.rb index 64cf3303ea..8a73ec5038 100644 --- a/lib/gitlab/logger.rb +++ b/lib/gitlab/logger.rb @@ -15,7 +15,7 @@ module Gitlab tail_output.split("\n") end - def self.read_latest_for filename + def self.read_latest_for(filename) path = Rails.root.join("log", filename) tail_output, _ = Gitlab::Popen.popen(%W(tail -n 2000 #{path})) tail_output.split("\n") diff --git a/lib/gitlab/reference_extractor.rb b/lib/gitlab/reference_extractor.rb index 1eda614807..73b19ad55d 100644 --- a/lib/gitlab/reference_extractor.rb +++ b/lib/gitlab/reference_extractor.rb @@ -9,38 +9,38 @@ module Gitlab @users, @issues, @merge_requests, @snippets, @commits = [], [], [], [], [] end - def analyze string + def analyze(string) parse_references(string.dup) end # Given a valid project, resolve the extracted identifiers of the requested type to # model objects. - def users_for project + def users_for(project) users.map do |identifier| project.users.where(username: identifier).first end.reject(&:nil?) end - def issues_for project + def issues_for(project) issues.map do |identifier| project.issues.where(iid: identifier).first end.reject(&:nil?) end - def merge_requests_for project + def merge_requests_for(project) merge_requests.map do |identifier| project.merge_requests.where(iid: identifier).first end.reject(&:nil?) end - def snippets_for project + def snippets_for(project) snippets.map do |identifier| project.snippets.where(id: identifier).first end.reject(&:nil?) end - def commits_for project + def commits_for(project) repo = project.repository return [] if repo.nil? diff --git a/lib/gitlab/satellite/satellite.rb b/lib/gitlab/satellite/satellite.rb index f34d661c9f..1de84309d1 100644 --- a/lib/gitlab/satellite/satellite.rb +++ b/lib/gitlab/satellite/satellite.rb @@ -11,7 +11,7 @@ module Gitlab @project = project end - def log message + def log(message) Gitlab::Satellite::Logger.error(message) end diff --git a/spec/lib/gitlab/satellite/action_spec.rb b/spec/lib/gitlab/satellite/action_spec.rb index 2af1e9e32f..3eb1258d67 100644 --- a/spec/lib/gitlab/satellite/action_spec.rb +++ b/spec/lib/gitlab/satellite/action_spec.rb @@ -97,7 +97,7 @@ describe 'Gitlab::Satellite::Action' do end class FileLockStatusChecker < File - def flocked? &block + def flocked?(&block) status = flock LOCK_EX|LOCK_NB case status when false From 5d8be4438add1183d91e030b852c628cf09f4916 Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Thu, 2 Oct 2014 00:21:29 +0200 Subject: [PATCH 23/25] Upgrade to Font Awesome v4.2 --- CHANGELOG | 1 + Gemfile | 2 +- Gemfile.lock | 4 ++-- app/assets/javascripts/application.js.coffee | 4 ++-- .../behaviors/toggler_behavior.coffee | 4 ++-- app/assets/javascripts/markdown_area.js.coffee | 4 ++-- app/assets/stylesheets/gl_bootstrap.scss | 2 +- app/assets/stylesheets/sections/notes.scss | 3 +-- app/helpers/application_helper.rb | 2 +- app/helpers/events_helper.rb | 8 ++++---- app/helpers/icons_helper.rb | 10 +++++----- app/helpers/notes_helper.rb | 2 +- app/helpers/notifications_helper.rb | 8 ++++---- app/helpers/projects_helper.rb | 4 ++-- app/helpers/tree_helper.rb | 4 ++-- app/views/admin/background_jobs/show.html.haml | 6 +++--- .../admin/broadcast_messages/index.html.haml | 4 ++-- app/views/admin/groups/_form.html.haml | 2 +- app/views/admin/groups/index.html.haml | 2 +- app/views/admin/groups/show.html.haml | 4 ++-- app/views/admin/logs/show.html.haml | 16 ++++++++-------- app/views/admin/projects/show.html.haml | 8 ++++---- app/views/admin/users/index.html.haml | 8 ++++---- app/views/admin/users/show.html.haml | 8 ++++---- app/views/dashboard/_groups.html.haml | 4 ++-- app/views/dashboard/_project.html.haml | 2 +- app/views/dashboard/_projects.html.haml | 4 ++-- app/views/dashboard/_projects_filter.html.haml | 4 ++-- app/views/dashboard/_sidebar.html.haml | 2 +- .../_zero_authorized_projects.html.haml | 6 +++--- app/views/dashboard/issues.html.haml | 2 +- app/views/dashboard/merge_requests.html.haml | 2 +- app/views/dashboard/projects.html.haml | 8 ++++---- app/views/dashboard/show.html.haml | 2 +- app/views/events/event/_note.html.haml | 4 ++-- app/views/explore/groups/index.html.haml | 2 +- app/views/explore/projects/_project.html.haml | 2 +- app/views/explore/projects/starred.html.haml | 2 +- app/views/explore/projects/trending.html.haml | 2 +- app/views/groups/_projects.html.haml | 4 ++-- app/views/groups/_settings_nav.html.haml | 4 ++-- app/views/groups/edit.html.haml | 2 +- .../group_members/_group_member.html.haml | 6 +++--- app/views/groups/issues.html.haml | 2 +- app/views/groups/members.html.haml | 2 +- app/views/groups/merge_requests.html.haml | 2 +- app/views/groups/milestones/index.html.haml | 2 +- app/views/groups/new.html.haml | 2 +- app/views/groups/projects.html.haml | 2 +- app/views/groups/show.html.haml | 2 +- app/views/help/_shortcuts.html.haml | 16 ++++++++-------- app/views/layouts/_broadcast.html.haml | 2 +- app/views/layouts/_head_panel.html.haml | 18 +++++++++--------- app/views/layouts/_public_head_panel.html.haml | 2 +- app/views/profiles/accounts/show.html.haml | 2 +- app/views/profiles/groups/index.html.haml | 6 +++--- .../profiles/notifications/_settings.html.haml | 2 +- app/views/profiles/show.html.haml | 2 +- app/views/projects/_dropdown.html.haml | 6 +++--- app/views/projects/_issuable_form.html.haml | 4 ++-- app/views/projects/_settings_nav.html.haml | 12 ++++++------ app/views/projects/blame/show.html.haml | 2 +- app/views/projects/blob/_blob.html.haml | 4 ++-- app/views/projects/blob/_download.html.haml | 2 +- app/views/projects/branches/_branch.html.haml | 6 +++--- app/views/projects/branches/index.html.haml | 2 +- app/views/projects/branches/new.html.haml | 2 +- .../projects/commit/_commit_box.html.haml | 4 ++-- app/views/projects/commits/_commit.html.haml | 2 +- app/views/projects/commits/_commits.html.haml | 2 +- app/views/projects/commits/show.html.haml | 2 +- .../projects/deploy_keys/_deploy_key.html.haml | 6 +++--- app/views/projects/deploy_keys/index.html.haml | 2 +- app/views/projects/diffs/_file.html.haml | 2 +- app/views/projects/diffs/_stats.html.haml | 10 +++++----- app/views/projects/edit.html.haml | 6 +++--- app/views/projects/edit_tree/show.html.haml | 4 ++-- app/views/projects/fork.html.haml | 4 ++-- app/views/projects/graphs/show.html.haml | 2 +- app/views/projects/import.html.haml | 2 +- app/views/projects/issues/_head.html.haml | 8 ++++---- app/views/projects/issues/_issue.html.haml | 6 +++--- app/views/projects/issues/_issues.html.haml | 4 ++-- app/views/projects/issues/index.html.haml | 2 +- app/views/projects/issues/show.html.haml | 4 ++-- .../merge_requests/_merge_request.html.haml | 8 ++++---- .../merge_requests/_new_submit.html.haml | 6 +++--- .../projects/merge_requests/_show.html.haml | 4 ++-- .../projects/merge_requests/index.html.haml | 8 ++++---- .../merge_requests/show/_commits.html.haml | 2 +- .../merge_requests/show/_mr_accept.html.haml | 4 ++-- .../merge_requests/show/_mr_ci.html.haml | 10 +++++----- .../merge_requests/show/_mr_title.html.haml | 4 ++-- .../show/_remove_source_branch.html.haml | 4 ++-- .../show/_state_widget.html.haml | 2 +- .../projects/milestones/_milestone.html.haml | 2 +- app/views/projects/milestones/index.html.haml | 4 ++-- app/views/projects/milestones/show.html.haml | 4 ++-- app/views/projects/network/show.html.haml | 2 +- app/views/projects/new.html.haml | 6 +++--- app/views/projects/new_tree/show.html.haml | 2 +- .../notes/_diff_notes_with_reply.html.haml | 2 +- .../_diff_notes_with_reply_parallel.html.haml | 4 ++-- app/views/projects/notes/_form.html.haml | 2 +- app/views/projects/notes/_note.html.haml | 16 ++++++++-------- .../notes/discussions/_active.html.haml | 2 +- .../notes/discussions/_commit.html.haml | 2 +- .../notes/discussions/_outdated.html.haml | 2 +- .../protected_branches/index.html.haml | 2 +- .../repositories/_download_archive.html.haml | 14 +++++++------- app/views/projects/show.html.haml | 6 +++--- app/views/projects/snippets/show.html.haml | 2 +- app/views/projects/tags/_tag.html.haml | 4 ++-- app/views/projects/tags/index.html.haml | 2 +- app/views/projects/tags/new.html.haml | 2 +- .../team_members/_group_members.html.haml | 2 +- .../team_members/_team_member.html.haml | 2 +- app/views/projects/tree/_readme.html.haml | 2 +- app/views/projects/tree/_spinner.html.haml | 2 +- .../projects/tree/_submodule_item.html.haml | 2 +- app/views/projects/tree/_tree.html.haml | 4 ++-- app/views/projects/wikis/_main_links.html.haml | 2 +- app/views/projects/wikis/_nav.html.haml | 4 ++-- app/views/search/_filter.html.haml | 4 ++-- app/views/search/_project_filter.html.haml | 8 ++++---- app/views/search/_snippet_filter.html.haml | 4 ++-- app/views/search/results/_blob.html.haml | 2 +- app/views/search/results/_empty.html.haml | 2 +- app/views/search/results/_note.html.haml | 2 +- .../search/results/_snippet_blob.html.haml | 4 ++-- .../search/results/_snippet_title.html.haml | 2 +- app/views/search/results/_wiki_blob.html.haml | 2 +- app/views/shared/_file_hljs.html.haml | 2 +- app/views/shared/_filter.html.haml | 2 +- app/views/shared/_project_filter.html.haml | 6 +++--- app/views/snippets/_snippet.html.haml | 2 +- app/views/snippets/show.html.haml | 4 ++-- app/views/users/show.html.haml | 2 +- features/steps/profile/group.rb | 8 ++++---- spec/helpers/notifications_helper_spec.rb | 8 ++++---- spec/support/login_helpers.rb | 2 +- 141 files changed, 290 insertions(+), 290 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0250b4a23c..86f544091c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ v 7.4.0 - Fail harder in the backup script - Zen mode for wiki and milestones (Robert Schilling) - Move Emoji parsing to html-pipeline-gitlab (Robert Schilling) + - Font Awesome 4.2 integration (Sullivan Senechal) v 7.3.2 - Fix creating new file via web editor diff --git a/Gemfile b/Gemfile index 3d9af1c91c..3ea6adf5dc 100644 --- a/Gemfile +++ b/Gemfile @@ -180,7 +180,7 @@ gem "jquery-ui-rails" gem "jquery-scrollto-rails" gem "raphael-rails", "~> 2.1.2" gem 'bootstrap-sass', '~> 3.0' -gem "font-awesome-rails", '~> 3.2' +gem "font-awesome-rails", '~> 4.2' gem "gitlab_emoji", "~> 0.0.1.1" gem "gon", '~> 5.0.0' gem 'nprogress-rails' diff --git a/Gemfile.lock b/Gemfile.lock index d0f29258ff..42f50d5880 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -152,7 +152,7 @@ GEM net-ssh (>= 2.1.3) fog-json (1.0.0) multi_json (~> 1.0) - font-awesome-rails (3.2.1.3) + font-awesome-rails (4.2.0.0) railties (>= 3.2, < 5.0) foreman (0.63.0) dotenv (>= 0.7) @@ -614,7 +614,7 @@ DEPENDENCIES factory_girl_rails ffaker fog (~> 1.14) - font-awesome-rails (~> 3.2) + font-awesome-rails (~> 4.2) foreman gemnasium-gitlab-service (~> 0.2) github-markup diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 8d377057d1..a1a4dc8e24 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -172,8 +172,8 @@ $ -> # Show/hide comments on diff $("body").on "click", ".js-toggle-diff-comments", (e) -> $(@).find('i'). - toggleClass('icon-chevron-down'). - toggleClass('icon-chevron-up') + toggleClass('fa fa-chevron-down'). + toggleClass('fa fa-chevron-up') $(@).closest(".diff-file").find(".notes_holder").toggle() e.preventDefault() diff --git a/app/assets/javascripts/behaviors/toggler_behavior.coffee b/app/assets/javascripts/behaviors/toggler_behavior.coffee index 1b2ed9efc2..177b691827 100644 --- a/app/assets/javascripts/behaviors/toggler_behavior.coffee +++ b/app/assets/javascripts/behaviors/toggler_behavior.coffee @@ -8,7 +8,7 @@ $ -> # $("body").on "click", ".js-toggle-button", (e) -> $(@).find('i'). - toggleClass('icon-chevron-down'). - toggleClass('icon-chevron-up') + toggleClass('fa fa-chevron-down'). + toggleClass('fa fa-chevron-up') $(@).closest(".js-toggle-container").find(".js-toggle-content").toggle() e.preventDefault() diff --git a/app/assets/javascripts/markdown_area.js.coffee b/app/assets/javascripts/markdown_area.js.coffee index fca7b5bc03..a0ebfc98ce 100644 --- a/app/assets/javascripts/markdown_area.js.coffee +++ b/app/assets/javascripts/markdown_area.js.coffee @@ -7,8 +7,8 @@ $(document).ready -> divHover = "
" divSpinner = "
" divAlert = "
" - iconPicture = "" - iconSpinner = "" + iconPicture = "" + iconSpinner = "" btnAlert = "" project_image_path_upload = window.project_image_path_upload or null diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss index 34b0608646..45044c5acb 100644 --- a/app/assets/stylesheets/gl_bootstrap.scss +++ b/app/assets/stylesheets/gl_bootstrap.scss @@ -124,7 +124,7 @@ $list-group-active-bg: $bg_primary; color: #888; text-shadow: 0 1px 1px #fff; } - i[class^="icon-"] { + i[class~="fa"] { line-height: 14px; } } diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss index d1bdc9aa17..7eb42fddad 100644 --- a/app/assets/stylesheets/sections/notes.scss +++ b/app/assets/stylesheets/sections/notes.scss @@ -119,8 +119,7 @@ ul.notes { display: none; float: right; - [class^="icon-"], - [class*="icon-"] { + [class~="fa"] { font-size: 16px; line-height: 16px; vertical-align: middle; diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 728c504107..34d312b410 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -229,7 +229,7 @@ module ApplicationHelper css_class << " hide" unless visible content_tag :div, class: css_class do - content_tag(:i, nil, class: 'icon-spinner icon-spin') + text + content_tag(:i, nil, class: 'fa fa-spinner fa-spin') + text end end diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 10a895d8ca..6aeab7bb8c 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -36,10 +36,10 @@ module EventsHelper def icon_for_event { - EventFilter.push => "icon-upload-alt", - EventFilter.merged => "icon-check", - EventFilter.comments => "icon-comments", - EventFilter.team => "icon-user", + EventFilter.push => 'fa fa-upload', + EventFilter.merged => 'fa fa-check-square-o', + EventFilter.comments => 'fa fa-comments', + EventFilter.team => 'fa fa-user', } end diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index f0f771b4ba..aaa8f8d007 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -1,21 +1,21 @@ module IconsHelper def boolean_to_icon(value) if value.to_s == "true" - content_tag :i, nil, class: 'icon-circle cgreen' + content_tag :i, nil, class: 'fa fa-circle cgreen' else - content_tag :i, nil, class: 'icon-off clgray' + content_tag :i, nil, class: 'fa fa-power-off clgray' end end def public_icon - content_tag :i, nil, class: 'icon-globe' + content_tag :i, nil, class: 'fa fa-globe' end def internal_icon - content_tag :i, nil, class: 'icon-shield' + content_tag :i, nil, class: 'fa fa-shield' end def private_icon - content_tag :i, nil, class: 'icon-lock' + content_tag :i, nil, class: 'fa fa-lock' end end diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 15d4b875c4..901052edec 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -69,7 +69,7 @@ module NotesHelper button_tag class: 'btn reply-btn js-discussion-reply-button', data: data, title: 'Add a reply' do - link_text = content_tag(:i, nil, class: 'icon-comment') + link_text = content_tag(:i, nil, class: 'fa fa-comment') link_text << ' Reply' end end diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 6c43f97446..bad380e98a 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -1,13 +1,13 @@ module NotificationsHelper def notification_icon(notification) if notification.disabled? - content_tag :i, nil, class: 'icon-volume-off ns-mute' + content_tag :i, nil, class: 'fa fa-volume-off ns-mute' elsif notification.participating? - content_tag :i, nil, class: 'icon-volume-down ns-part' + content_tag :i, nil, class: 'fa fa-volume-down ns-part' elsif notification.watch? - content_tag :i, nil, class: 'icon-volume-up ns-watch' + content_tag :i, nil, class: 'fa fa-volume-up ns-watch' else - content_tag :i, nil, class: 'icon-circle-blank ns-default' + content_tag :i, nil, class: 'fa fa-circle-o ns-default' end end end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 6a16f112cb..6df7dae731 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -133,7 +133,7 @@ module ProjectsHelper 'Star' end - content_tag('i', ' ', class: 'icon-star') + toggle_text + content_tag('i', ' ', class: 'fa fa-star') + toggle_text end count_html = content_tag('span', class: 'count') do @@ -157,7 +157,7 @@ module ProjectsHelper end def link_to_toggle_fork - out = content_tag(:i, '', class: 'icon-code-fork') + out = content_tag(:i, '', class: 'fa fa-code-fork') out << ' Fork' out << content_tag(:span, class: 'count') do @project.forks_count.to_s diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index ed3c401d87..c3b537eac4 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -36,9 +36,9 @@ module TreeHelper # type - String type of the tree item; either 'folder' or 'file' def tree_icon(type) icon_class = if type == 'folder' - 'icon-folder-close' + 'fa fa-folder' else - 'icon-file-alt' + 'fa fa-file-o' end content_tag :i, nil, class: icon_class diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml index c79d1280dd..9dcf7b488e 100644 --- a/app/views/admin/background_jobs/show.html.haml +++ b/app/views/admin/background_jobs/show.html.haml @@ -8,7 +8,7 @@ .panel-body - if @sidekiq_processes.empty? %h4.cred - %i.icon-warning-sign + %i.fa.fa-exclamation-triangle There are no running sidekiq processes. Please restart GitLab - else %table.table @@ -32,10 +32,10 @@ .clearfix %p - %i.icon-exclamation-sign + %i.fa.fa-exclamation-circle If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'. %p - %i.icon-exclamation-sign + %i.fa.fa-exclamation-circle If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u #{Settings.gitlab.user} -f sidekiq) and restart GitLab. diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml index c58ca2c9a3..7b483ee655 100644 --- a/app/views/admin/broadcast_messages/index.html.haml +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -3,7 +3,7 @@ %p.light Broadcast messages are displayed for every user and can be used to notify users about scheduled maintenance, recent upgrades and more. .broadcast-message-preview - %i.icon-bullhorn + %i.fa.fa-bullhorn %span Your message here = form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal'} do |f| @@ -53,7 +53,7 @@ #{broadcast_message.ends_at.to_s(:short)}   = link_to [:admin, broadcast_message], method: :delete, remote: true, class: 'remove-row btn btn-tiny' do - %i.icon-remove.cred + %i.fa.fa-times.cred .message= broadcast_message.message diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 31990ee593..c56863ce27 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -17,7 +17,7 @@ = f.label :avatar, "Group avatar", class: 'control-label' .col-sm-10 %a.choose-btn.btn.btn-small.js-choose-group-avatar-button - %i.icon-paper-clip + %i.fa.fa-paperclip %span Choose File ...   %span.file_name.js-avatar-filename File name... diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index 9a0d596792..09105679bd 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -24,7 +24,7 @@ %h4 = link_to [:admin, group] do - %i.icon-folder-close + %i.fa.fa-folder = group.name → diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index d59d2a2317..c1a9214b77 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -2,7 +2,7 @@ Group: #{@group.name} = link_to edit_admin_group_path(@group), class: "btn pull-right" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit %hr .row @@ -81,6 +81,6 @@ %span.pull-right.light = member.human_access = link_to group_group_members_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do - %i.icon-minus.icon-white + %i.fa.fa-minus.fa-inverse .panel-footer = paginate @members, param_name: 'members_page', theme: 'gitlab' diff --git a/app/views/admin/logs/show.html.haml b/app/views/admin/logs/show.html.haml index cce8aeb02c..b3f8f012f0 100644 --- a/app/views/admin/logs/show.html.haml +++ b/app/views/admin/logs/show.html.haml @@ -13,11 +13,11 @@ .tab-pane.active#githost .file-holder#README .file-title - %i.icon-file + %i.fa.fa-file githost.log .pull-right = link_to '#', class: 'log-bottom' do - %i.icon-arrow-down + %i.fa.fa-arrow-down Scroll down .file-content.logs %ol @@ -27,11 +27,11 @@ .tab-pane#application .file-holder#README .file-title - %i.icon-file + %i.fa.fa-file application.log .pull-right = link_to '#', class: 'log-bottom' do - %i.icon-arrow-down + %i.fa.fa-arrow-down Scroll down .file-content.logs %ol @@ -41,11 +41,11 @@ .tab-pane#production .file-holder#README .file-title - %i.icon-file + %i.fa.fa-file production.log .pull-right = link_to '#', class: 'log-bottom' do - %i.icon-arrow-down + %i.fa.fa-arrow-down Scroll down .file-content.logs %ol @@ -55,11 +55,11 @@ .tab-pane#sidekiq .file-holder#README .file-title - %i.icon-file + %i.fa.fa-file sidekiq.log .pull-right = link_to '#', class: 'log-bottom' do - %i.icon-arrow-down + %i.fa.fa-arrow-down Scroll down .file-content.logs %ol diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 8413f0cb7f..6d53619985 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -1,7 +1,7 @@ %h3.page-title Project: #{@project.name_with_namespace} = link_to edit_project_path(@project), class: "btn pull-right" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit %hr .row @@ -98,7 +98,7 @@ group members (#{@group.group_members.count}) .pull-right = link_to admin_group_path(@group), class: 'btn btn-small' do - %i.icon-edit + %i.fa.fa-pencil-square-o %ul.well-list - @group_members.each do |member| = render 'groups/group_members/group_member', member: member, show_controls: false @@ -112,7 +112,7 @@ (#{@project.users.count}) .pull-right = link_to project_team_index_path(@project), class: "btn btn-tiny" do - %i.icon-edit + %i.fa.fa-pencil-square-o Manage Access %ul.well-list.team_members - @project_members.each do |project_member| @@ -127,6 +127,6 @@ - else %span.light= project_member.human_access = link_to project_team_member_path(@project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, remote: true, class: "btn btn-small btn-remove" do - %i.icon-remove + %i.fa.fa-times .panel-footer = paginate @project_members, param_name: 'project_members_page', theme: 'gitlab' diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index f2fa5ea91c..5c2664e14f 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -23,7 +23,7 @@ .form-group = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control' = button_tag class: 'btn btn-primary' do - %i.icon-search + %i.fa.fa-search %hr = link_to 'Reset', admin_users_path, class: "btn btn-cancel" @@ -38,9 +38,9 @@ %li .list-item-name - if user.blocked? - %i.icon-lock.cred + %i.fa.fa-lock.cred - else - %i.icon-user.cgreen + %i.fa.fa-user.cgreen = link_to user.name, [:admin, user] - if user.admin? %strong.cred (Admin) @@ -48,7 +48,7 @@ %span.cred It's you! .pull-right %span.light - %i.icon-envelope + %i.fa.fa-envelope = mail_to user.email, user.email, class: 'light'   = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-small" diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index c8295cf707..211d77d518 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -8,7 +8,7 @@ .pull-right = link_to edit_admin_user_path(@user), class: "btn btn-grouped" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit %hr %ul.nav.nav-tabs @@ -45,7 +45,7 @@ %span.light Secondary email: %strong= email.email = link_to remove_email_admin_user_path(@user, email), data: { confirm: "Are you sure you want to remove #{email.email}?" }, method: :delete, class: "btn-tiny btn btn-remove pull-right", title: 'Remove secondary email', id: "remove_email_#{email.id}" do - %i.icon-remove + %i.fa.fa-times %li %span.light Can create groups: @@ -177,7 +177,7 @@ %span.light= user_group.human_access - unless user_group.owner? = link_to group_group_member_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do - %i.icon-remove.icon-white + %i.fa.fa-times.fa-inverse - else .nothing-here-block This user has no groups. @@ -216,4 +216,4 @@ - if tm.respond_to? :project = link_to project_team_member_path(project, @user), data: { confirm: remove_from_project_team_message(project, @user) }, remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do - %i.icon-remove + %i.fa.fa-times diff --git a/app/views/dashboard/_groups.html.haml b/app/views/dashboard/_groups.html.haml index 9bcc77b8d8..5460cf56f2 100644 --- a/app/views/dashboard/_groups.html.haml +++ b/app/views/dashboard/_groups.html.haml @@ -3,7 +3,7 @@ = search_field_tag :filter_group, nil, placeholder: 'Filter by name', class: 'dash-filter form-control' - if current_user.can_create_group? = link_to new_group_path, class: "btn btn-new pull-right" do - %i.icon-plus + %i.fa.fa-plus New group %ul.well-list.dash-list - groups.each do |group| @@ -13,7 +13,7 @@ %span.group-name.filter-title = truncate(group.name, length: 35) %span.arrow - %i.icon-angle-right + %i.fa.fa-angle-right - if groups.blank? %li .nothing-here-block You have no groups yet. diff --git a/app/views/dashboard/_project.html.haml b/app/views/dashboard/_project.html.haml index e326bee53a..89ed510275 100644 --- a/app/views/dashboard/_project.html.haml +++ b/app/views/dashboard/_project.html.haml @@ -9,4 +9,4 @@ %span.project-name.filter-title = project.name %span.arrow - %i.icon-angle-right + %i.fa.fa-angle-right diff --git a/app/views/dashboard/_projects.html.haml b/app/views/dashboard/_projects.html.haml index 0cc253a8dd..3598425777 100644 --- a/app/views/dashboard/_projects.html.haml +++ b/app/views/dashboard/_projects.html.haml @@ -3,7 +3,7 @@ = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-filter form-control' - if current_user.can_create_project? = link_to new_project_path, class: "btn btn-new pull-right" do - %i.icon-plus + %i.fa.fa-plus New project %ul.well-list.dash-list @@ -21,4 +21,4 @@ .pull-right = link_to projects_dashboard_path do Show all - %i.icon-angle-right + %i.fa.fa-angle-right diff --git a/app/views/dashboard/_projects_filter.html.haml b/app/views/dashboard/_projects_filter.html.haml index e4fa2d59e8..b65e882e69 100644 --- a/app/views/dashboard/_projects_filter.html.haml +++ b/app/views/dashboard/_projects_filter.html.haml @@ -37,7 +37,7 @@ - @groups.each do |group| %li{ class: (group.name == params[:group]) ? 'active' : 'light' } = link_to projects_dashboard_filter_path(group: group.name) do - %i.icon-folder-close-alt + %i.fa.fa-folder-o = group.name %small.pull-right = group.projects.count @@ -51,5 +51,5 @@ - @tags.each do |tag| %li{ class: (tag.name == params[:tag]) ? 'active' : 'light' } = link_to projects_dashboard_filter_path(scope: params[:scope], tag: tag.name) do - %i.icon-tag + %i.fa.fa-tag = tag.name diff --git a/app/views/dashboard/_sidebar.html.haml b/app/views/dashboard/_sidebar.html.haml index fed4b2776a..add9eb7fa2 100644 --- a/app/views/dashboard/_sidebar.html.haml +++ b/app/views/dashboard/_sidebar.html.haml @@ -18,7 +18,7 @@ %span.rss-icon = link_to dashboard_path(:atom, { private_token: current_user.private_token }) do %strong - %i.icon-rss + %i.fa.fa-rss News Feed %hr diff --git a/app/views/dashboard/_zero_authorized_projects.html.haml b/app/views/dashboard/_zero_authorized_projects.html.haml index ff85e32bc4..711e607f0b 100644 --- a/app/views/dashboard/_zero_authorized_projects.html.haml +++ b/app/views/dashboard/_zero_authorized_projects.html.haml @@ -3,7 +3,7 @@ %hr %div .dashboard-intro-icon - %i.icon-bookmark-empty + %i.fa.fa-bookmark-o %div %p.slead You don't have access to any projects right now. @@ -23,7 +23,7 @@ %hr %div .dashboard-intro-icon - %i.icon-group + %i.fa.fa-users %div %p.slead You can create a group for several dependent projects. @@ -37,7 +37,7 @@ %hr %div .dashboard-intro-icon - %i.icon-globe + %i.fa.fa-globe %div %p.slead There are diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index d3ff291eaa..7c1f1ddbb8 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -7,7 +7,7 @@ .row .fixed.sidebar-expand-button.hidden-lg.hidden-md - %i.icon-list.icon-2x + %i.fa.fa-list.fa-2x .col-md-3.responsive-side = render 'shared/filter', entity: 'issue' .col-md-9 diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index 7a9ea9f6f9..c96584c7b6 100644 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -7,7 +7,7 @@ %hr .row .fixed.sidebar-expand-button.hidden-lg.hidden-md - %i.icon-list.icon-2x + %i.fa.fa-list.fa-2x .col-md-3.responsive-side = render 'shared/filter', entity: 'merge_request' .col-md-9 diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml index 2714ebc53d..f124c688be 100644 --- a/app/views/dashboard/projects.html.haml +++ b/app/views/dashboard/projects.html.haml @@ -40,23 +40,23 @@ - if current_user.can_leave_project?(project) .pull-right = link_to leave_project_team_members_path(project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do - %i.icon-signout + %i.fa.fa-sign-out Leave - if project.forked_from_project %small.pull-right - %i.icon-code-fork + %i.fa.fa-code-fork Forked from: = link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project) .project-info .pull-right - if project.archived? %span.label - %i.icon-archive + %i.fa.fa-archive Archived - project.tags.each do |tag| %span.label.label-info - %i.icon-tag + %i.fa.fa-tag = tag.name - if project.description.present? %p= truncate project.description, length: 100 diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index 6a08b1aa64..10951af6a0 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -6,7 +6,7 @@ = render 'sidebar' .fixed.sidebar-expand-button.hidden-lg.hidden-md - %i.icon-list.icon-2x + %i.fa.fa-list.fa-2x - else = render "zero_authorized_projects" diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml index ad2afbce14..6ec8e54fba 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -9,7 +9,7 @@ .event-body .event-note .md - %i.icon-comment-alt.event-note-icon + %i.fa.fa-comment-o.event-note-icon = event_note(event.target.note) - note = event.target - if note.attachment.url @@ -18,5 +18,5 @@ = image_tag note.attachment.secure_url, class: 'note-image-attach' - else = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do - %i.icon-paper-clip + %i.fa.fa-paperclip = note.attachment_identifier diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml index 80ddd5c1bd..c8243ff782 100644 --- a/app/views/explore/groups/index.html.haml +++ b/app/views/explore/groups/index.html.haml @@ -36,7 +36,7 @@ .clearfix %h4 = link_to group_path(id: group.path) do - %i.icon-group + %i.fa.fa-users = group.name .clearfix %p diff --git a/app/views/explore/projects/_project.html.haml b/app/views/explore/projects/_project.html.haml index fd5aacbfdb..4bc79d0a8c 100644 --- a/app/views/explore/projects/_project.html.haml +++ b/app/views/explore/projects/_project.html.haml @@ -21,5 +21,5 @@ · = link_to pluralize(project.repository.tag_names.count, 'tag'), project_tags_path(project) - else - %i.icon-warning-sign + %i.fa.fa-exclamation-triangle Empty repository diff --git a/app/views/explore/projects/starred.html.haml b/app/views/explore/projects/starred.html.haml index 9c793d4050..d4b1140551 100644 --- a/app/views/explore/projects/starred.html.haml +++ b/app/views/explore/projects/starred.html.haml @@ -1,6 +1,6 @@ .explore-trending-block %p.lead - %i.icon-comments-alt + %i.fa.fa-comments-o See most starred projects %hr .public-projects diff --git a/app/views/explore/projects/trending.html.haml b/app/views/explore/projects/trending.html.haml index 18bb1ac0ba..9cad923893 100644 --- a/app/views/explore/projects/trending.html.haml +++ b/app/views/explore/projects/trending.html.haml @@ -1,6 +1,6 @@ .explore-trending-block %p.lead - %i.icon-comments-alt + %i.fa.fa-comments-o See most discussed projects for last month %hr .public-projects diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 2ebff21b81..2c65b3049e 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -4,7 +4,7 @@ - if can? current_user, :create_projects, @group .panel-head-actions = link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do - %i.icon-plus + %i.fa.fa-plus New project %ul.well-list - if projects.blank? @@ -18,4 +18,4 @@ %span.project-name = project.name %span.arrow - %i.icon-angle-right + %i.fa.fa-angle-right diff --git a/app/views/groups/_settings_nav.html.haml b/app/views/groups/_settings_nav.html.haml index 32eae31a47..ec1fb4a2c0 100644 --- a/app/views/groups/_settings_nav.html.haml +++ b/app/views/groups/_settings_nav.html.haml @@ -1,10 +1,10 @@ %ul.nav.nav-pills.nav-stacked.nav-stacked-menu = nav_link(path: 'groups#edit') do = link_to edit_group_path(@group) do - %i.icon-edit + %i.fa.fa-pencil-square-o Group = nav_link(path: 'groups#projects') do = link_to projects_group_path(@group) do - %i.icon-folder-close + %i.fa.fa-folder Projects diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 97f22df044..0b15affe78 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -32,7 +32,7 @@ - else You can upload a group avatar here %a.choose-btn.btn.btn-small.js-choose-group-avatar-button - %i.icon-paper-clip + %i.fa.fa-paperclip %span Choose File ...   %span.file_name.js-avatar-filename File name... diff --git a/app/views/groups/group_members/_group_member.html.haml b/app/views/groups/group_members/_group_member.html.haml index 099e50a384..d05016d9c3 100644 --- a/app/views/groups/group_members/_group_member.html.haml +++ b/app/views/groups/group_members/_group_member.html.haml @@ -15,14 +15,14 @@ - if show_controls - if can?(current_user, :modify, member) = link_to '#', class: "btn-tiny btn js-toggle-button", title: 'Edit access level' do - %i.icon-edit + %i.fa.fa-pencil-square-o - if can?(current_user, :destroy, member) - if current_user == member.user = link_to leave_profile_group_path(@group), data: { confirm: leave_group_message(@group.name)}, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do - %i.icon-minus.icon-white + %i.fa.fa-minus.fa-inverse - else = link_to group_group_member_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do - %i.icon-minus.icon-white + %i.fa.fa-minus.fa-inverse .edit-member.hide.js-toggle-content = form_for [@group, member], remote: true do |f| diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 0152ae8683..1932ba2f64 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -11,7 +11,7 @@ .row .fixed.sidebar-expand-button.hidden-lg.hidden-md - %i.icon-list.icon-2x + %i.fa.fa-list.fa-2x .col-md-3.responsive-side = render 'shared/filter', entity: 'issue' .col-md-9 diff --git a/app/views/groups/members.html.haml b/app/views/groups/members.html.haml index ebf407d4ef..ba554cd5ef 100644 --- a/app/views/groups/members.html.haml +++ b/app/views/groups/members.html.haml @@ -19,7 +19,7 @@ .pull-right = link_to '#', class: 'btn btn-new js-toggle-button' do Add members - %i.icon-chevron-down + %i.fa.fa-chevron-down .js-toggle-content.hide.new-group-member-holder = render "new_group_member" diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml index 71d346d046..86d5acdaa3 100644 --- a/app/views/groups/merge_requests.html.haml +++ b/app/views/groups/merge_requests.html.haml @@ -10,7 +10,7 @@ %hr .row .fixed.sidebar-expand-button.hidden-lg.hidden-md - %i.icon-list.icon-2x + %i.fa.fa-list.fa-2x .col-md-3.responsive-side = render 'shared/filter', entity: 'merge_request' .col-md-9 diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml index 54e901173f..2727525f07 100644 --- a/app/views/groups/milestones/index.html.haml +++ b/app/views/groups/milestones/index.html.haml @@ -11,7 +11,7 @@ .row .fixed.sidebar-expand-button.hidden-lg.hidden-md - %i.icon-list.icon-2x + %i.fa.fa-list.fa-2x .col-md-3.responsive-side = render 'groups/filter', entity: 'milestone' .col-md-9 diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index cdc087f949..235e299343 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -17,7 +17,7 @@ = f.label :avatar, "Group avatar", class: 'control-label' .col-sm-10 %a.choose-btn.btn.btn-small.js-choose-group-avatar-button - %i.icon-paper-clip + %i.fa.fa-paperclip %span Choose File ...   %span.file_name.js-avatar-filename File name... diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index a5e752d776..65a66355c5 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -9,7 +9,7 @@ - if can? current_user, :manage_group, @group .panel-head-actions = link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do - %i.icon-plus + %i.fa.fa-plus New Project %ul.well-list - @projects.each do |project| diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 6db393c882..4f4fc537d3 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -30,7 +30,7 @@ .prepend-top-20 = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed" do %strong - %i.icon-rss + %i.fa.fa-rss News Feed %hr diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml index ff83ff5bc4..7b21ca30d8 100644 --- a/app/views/help/_shortcuts.html.haml +++ b/app/views/help/_shortcuts.html.haml @@ -29,12 +29,12 @@ %tr %td.shortcut .key - %i.icon-arrow-up + %i.fa.fa-arrow-up %td Move selection up %tr %td.shortcut .key - %i.icon-arrow-down + %i.fa.fa-arrow-down %td Move selection down %tr %td.shortcut @@ -132,28 +132,28 @@ %tr %td.shortcut .key - %i.icon-arrow-left + %i.fa.fa-arrow-left \/ .key h %td Scroll left %tr %td.shortcut .key - %i.icon-arrow-right + %i.fa.fa-arrow-right \/ .key l %td Scroll right %tr %td.shortcut .key - %i.icon-arrow-up + %i.fa.fa-arrow-up \/ .key k %td Scroll up %tr %td.shortcut .key - %i.icon-arrow-down + %i.fa.fa-arrow-down \/ .key j %td Scroll down @@ -161,7 +161,7 @@ %td.shortcut .key shift - %i.icon-arrow-up + %i.fa.fa-arrow-up \/ .key shift k @@ -170,7 +170,7 @@ %td.shortcut .key shift - %i.icon-arrow-down + %i.fa.fa-arrow-down \/ .key shift j diff --git a/app/views/layouts/_broadcast.html.haml b/app/views/layouts/_broadcast.html.haml index 5794e3de33..e7d477c225 100644 --- a/app/views/layouts/_broadcast.html.haml +++ b/app/views/layouts/_broadcast.html.haml @@ -1,4 +1,4 @@ - if broadcast_message.present? .broadcast-message{ style: broadcast_styling(broadcast_message) } - %i.icon-bullhorn + %i.fa.fa-bullhorn = broadcast_message.message diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index 7c727aca78..5dcaee2fa0 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -10,7 +10,7 @@ %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"} %span.sr-only Toggle navigation - %i.icon-reorder + %i.fa.fa-bars .navbar-collapse.collapse %ul.nav.navbar-nav @@ -18,31 +18,31 @@ = render "layouts/search" %li.visible-sm.visible-xs = link_to search_path, title: "Search", class: 'has_bottom_tooltip', 'data-original-title' => 'Search area' do - %i.icon-search + %i.fa.fa-search %li = link_to help_path, title: 'Help', class: 'has_bottom_tooltip', 'data-original-title' => 'Help' do - %i.icon-question-sign + %i.fa.fa-question-circle %li = link_to explore_root_path, title: "Explore", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do - %i.icon-globe + %i.fa.fa-globe %li = link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'My snippets' do - %i.icon-paste + %i.fa.fa-clipboard - if current_user.is_admin? %li = link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do - %i.icon-cogs + %i.fa.fa-cogs - if current_user.can_create_project? %li = link_to new_project_path, title: "New project", class: 'has_bottom_tooltip', 'data-original-title' => 'New project' do - %i.icon-plus + %i.fa.fa-plus %li = link_to profile_path, title: "Profile settings", class: 'has_bottom_tooltip', 'data-original-title' => 'Profile settings"' do - %i.icon-user + %i.fa.fa-user %li = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do - %i.icon-signout + %i.fa.fa-sign-out %li.hidden-xs = link_to current_user, class: "profile-pic", id: 'profile-pic' do = image_tag avatar_icon(current_user.email, 26), alt: 'User activity' diff --git a/app/views/layouts/_public_head_panel.html.haml b/app/views/layouts/_public_head_panel.html.haml index 945c66e2ad..9bfc14d16c 100644 --- a/app/views/layouts/_public_head_panel.html.haml +++ b/app/views/layouts/_public_head_panel.html.haml @@ -10,7 +10,7 @@ %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"} %span.sr-only Toggle navigation - %i.icon-reorder + %i.fa.fa-bars .pull-right.hidden-xs = link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-new' diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index c60e1ca929..a21dcff41c 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -52,7 +52,7 @@   .loading-gif.hide %p - %i.icon-spinner.icon-spin + %i.fa.fa-spinner.fa-spin Saving new username %p.light = user_url(@user) diff --git a/app/views/profiles/groups/index.html.haml b/app/views/profiles/groups/index.html.haml index 2efe72b1bb..e9ffca8faf 100644 --- a/app/views/profiles/groups/index.html.haml +++ b/app/views/profiles/groups/index.html.haml @@ -3,7 +3,7 @@ - if current_user.can_create_group? %span.pull-right = link_to new_group_path, class: "btn btn-new" do - %i.icon-plus + %i.fa.fa-plus New Group %p.light Group members have access to all a group's projects @@ -19,12 +19,12 @@ .pull-right - if can?(current_user, :manage_group, group) = link_to edit_group_path(group), class: "btn-small btn btn-grouped" do - %i.icon-cogs + %i.fa.fa-cogs Settings - if can?(current_user, :destroy, user_group) = link_to leave_profile_group_path(group), data: { confirm: leave_group_message(group.name) }, method: :delete, class: "btn-small btn btn-grouped", title: 'Remove user from group' do - %i.icon-signout + %i.fa.fa-sign-out Leave = link_to group, class: 'group-name' do diff --git a/app/views/profiles/notifications/_settings.html.haml b/app/views/profiles/notifications/_settings.html.haml index 940c553d1b..2c85d2a9b2 100644 --- a/app/views/profiles/notifications/_settings.html.haml +++ b/app/views/profiles/notifications/_settings.html.haml @@ -1,5 +1,5 @@ %li - %span.notification-icon-holder + %span.notification.fa.fa-holder - if notification.global? = notification_icon(@notification) - else diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index ed19dccf53..d6b52f8615 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -78,7 +78,7 @@ or change it at #{link_to "gravatar.com", "http://gravatar.com"} %hr %a.choose-btn.btn.btn-small.js-choose-user-avatar-button - %i.icon-paper-clip + %i.fa.fa-paperclip %span Choose File ...   %span.file_name.js-avatar-filename File name... diff --git a/app/views/projects/_dropdown.html.haml b/app/views/projects/_dropdown.html.haml index e283bd2bf1..6ff4697033 100644 --- a/app/views/projects/_dropdown.html.haml +++ b/app/views/projects/_dropdown.html.haml @@ -1,7 +1,7 @@ - if current_user .dropdown.pull-right %a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"} - %i.icon-reorder + %i.fa.fa-bars %ul.dropdown-menu - if @project.issues_enabled && can?(current_user, :write_issue, @project) %li @@ -23,11 +23,11 @@ %li.divider %li = link_to new_project_branch_path(@project) do - %i.icon-code-fork + %i.fa.fa-code-fork Git branch %li = link_to new_project_tag_path(@project) do - %i.icon-tag + %i.fa.fa-tag Git tag diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml index 0ae1fb3cab..19aced7583 100644 --- a/app/views/projects/_issuable_form.html.haml +++ b/app/views/projects/_issuable_form.html.haml @@ -29,7 +29,7 @@ .form-group .issue-assignee = f.label :assignee_id, class: 'control-label' do - %i.icon-user + %i.fa.fa-user Assign to .col-sm-10 = project_users_select_tag("#{issuable.class.model_name.param_key}[assignee_id]", @@ -40,7 +40,7 @@ .form-group .issue-milestone = f.label :milestone_id, class: 'control-label' do - %i.icon-time + %i.fa.fa-clock-o Milestone .col-sm-10= f.select(:milestone_id, milestone_options(issuable), { include_blank: 'Select milestone' }, { class: 'select2' }) diff --git a/app/views/projects/_settings_nav.html.haml b/app/views/projects/_settings_nav.html.haml index 9b73f06a5b..2008f8c558 100644 --- a/app/views/projects/_settings_nav.html.haml +++ b/app/views/projects/_settings_nav.html.haml @@ -1,25 +1,25 @@ %ul.nav.nav-pills.nav-stacked.nav-stacked-menu.append-bottom-20.project-settings-nav = nav_link(path: 'projects#edit') do = link_to edit_project_path(@project), class: "stat-tab tab " do - %i.icon-edit + %i.fa.fa-pencil-square-o Project = nav_link(controller: [:team_members, :teams]) do = link_to project_team_index_path(@project), class: "team-tab tab" do - %i.icon-group + %i.fa.fa-users Members = nav_link(controller: :deploy_keys) do = link_to project_deploy_keys_path(@project) do - %i.icon-key + %i.fa.fa-key Deploy Keys = nav_link(controller: :hooks) do = link_to project_hooks_path(@project) do - %i.icon-link + %i.fa.fa-link Web Hooks = nav_link(controller: :services) do = link_to project_services_path(@project) do - %i.icon-cogs + %i.fa.fa-cogs Services = nav_link(controller: :protected_branches) do = link_to project_protected_branches_path(@project) do - %i.icon-lock + %i.fa.fa-lock Protected branches diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index aca6fde288..e5cde488c3 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -3,7 +3,7 @@ #tree-holder.tree-holder .file-holder .file-title - %i.icon-file + %i.fa.fa-file %span.file_name = @path %small= number_to_human_size @blob.size diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index be785daced..492dff437b 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -1,6 +1,6 @@ %ul.breadcrumb.repo-breadcrumb %li - %i.icon-angle-right + %i.fa.fa-angle-right = link_to project_tree_path(@project, @ref) do = @project.path - tree_breadcrumbs(@tree, 6) do |title, path| @@ -22,7 +22,7 @@ %div#tree-content-holder.tree-content-holder %article.file-holder .file-title.clearfix - %i.icon-file + %i.fa.fa-file %span.file_name = blob.name %small= number_to_human_size blob.size diff --git a/app/views/projects/blob/_download.html.haml b/app/views/projects/blob/_download.html.haml index cdbfee7cc6..74a45cd8ae 100644 --- a/app/views/projects/blob/_download.html.haml +++ b/app/views/projects/blob/_download.html.haml @@ -2,6 +2,6 @@ .center = link_to project_raw_path(@project, @id) do %h1.light - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt %h4 Download (#{number_to_human_size blob.size}) diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 08a537e054..8e58f3c247 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -7,19 +7,19 @@ %span.label.label-info default - if @project.protected_branch? branch.name %span.label.label-success - %i.icon-lock + %i.fa.fa-lock protected .pull-right - if can?(current_user, :download_code, @project) = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'btn-grouped btn-group-small' - if branch.name != @repository.root_ref = link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name), class: 'btn btn-grouped btn-small', method: :post, title: "Compare" do - %i.icon-copy + %i.fa.fa-files-o Compare - if can_remove_branch?(@project, branch.name) = link_to project_branch_path(@project, branch.name), class: 'btn btn-grouped btn-small btn-remove remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do - %i.icon-trash + %i.fa.fa-trash-o - if commit %ul.list-unstyled diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index 8bc4a8f7e9..9f2b1b5929 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -4,7 +4,7 @@ .pull-right - if can? current_user, :push_code, @project = link_to new_project_branch_path(@project), class: 'btn btn-create' do - %i.icon-add-sign + %i.fa.fa-add-sign New branch   .dropdown.inline diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml index 3f202f7ea6..f5a530d95f 100644 --- a/app/views/projects/branches/new.html.haml +++ b/app/views/projects/branches/new.html.haml @@ -3,7 +3,7 @@ %button{ type: "button", class: "close", "data-dismiss" => "alert"} × = @error %h3.page-title - %i.icon-code-fork + %i.fa.fa-code-fork New branch = form_tag project_branches_path, method: :post, class: "form-horizontal" do .form-group diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 2bc9048b2a..80ead5b96a 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -2,11 +2,11 @@ %div - if @notes_count > 0 %span.btn.disabled.btn-grouped - %i.icon-comment + %i.fa.fa-comment = @notes_count .pull-left.btn-group %a.btn.btn-grouped.dropdown-toggle{ data: {toggle: :dropdown} } - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt Download as %span.caret %ul.dropdown-menu diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 8e73663939..68852ba973 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -18,7 +18,7 @@ - if note_count > 0 %span.label.label-gray - %i.icon-comment= note_count + %i.fa.fa-comment= note_count - if commit.description? .commit-row-description.js-toggle-content diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index 77f795f23f..d57659065a 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -2,7 +2,7 @@ .row.commits-row .col-md-2 %h4 - %i.icon-calendar + %i.fa.fa-calendar %span= day.stamp("28 Aug, 2010") %p= pluralize(commits.count, 'commit') .col-md-10 diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 482a845558..5717c24c27 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -6,7 +6,7 @@ - if current_user && current_user.private_token .commits-feed-holder.hidden-xs.hidden-sm = link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed", class: 'btn' do - %i.icon-rss + %i.fa.fa-rss Commits feed %ul.breadcrumb.repo-breadcrumb diff --git a/app/views/projects/deploy_keys/_deploy_key.html.haml b/app/views/projects/deploy_keys/_deploy_key.html.haml index 2b4f36fb4b..a0345dbd9c 100644 --- a/app/views/projects/deploy_keys/_deploy_key.html.haml +++ b/app/views/projects/deploy_keys/_deploy_key.html.haml @@ -2,19 +2,19 @@ .pull-right - if @available_keys.include?(deploy_key) = link_to enable_project_deploy_key_path(@project, deploy_key), class: 'btn btn-small', method: :put do - %i.icon-plus + %i.fa.fa-plus Enable - else - if deploy_key.projects.count > 1 = link_to disable_project_deploy_key_path(@project, deploy_key), class: 'btn btn-small', method: :put do - %i.icon-off + %i.fa.fa-power-off Disable - else = link_to 'Remove', project_deploy_key_path(@project, deploy_key), data: { confirm: 'You are going to remove deploy key. Are you sure?'}, method: :delete, class: "btn btn-remove delete-key btn-small pull-right" = link_to project_deploy_key_path(deploy_key.projects.include?(@project) ? @project : deploy_key.projects.first, deploy_key) do - %i.icon-key + %i.fa.fa-key %strong= deploy_key.title %p.light.prepend-top-10 diff --git a/app/views/projects/deploy_keys/index.html.haml b/app/views/projects/deploy_keys/index.html.haml index f50aeba337..6f475e0b39 100644 --- a/app/views/projects/deploy_keys/index.html.haml +++ b/app/views/projects/deploy_keys/index.html.haml @@ -2,7 +2,7 @@ Deploy keys allow read-only access to the repository = link_to new_project_deploy_key_path(@project), class: "btn btn-new pull-right", title: "New Deploy Key" do - %i.icon-plus + %i.fa.fa-plus New Deploy Key %p.light diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 751df6a02e..c415ae2ddc 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -22,7 +22,7 @@ Wrap text   = link_to '#', class: 'js-toggle-diff-comments btn btn-small' do - %i.icon-chevron-down + %i.fa.fa-chevron-down Diff comments   diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml index 8ef7cc6e08..20e51d18da 100644 --- a/app/views/projects/diffs/_stats.html.haml +++ b/app/views/projects/diffs/_stats.html.haml @@ -11,7 +11,7 @@   = link_to '#', class: 'btn btn-small js-toggle-button' do Show diff stats - %i.icon-chevron-down + %i.fa.fa-chevron-down .file-stats.js-toggle-content.hide %ul.bordered-list - diffs.each_with_index do |diff, i| @@ -19,23 +19,23 @@ - if diff.deleted_file %span.deleted-file %a{href: "#diff-#{i}"} - %i.icon-minus + %i.fa.fa-minus = diff.old_path - elsif diff.renamed_file %span.renamed-file %a{href: "#diff-#{i}"} - %i.icon-minus + %i.fa.fa-minus = diff.old_path \-> = diff.new_path - elsif diff.new_file %span.new-file %a{href: "#diff-#{i}"} - %i.icon-plus + %i.fa.fa-plus = diff.new_path - else %span.edit-file %a{href: "#diff-#{i}"} - %i.icon-adjust + %i.fa.fa-adjust = diff.new_path diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index d9acb68551..5ee5641b06 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -89,13 +89,13 @@ .danger-settings.js-toggle-container .centered-light-block %h3 - %i.icon-warning-sign + %i.fa.fa-exclamation-triangle Dangerous settings %p Project settings below may result in data loss! = link_to '#', class: 'btn js-toggle-button' do Show them to me - %i.icon-chevron-down + %i.fa.fa-chevron-down .js-toggle-content.hide - if can? current_user, :archive_project, @project @@ -185,6 +185,6 @@ .save-project-loader.hide .center %h2 - %i.icon-spinner.icon-spin + %i.fa.fa-spinner.fa-spin Saving project. %p Please wait a moment, this page will automatically refresh when ready. diff --git a/app/views/projects/edit_tree/show.html.haml b/app/views/projects/edit_tree/show.html.haml index 62798b51d8..5985d1fcc8 100644 --- a/app/views/projects/edit_tree/show.html.haml +++ b/app/views/projects/edit_tree/show.html.haml @@ -8,7 +8,7 @@ = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do .file-holder.file .file-title - %i.icon-file + %i.fa.fa-file %span.file_name %span.monospace.light #{@ref}: = @path @@ -20,7 +20,7 @@ .js-edit-mode-pane#preview.hide .center %h2 - %i.icon-spinner.icon-spin + %i.fa.fa-spinner.fa-spin .form-group.commit_message-group = label_tag 'commit_message', class: "control-label" do diff --git a/app/views/projects/fork.html.haml b/app/views/projects/fork.html.haml index bdd75de447..d8f5c7b98d 100644 --- a/app/views/projects/fork.html.haml +++ b/app/views/projects/fork.html.haml @@ -1,6 +1,6 @@ .alert.alert-danger.alert-block %h4 - %i.icon-code-fork + %i.fa.fa-code-fork Fork Error! %p You tried to fork @@ -15,5 +15,5 @@ %p = link_to fork_project_path(@project), title: "Fork", class: "btn", method: "POST" do - %i.icon-code-fork + %i.fa.fa-code-fork Try to Fork again diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml index e0a9f62752..e3d5094ddc 100644 --- a/app/views/projects/graphs/show.html.haml +++ b/app/views/projects/graphs/show.html.haml @@ -2,7 +2,7 @@ .loading-graph .center %h3.page-title - %i.icon-spinner.icon-spin + %i.fa.fa-spinner.fa-spin Building repository graph. %p.slead Please wait a moment, this page will automatically refresh when ready. diff --git a/app/views/projects/import.html.haml b/app/views/projects/import.html.haml index 2b90774848..1f7fd26c64 100644 --- a/app/views/projects/import.html.haml +++ b/app/views/projects/import.html.haml @@ -2,7 +2,7 @@ .save-project-loader .center %h2 - %i.icon-spinner.icon-spin + %i.fa.fa-spinner.fa-spin Import in progress. %p.monospace git clone --bare #{hidden_pass_url(@project.import_url)} %p Please wait while we import the repository for you. Refresh at will. diff --git a/app/views/projects/issues/_head.html.haml b/app/views/projects/issues/_head.html.haml index 82cde14e05..1d2f3ed811 100644 --- a/app/views/projects/issues/_head.html.haml +++ b/app/views/projects/issues/_head.html.haml @@ -10,18 +10,18 @@ - if current_controller?(:milestones) %li.pull-right %button.btn.btn-default.sidebar-expand-button - %i.icon.icon-list + %i.icon.fa.fa-list - if current_controller?(:issues) - if current_user %li = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do - %i.icon-rss + %i.fa.fa-rss %li.pull-right .pull-right %button.btn.btn-default.sidebar-expand-button - %i.icon.icon-list + %i.icon.fa.fa-list = form_tag project_issues_path(@project), method: :get, id: "issue_search_form", class: 'pull-left issue-search-form' do .append-right-10.hidden-xs.hidden-sm = search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' } @@ -32,5 +32,5 @@ = hidden_field_tag :label_id, params['label_id'] - if can? current_user, :write_issue, @project = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-left", title: "New Issue", id: "new_issue_link" do - %i.icon-plus + %i.fa.fa-plus New Issue diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index 1dfcd72606..e089b5fa1c 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -20,11 +20,11 @@ = render 'votes/votes_inline', votable: issue - if issue.notes.any? %span - %i.icon-comments + %i.fa.fa-comments = issue.notes.count - if issue.milestone %span - %i.icon-time + %i.fa.fa-clock-o = issue.milestone.title .pull-right %small updated #{time_ago_with_tooltip(issue.updated_at, 'bottom', 'issue_update_ago')} @@ -41,7 +41,7 @@ - else = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small btn-grouped close_issue btn-close", remote: true = link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link btn-grouped" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml index 1d0dcd7f07..0bff8bdbea 100644 --- a/app/views/projects/issues/_issues.html.haml +++ b/app/views/projects/issues/_issues.html.haml @@ -4,7 +4,7 @@ .issues-filters .dropdown.inline %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} - %i.icon-user + %i.fa.fa-user %span.light assignee: - if @assignee.present? %strong= @assignee.name @@ -27,7 +27,7 @@ .dropdown.inline.prepend-left-10 %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} - %i.icon-time + %i.fa.fa-clock-o %span.light milestone: - if @milestone.present? %strong= @milestone.title diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index 5de77b8bf3..4ec362b306 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -1,7 +1,7 @@ = render "head" .row .fixed.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs - %i.icon-list.icon-2x + %i.fa.fa-list.fa-2x .col-md-3.responsive-side = render 'shared/project_filter', project_entities_path: project_issues_path(@project), labels: true, redirect: 'issues', entity: 'issue' diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 41532fea74..4c1ea098d9 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -4,7 +4,7 @@ %span.pull-right.issue-btn-group - if can?(current_user, :write_issue, @project) = link_to new_project_issue_path(@project), class: "btn btn-grouped", title: "New Issue", id: "new_issue_link" do - %i.icon-plus + %i.fa.fa-plus New Issue - if can?(current_user, :modify_issue, @issue) - if @issue.closed? @@ -13,7 +13,7 @@ = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close", title: "Close Issue" = link_to edit_project_issue_path(@project, @issue), class: "btn btn-grouped" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit .clearfix diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index 2649fb55c3..647e8873e9 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -4,7 +4,7 @@ = link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.target_project, merge_request), class: "row_title" - if merge_request.merged? %small.pull-right - %i.icon-ok + %i.fa.fa-check MERGED - else %span.pull-right @@ -12,7 +12,7 @@ %span.light #{merge_request.source_project_namespace}: = truncate merge_request.source_branch, length: 25 - %i.icon-angle-right.light + %i.fa.fa-angle-right.light = merge_request.target_branch .merge-request-info - if merge_request.author @@ -21,11 +21,11 @@ = render 'votes/votes_inline', votable: merge_request - if merge_request.notes.any? %span - %i.icon-comments + %i.fa.fa-comments = merge_request.mr_and_commit_notes.count - if merge_request.milestone_id? %span - %i.icon-time + %i.fa.fa-clock-o = merge_request.milestone.title diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml index 9c51c40d32..d4666eacd7 100644 --- a/app/views/projects/merge_requests/_new_submit.html.haml +++ b/app/views/projects/merge_requests/_new_submit.html.haml @@ -30,7 +30,7 @@ .form-group .issue-assignee = f.label :assignee_id do - %i.icon-user + %i.fa.fa-user Assign to %div = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @merge_request.assignee_id, project_id: @merge_request.target_project_id) @@ -39,12 +39,12 @@ .form-group .issue-milestone = f.label :milestone_id do - %i.icon-time + %i.fa.fa-clock-o Milestone %div= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'}) .form-group = f.label :label_ids do - %i.icon-tag + %i.fa.fa-tag Labels %div = f.collection_select :label_ids, @merge_request.target_project.labels.all, :id, :name, { selected: @merge_request.label_ids }, multiple: true, class: 'select2' diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 4323c8f65a..947e8f58ae 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -10,12 +10,12 @@ %ul.nav.nav-pills.merge-request-tabs %li.notes-tab{data: {action: 'notes'}} = link_to project_merge_request_path(@project, @merge_request) do - %i.icon-comment + %i.fa.fa-comment Discussion %span.badge= @merge_request.mr_and_commit_notes.count %li.diffs-tab{data: {action: 'diffs'}} = link_to diffs_project_merge_request_path(@project, @merge_request) do - %i.icon-list-alt + %i.fa.fa-list-alt Changes %span.badge= @merge_request.diffs.size diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml index 0954fa8fce..be638d7cac 100644 --- a/app/views/projects/merge_requests/index.html.haml +++ b/app/views/projects/merge_requests/index.html.haml @@ -1,13 +1,13 @@ - if can? current_user, :write_merge_request, @project = link_to new_project_merge_request_path(@project), class: "pull-right btn btn-new", title: "New Merge Request" do - %i.icon-plus + %i.fa.fa-plus New Merge Request %h3.page-title Merge Requests %hr .row .fixed.sidebar-expand-button.hidden-lg.hidden-md - %i.icon-list.icon-2x + %i.fa.fa-list.fa-2x .col-md-3.responsive-side = render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project), labels: true, redirect: 'merge_requests', entity: 'merge_request' @@ -15,7 +15,7 @@ .mr-filters.append-bottom-10 .dropdown.inline %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} - %i.icon-user + %i.fa.fa-user %span.light assignee: - if @assignee.present? %strong= @assignee.name @@ -38,7 +38,7 @@ .dropdown.inline.prepend-left-10 %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} - %i.icon-time + %i.fa.fa-clock-o %span.light milestone: - if @milestone.present? %strong= @milestone.title diff --git a/app/views/projects/merge_requests/show/_commits.html.haml b/app/views/projects/merge_requests/show/_commits.html.haml index ede709ea1d..a658740387 100644 --- a/app/views/projects/merge_requests/show/_commits.html.haml +++ b/app/views/projects/merge_requests/show/_commits.html.haml @@ -1,7 +1,7 @@ - if @commits.present? .panel.panel-default .panel-heading - %i.icon-list + %i.fa.fa-list Commits (#{@commits.count}) .commits.mr-commits - if @commits.count > 8 diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml index 88cc8e17fa..1ab5028c44 100644 --- a/app/views/projects/merge_requests/show/_mr_accept.html.haml +++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml @@ -63,7 +63,7 @@ .automerge_widget.unchecked %p %strong - %i.icon-spinner.icon-spin + %i.fa.fa-spinner.fa-spin Checking for ability to automatically merge… .automerge_widget.already_cannot_be_merged.hide @@ -72,6 +72,6 @@ .merge-in-progress.hide %p - %i.icon-spinner.icon-spin + %i.fa.fa-spinner.fa-spin   Merge is in progress. Please wait. Page will be automatically reloaded.   diff --git a/app/views/projects/merge_requests/show/_mr_ci.html.haml b/app/views/projects/merge_requests/show/_mr_ci.html.haml index b77eeac612..dc64c096ed 100644 --- a/app/views/projects/merge_requests/show/_mr_ci.html.haml +++ b/app/views/projects/merge_requests/show/_mr_ci.html.haml @@ -1,29 +1,29 @@ - if @commits.any? .ci_widget.ci-success{style: "display:none"} - %i.icon-ok + %i.fa.fa-check %span CI build passed for #{@merge_request.last_commit_short_sha}. = link_to "Build page", ci_build_details_path(@merge_request) .ci_widget.ci-failed{style: "display:none"} - %i.icon-remove + %i.fa.fa-times %span CI build failed for #{@merge_request.last_commit_short_sha}. = link_to "Build page", ci_build_details_path(@merge_request) - [:running, :pending].each do |status| .ci_widget{class: "ci-#{status}", style: "display:none"} - %i.icon-time + %i.fa.fa-clock-o %span CI build #{status} for #{@merge_request.last_commit_short_sha}. = link_to "Build page", ci_build_details_path(@merge_request) .ci_widget %strong - %i.icon-spinner + %i.fa.fa-spinner Checking for CI status for #{@merge_request.last_commit_short_sha} .ci_widget.ci-error{style: "display:none"} - %i.icon-remove + %i.fa.fa-times %span Cannot connect to the CI server. Please check your settings and try again. diff --git a/app/views/projects/merge_requests/show/_mr_title.html.haml b/app/views/projects/merge_requests/show/_mr_title.html.haml index 1c319b83e2..276c980966 100644 --- a/app/views/projects/merge_requests/show/_mr_title.html.haml +++ b/app/views/projects/merge_requests/show/_mr_title.html.haml @@ -6,7 +6,7 @@ - if @merge_request.open? .btn-group.pull-left %a.btn.btn-grouped.dropdown-toggle{ data: {toggle: :dropdown} } - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt Download as %span.caret %ul.dropdown-menu @@ -16,7 +16,7 @@ = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: { state_event: :close }), method: :put, class: "btn btn-grouped btn-close", title: "Close merge request" = link_to edit_project_merge_request_path(@project, @merge_request), class: "btn btn-grouped", id:"edit_merge_request" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit - if @merge_request.closed? = link_to 'Reopen', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-grouped btn-reopen reopen-mr-link", title: "Close merge request" diff --git a/app/views/projects/merge_requests/show/_remove_source_branch.html.haml b/app/views/projects/merge_requests/show/_remove_source_branch.html.haml index 491360af1b..4fe5935bcf 100644 --- a/app/views/projects/merge_requests/show/_remove_source_branch.html.haml +++ b/app/views/projects/merge_requests/show/_remove_source_branch.html.haml @@ -5,13 +5,13 @@ .remove_source_branch_widget %p Changes merged into #{@merge_request.target_branch}. You can remove source branch now = link_to project_branch_path(@merge_request.source_project, @source_branch), remote: true, method: :delete, class: "btn btn-primary btn-small remove_source_branch" do - %i.icon-remove + %i.fa.fa-times Remove Source Branch .remove_source_branch_widget.failed.hide Failed to remove source branch '#{@merge_request.source_branch}' .remove_source_branch_in_progress.hide - %i.icon-refresh.icon-spin + %i.fa.fa-refresh.fa-spin   Removing source branch '#{@merge_request.source_branch}'. Please wait. Page will be automatically reloaded.   diff --git a/app/views/projects/merge_requests/show/_state_widget.html.haml b/app/views/projects/merge_requests/show/_state_widget.html.haml index a5f8af89d1..5db77ab275 100644 --- a/app/views/projects/merge_requests/show/_state_widget.html.haml +++ b/app/views/projects/merge_requests/show/_state_widget.html.haml @@ -34,7 +34,7 @@ - if !@closes_issues.empty? && @merge_request.open? .panel-footer %span - %i.icon-ok + %i.fa.fa-check Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'} = succeed '.' do != gfm(issues_sentence(@closes_issues)) diff --git a/app/views/projects/milestones/_milestone.html.haml b/app/views/projects/milestones/_milestone.html.haml index 4018d132a5..1002b9513f 100644 --- a/app/views/projects/milestones/_milestone.html.haml +++ b/app/views/projects/milestones/_milestone.html.haml @@ -2,7 +2,7 @@ .pull-right - if can?(current_user, :admin_milestone, milestone.project) and milestone.active? = link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link btn-grouped" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit = link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-close" %h4 diff --git a/app/views/projects/milestones/index.html.haml b/app/views/projects/milestones/index.html.haml index f0e48a5177..03367b7cdb 100644 --- a/app/views/projects/milestones/index.html.haml +++ b/app/views/projects/milestones/index.html.haml @@ -4,12 +4,12 @@ Milestones - if can? current_user, :admin_milestone, @project = link_to new_project_milestone_path(@project), class: "pull-right btn btn-new", title: "New Milestone" do - %i.icon-plus + %i.fa.fa-plus New Milestone .row .fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs - %i.icon-list.icon-2x + %i.fa.fa-list.fa-2x .col-md-3.responsive-side %ul.nav.nav-pills.nav-stacked %li{class: ("active" if (params[:f] == "active" || !params[:f]))} diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 1a495aa1c4..8263f7530a 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -4,7 +4,7 @@ .pull-right - if can?(current_user, :admin_milestone, @project) = link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit - if @milestone.active? = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-grouped" @@ -70,7 +70,7 @@ .pull-right = link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small btn-grouped", title: "New Issue" do - %i.icon-plus + %i.fa.fa-plus New Issue = link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn btn-small edit-milestone-link btn-grouped" diff --git a/app/views/projects/network/show.html.haml b/app/views/projects/network/show.html.haml index 52a66f64d9..4a21b84fb8 100644 --- a/app/views/projects/network/show.html.haml +++ b/app/views/projects/network/show.html.haml @@ -4,7 +4,7 @@ = form_tag project_network_path(@project, @id), method: :get, class: 'form-inline network-form' do |f| = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: 'search-input form-control input-mx-250 search-sha' = button_tag class: 'btn btn-success btn-search-sha' do - %i.icon-search + %i.fa.fa-search .inline.prepend-left-20 .checkbox.light = label_tag :filter_ref do diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 949b72356d..6c986050c4 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -23,7 +23,7 @@ .col-sm-2 .col-sm-10 = link_to "#", class: 'js-toggle-button' do - %i.icon-edit + %i.fa.fa-pencil-square-o %span Customize repository name? .js-toggle-content.hide .form-group @@ -39,7 +39,7 @@ .col-sm-2 .col-sm-10 = link_to "#", class: 'js-toggle-button' do - %i.icon-upload-alt + %i.fa.fa-upload %span Import existing repository? .js-toggle-content.hide .form-group.import-url-data @@ -74,6 +74,6 @@ .save-project-loader.hide .center %h2 - %i.icon-spinner.icon-spin + %i.fa.fa-spinner.fa-spin Creating project & repository. %p Please wait a moment, this page will automatically refresh when ready. diff --git a/app/views/projects/new_tree/show.html.haml b/app/views/projects/new_tree/show.html.haml index 24d77344fd..bb317e4f13 100644 --- a/app/views/projects/new_tree/show.html.haml +++ b/app/views/projects/new_tree/show.html.haml @@ -30,7 +30,7 @@ .file-holder .file-title - %i.icon-file + %i.fa.fa-file .file-content.code %pre#editor= params[:content] diff --git a/app/views/projects/notes/_diff_notes_with_reply.html.haml b/app/views/projects/notes/_diff_notes_with_reply.html.haml index a01056b716..c731baf0a6 100644 --- a/app/views/projects/notes/_diff_notes_with_reply.html.haml +++ b/app/views/projects/notes/_diff_notes_with_reply.html.haml @@ -4,7 +4,7 @@ %tr.notes_holder %td.notes_line{ colspan: 2 } %span.discussion-notes-count - %i.icon-comment + %i.fa.fa-comment = notes.count %td.notes_content %ul.notes{ rel: note.discussion_id } diff --git a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml b/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml index 506d1fff00..789f3e19fd 100644 --- a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml +++ b/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml @@ -5,7 +5,7 @@ - if note1 %td.notes_line %span.btn.disabled - %i.icon-comment + %i.fa.fa-comment = notes1.count %td.notes_content.parallel %ul.notes{ rel: note1.discussion_id } @@ -20,7 +20,7 @@ - if note2 %td.notes_line %span.btn.disabled - %i.icon-comment + %i.fa.fa-comment = notes2.count %td.notes_content.parallel %ul.notes{ rel: note2.discussion_id } diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index 52d6719a2e..c68b3817e7 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -31,7 +31,7 @@ .note-form-option %a.choose-btn.btn.js-choose-note-attachment-button - %i.icon-paper-clip + %i.fa.fa-paperclip %span Choose File ...   %span.file_name.js-attachment-filename File name... diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index 394fa88e04..814bf19970 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -6,16 +6,16 @@ .note-header .note-actions = link_to "##{dom_id(note)}", name: dom_id(note) do - %i.icon-link + %i.fa.fa-link Link here   - if can?(current_user, :admin_note, note) && note.editable? = link_to "#", title: "Edit comment", class: "js-note-edit" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit   = link_to project_note_path(@project, note), title: "Remove comment", method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: "danger js-note-delete" do - %i.icon-trash.cred + %i.fa.fa-trash-o.cred Remove = link_to_member(@project, note.author, avatar: false) %span.note-last-update @@ -23,11 +23,11 @@ - if note.upvote? %span.vote.upvote.label.label-success - %i.icon-thumbs-up + %i.fa.fa-thumbs-up \+1 - if note.downvote? %span.vote.downvote.label.label-danger - %i.icon-thumbs-down + %i.fa.fa-thumbs-down \-1 @@ -45,7 +45,7 @@ .note-form-option %a.choose-btn.btn.js-choose-note-attachment-button - %i.icon-paper-clip + %i.fa.fa-paperclip %span Choose File ...   %span.file_name.js-attachment-filename File name... @@ -61,9 +61,9 @@ = image_tag note.attachment.secure_url, class: 'note-image-attach' .attachment.pull-right = link_to note.attachment.secure_url, target: "_blank" do - %i.icon-paper-clip + %i.fa.fa-paperclip = note.attachment_identifier = link_to delete_attachment_project_note_path(@project, note), title: "Delete this attachment", method: :delete, remote: true, data: { confirm: 'Are you sure you want to remove the attachment?' }, class: "danger js-note-attachment-delete" do - %i.icon-trash.cred + %i.fa.fa-trash-o.cred .clear diff --git a/app/views/projects/notes/discussions/_active.html.haml b/app/views/projects/notes/discussions/_active.html.haml index eb416c5b5f..52c06ec172 100644 --- a/app/views/projects/notes/discussions/_active.html.haml +++ b/app/views/projects/notes/discussions/_active.html.haml @@ -3,7 +3,7 @@ .discussion-header .discussion-actions = link_to "#", class: "js-toggle-button" do - %i.icon-chevron-up + %i.fa.fa-chevron-up Show/hide discussion %div = link_to_member(@project, note.author, avatar: false) diff --git a/app/views/projects/notes/discussions/_commit.html.haml b/app/views/projects/notes/discussions/_commit.html.haml index a928029a5e..94f16a5f02 100644 --- a/app/views/projects/notes/discussions/_commit.html.haml +++ b/app/views/projects/notes/discussions/_commit.html.haml @@ -3,7 +3,7 @@ .discussion-header .discussion-actions = link_to "#", class: "js-toggle-button" do - %i.icon-chevron-up + %i.fa.fa-chevron-up Show/hide discussion %div = link_to_member(@project, note.author, avatar: false) diff --git a/app/views/projects/notes/discussions/_outdated.html.haml b/app/views/projects/notes/discussions/_outdated.html.haml index 4ae914c107..52a1d342f5 100644 --- a/app/views/projects/notes/discussions/_outdated.html.haml +++ b/app/views/projects/notes/discussions/_outdated.html.haml @@ -3,7 +3,7 @@ .discussion-header .discussion-actions = link_to "#", class: "js-toggle-button" do - %i.icon-chevron-down + %i.fa.fa-chevron-down Show/hide discussion %div = link_to_member(@project, note.author, avatar: false) diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml index 3980a6c086..49a3ef4c8a 100644 --- a/app/views/projects/protected_branches/index.html.haml +++ b/app/views/projects/protected_branches/index.html.haml @@ -35,7 +35,7 @@ - if @project.root_ref?(branch.name) %span.label.label-info default %span.label.label-success - %i.icon-lock + %i.fa.fa-lock .pull-right - if can? current_user, :admin_project, @project = link_to 'Unprotect', [@project, branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-remove btn-small" diff --git a/app/views/projects/repositories/_download_archive.html.haml b/app/views/projects/repositories/_download_archive.html.haml index ed6f8ddd18..3b4f1a4298 100644 --- a/app/views/projects/repositories/_download_archive.html.haml +++ b/app/views/projects/repositories/_download_archive.html.haml @@ -4,7 +4,7 @@ - if split_button == true %span.btn-group{class: btn_class} = link_to archive_project_repository_path(@project, ref: ref, format: 'zip'), class: 'btn', rel: 'nofollow' do - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt %span Download zip %a.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' } %span.caret @@ -13,25 +13,25 @@ %ul.dropdown-menu{ role: 'menu' } %li = link_to archive_project_repository_path(@project, ref: ref, format: 'zip'), rel: 'nofollow' do - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt %span Download zip %li = link_to archive_project_repository_path(@project, ref: ref, format: 'tar.gz'), rel: 'nofollow' do - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt %span Download tar.gz %li = link_to archive_project_repository_path(@project, ref: ref, format: 'tar.bz2'), rel: 'nofollow' do - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt %span Download tar.bz2 %li = link_to archive_project_repository_path(@project, ref: ref, format: 'tar'), rel: 'nofollow' do - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt %span Download tar - else %span.btn-group{class: btn_class} = link_to archive_project_repository_path(@project, ref: ref, format: 'zip'), class: 'btn', rel: 'nofollow' do - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt %span zip = link_to archive_project_repository_path(@project, ref: ref, format: 'tar.gz'), class: 'btn', rel: 'nofollow' do - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt %span tar.gz diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 19bef02b51..09664ed51e 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -29,13 +29,13 @@ - if @project.archived? .alert.alert-warning %h4 - %i.icon-warning-sign + %i.fa.fa-exclamation-triangle Archived project! %p Repository is read-only - if @project.forked_from_project .alert.alert-success - %i.icon-code-fork.project-fork-icon + %i.fa.fa-code-fork.project-fork-icon Forked from: %br = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) @@ -73,7 +73,7 @@ %article.readme-holder#README = link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)) do %h4.readme-file-title - %i.icon-file + %i.fa.fa-file = readme.name .wiki = render_readme(readme) diff --git a/app/views/projects/snippets/show.html.haml b/app/views/projects/snippets/show.html.haml index e4fdbd868c..ada0d30c49 100644 --- a/app/views/projects/snippets/show.html.haml +++ b/app/views/projects/snippets/show.html.haml @@ -22,7 +22,7 @@ .file-holder .file-title - %i.icon-file + %i.fa.fa-file %span.file_name = @snippet.file_name .options diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index 9ed737b181..bce105a033 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -2,14 +2,14 @@ %li %h4 = link_to project_commits_path(@project, tag.name), class: "" do - %i.icon-tag + %i.fa.fa-tag = tag.name .pull-right - if can? current_user, :download_code, @project = render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'btn-grouped btn-group-small' - if can?(current_user, :admin_project, @project) = link_to project_tag_path(@project, tag.name), class: 'btn btn-small btn-remove remove-row grouped', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do - %i.icon-trash + %i.fa.fa-trash-o - if commit %ul.list-unstyled diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index 6cbf99239e..ac74e3b6d3 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -5,7 +5,7 @@ - if can? current_user, :push_code, @project .pull-right = link_to new_project_tag_path(@project), class: 'btn btn-create new-tag-btn' do - %i.icon-add-sign + %i.fa.fa-add-sign New tag %p.light diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index 45ee61caf6..aa08b39776 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -3,7 +3,7 @@ %button{ type: "button", class: "close", "data-dismiss" => "alert"} × = @error %h3.page-title - %i.icon-code-fork + %i.fa.fa-code-fork New tag = form_tag project_tags_path, method: :post, class: "form-horizontal" do .form-group diff --git a/app/views/projects/team_members/_group_members.html.haml b/app/views/projects/team_members/_group_members.html.haml index 77ffab89f3..df3c914fde 100644 --- a/app/views/projects/team_members/_group_members.html.haml +++ b/app/views/projects/team_members/_group_members.html.haml @@ -5,7 +5,7 @@ group members (#{group_users_count}) .pull-right = link_to members_group_path(@group), class: 'btn btn-small' do - %i.icon-edit + %i.fa.fa-pencil-square-o %ul.well-list - @group.group_members.order('access_level DESC').limit(20).each do |member| = render 'groups/group_members/group_member', member: member, show_controls: false diff --git a/app/views/projects/team_members/_team_member.html.haml b/app/views/projects/team_members/_team_member.html.haml index 79b7866541..5f29b58de3 100644 --- a/app/views/projects/team_members/_team_member.html.haml +++ b/app/views/projects/team_members/_team_member.html.haml @@ -8,7 +8,7 @@ = f.select :access_level, options_for_select(ProjectMember.access_roles, member.access_level), {}, class: "medium project-access-select span2 trigger-submit"   = link_to project_team_member_path(@project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do - %i.icon-minus.icon-white + %i.fa.fa-minus.fa-inverse = image_tag avatar_icon(user.email, 32), class: "avatar s32" %p %strong= user.name diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml index ec2701af0e..f082d71186 100644 --- a/app/views/projects/tree/_readme.html.haml +++ b/app/views/projects/tree/_readme.html.haml @@ -1,7 +1,7 @@ %article.readme-holder#README = link_to '#README' do %h4.readme-file-title - %i.icon-file + %i.fa.fa-file = readme.name .wiki = render_readme(readme) diff --git a/app/views/projects/tree/_spinner.html.haml b/app/views/projects/tree/_spinner.html.haml index 5a9e77b63d..b47ad0f41e 100644 --- a/app/views/projects/tree/_spinner.html.haml +++ b/app/views/projects/tree/_spinner.html.haml @@ -1,3 +1,3 @@ %span.log_loading.hide - %i.icon-spinner.icon-spin + %i.fa.fa-spinner.fa-spin Loading commit data... diff --git a/app/views/projects/tree/_submodule_item.html.haml b/app/views/projects/tree/_submodule_item.html.haml index 474604df65..a8ec9df2c8 100644 --- a/app/views/projects/tree/_submodule_item.html.haml +++ b/app/views/projects/tree/_submodule_item.html.haml @@ -1,7 +1,7 @@ - tree, commit = submodule_links(submodule_item) %tr{ class: "tree-item" } %td.tree-item-file-name - %i.icon-archive + %i.fa.fa-archive %span = link_to truncate(submodule_item.name, length: 40), tree @ diff --git a/app/views/projects/tree/_tree.html.haml b/app/views/projects/tree/_tree.html.haml index 9fe990d0fb..1159fcadff 100644 --- a/app/views/projects/tree/_tree.html.haml +++ b/app/views/projects/tree/_tree.html.haml @@ -12,7 +12,7 @@ %li = link_to project_new_tree_path(@project, @id), title: 'New file', id: 'new-file-link' do %small - %i.icon-plus + %i.fa.fa-plus %div#tree-content-holder.tree-content-holder %table#tree-slider{class: "table_#{@hex_path} tree-table" } @@ -24,7 +24,7 @@ .pull-left Last Commit .last-commit.hidden-sm.pull-left   - %i.icon-angle-right + %i.fa.fa-angle-right   %small.light = link_to @commit.short_id, project_commit_path(@project, @commit) diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml index 68d7087323..30410bc95e 100644 --- a/app/views/projects/wikis/_main_links.html.haml +++ b/app/views/projects/wikis/_main_links.html.haml @@ -4,5 +4,5 @@ Page History - if can?(current_user, :write_wiki, @project) = link_to edit_project_wiki_path(@project, @page), class: "btn btn-grouped" do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit diff --git a/app/views/projects/wikis/_nav.html.haml b/app/views/projects/wikis/_nav.html.haml index 0a7e51e974..a2010f3794 100644 --- a/app/views/projects/wikis/_nav.html.haml +++ b/app/views/projects/wikis/_nav.html.haml @@ -7,13 +7,13 @@ = nav_link(path: 'wikis#git_access') do = link_to git_access_project_wikis_path(@project) do - %i.icon-download-alt + %i.fa.fa-arrow-circle-o-down-alt Git Access - if can?(current_user, :write_wiki, @project) .pull-right = link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do - %i.icon-plus + %i.fa.fa-plus New Page = render 'projects/wikis/new' diff --git a/app/views/search/_filter.html.haml b/app/views/search/_filter.html.haml index 049aff0bc9..eca69ce50b 100644 --- a/app/views/search/_filter.html.haml +++ b/app/views/search/_filter.html.haml @@ -1,6 +1,6 @@ .dropdown.inline %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} - %i.icon-tags + %i.fa.fa-tags %span.light Group: - if @group.present? %strong= @group.name @@ -18,7 +18,7 @@ .dropdown.inline.prepend-left-10.project-filter %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} - %i.icon-tags + %i.fa.fa-tags %span.light Project: - if @project.present? %strong= @project.name_with_namespace diff --git a/app/views/search/_project_filter.html.haml b/app/views/search/_project_filter.html.haml index 57a45c9acb..c201b3d6c4 100644 --- a/app/views/search/_project_filter.html.haml +++ b/app/views/search/_project_filter.html.haml @@ -1,25 +1,25 @@ %ul.nav.nav-pills.nav-stacked.search-filter %li{class: ("active" if @scope == 'blobs')} = link_to search_filter_path(scope: 'blobs') do - %i.icon-code + %i.fa.fa-code Code .pull-right = @search_results.blobs_count %li{class: ("active" if @scope == 'issues')} = link_to search_filter_path(scope: 'issues') do - %i.icon-exclamation-sign + %i.fa.fa-exclamation-circle Issues .pull-right = @search_results.issues_count %li{class: ("active" if @scope == 'merge_requests')} = link_to search_filter_path(scope: 'merge_requests') do - %i.icon-code-fork + %i.fa.fa-code-fork Merge requests .pull-right = @search_results.merge_requests_count %li{class: ("active" if @scope == 'notes')} = link_to search_filter_path(scope: 'notes') do - %i.icon-comments + %i.fa.fa-comments Comments .pull-right = @search_results.notes_count diff --git a/app/views/search/_snippet_filter.html.haml b/app/views/search/_snippet_filter.html.haml index 0d1984a0d7..95d23fa9f4 100644 --- a/app/views/search/_snippet_filter.html.haml +++ b/app/views/search/_snippet_filter.html.haml @@ -1,13 +1,13 @@ %ul.nav.nav-pills.nav-stacked.search-filter %li{class: ("active" if @scope == 'snippet_blobs')} = link_to search_filter_path(scope: 'snippet_blobs', snippets: true, group_id: nil, project_id: nil) do - %i.icon-code + %i.fa.fa-code Snippet Contents .pull-right = @search_results.snippet_blobs_count %li{class: ("active" if @scope == 'snippet_titles')} = link_to search_filter_path(scope: 'snippet_titles', snippets: true, group_id: nil, project_id: nil) do - %i.icon-book + %i.fa.fa-book Titles and Filenames .pull-right = @search_results.snippet_titles_count diff --git a/app/views/search/results/_blob.html.haml b/app/views/search/results/_blob.html.haml index f9d217e840..b46b4832e1 100644 --- a/app/views/search/results/_blob.html.haml +++ b/app/views/search/results/_blob.html.haml @@ -2,7 +2,7 @@ .file-holder .file-title = link_to project_blob_path(@project, tree_join(blob.ref, blob.filename), :anchor => "L" + blob.startline.to_s) do - %i.icon-file + %i.fa.fa-file %strong = blob.filename .file-content.code.term diff --git a/app/views/search/results/_empty.html.haml b/app/views/search/results/_empty.html.haml index 3615f6ae52..01fb8cd9b8 100644 --- a/app/views/search/results/_empty.html.haml +++ b/app/views/search/results/_empty.html.haml @@ -1,4 +1,4 @@ .search_box .search_glyph - %span.icon-search + %span.fa.fa-search %h4 #{message} diff --git a/app/views/search/results/_note.html.haml b/app/views/search/results/_note.html.haml index 6a44653857..f2327cd69c 100644 --- a/app/views/search/results/_note.html.haml +++ b/app/views/search/results/_note.html.haml @@ -1,7 +1,7 @@ - project = note.project .search-result-row %h5.note-search-caption.str-truncated - %i.icon-comment + %i.fa.fa-comment = link_to_member(project, note.author, avatar: false) commented on diff --git a/app/views/search/results/_snippet_blob.html.haml b/app/views/search/results/_snippet_blob.html.haml index a3d909d44d..6fc2cdf636 100644 --- a/app/views/search/results/_snippet_blob.html.haml +++ b/app/views/search/results/_snippet_blob.html.haml @@ -11,7 +11,7 @@ = link_to snippet_path do .file-holder .file-title - %i.icon-file + %i.fa.fa-file %strong= snippet_blob[:snippet_object].file_name %span.options .btn-group.tree-btn-group.pull-right @@ -46,7 +46,7 @@ - offset = defined?(snippet[:start_line]) ? snippet[:start_line] : 1 - i = index + offset = link_to snippet_path+"#L#{i}", id: "L#{i}", rel: "#L#{i}" do - %i.icon-link + %i.fa.fa-link = i - unless snippet == snippet_blob[:snippet_chunks].last %a diff --git a/app/views/search/results/_snippet_title.html.haml b/app/views/search/results/_snippet_title.html.haml index 84abb9293b..f7e5ee5e20 100644 --- a/app/views/search/results/_snippet_title.html.haml +++ b/app/views/search/results/_snippet_title.html.haml @@ -4,7 +4,7 @@ = truncate(snippet_title.title, length: 60) - if snippet_title.private? %span.label.label-gray - %i.icon-lock + %i.fa.fa-lock private %span.cgray.monospace.tiny.pull-right.term = snippet_title.file_name diff --git a/app/views/search/results/_wiki_blob.html.haml b/app/views/search/results/_wiki_blob.html.haml index 75414d73b0..e361074b6a 100644 --- a/app/views/search/results/_wiki_blob.html.haml +++ b/app/views/search/results/_wiki_blob.html.haml @@ -2,7 +2,7 @@ .file-holder .file-title = link_to project_wiki_path(@project, wiki_blob.filename) do - %i.icon-file + %i.fa.fa-file %strong = wiki_blob.filename .file-content.code.term diff --git a/app/views/shared/_file_hljs.html.haml b/app/views/shared/_file_hljs.html.haml index cbc01bd60e..444c948b02 100644 --- a/app/views/shared/_file_hljs.html.haml +++ b/app/views/shared/_file_hljs.html.haml @@ -5,7 +5,7 @@ - offset = defined?(first_line_number) ? first_line_number : 1 - i = index + offset = link_to "#L#{i}", id: "L#{i}", rel: "#L#{i}" do - %i.icon-link + %i.fa.fa-link = i .highlight %pre diff --git a/app/views/shared/_filter.html.haml b/app/views/shared/_filter.html.haml index 9e65ce11ad..d366dd97a7 100644 --- a/app/views/shared/_filter.html.haml +++ b/app/views/shared/_filter.html.haml @@ -45,6 +45,6 @@ %fieldset - if params[:state].present? || params[:project_id].present? = link_to filter_path(entity, state: nil, project_id: nil), class: 'pull-right cgray' do - %i.icon-remove + %i.fa.fa-times %strong Clear filter diff --git a/app/views/shared/_project_filter.html.haml b/app/views/shared/_project_filter.html.haml index 5e7d1c2c88..ea6a49e150 100644 --- a/app/views/shared/_project_filter.html.haml +++ b/app/views/shared/_project_filter.html.haml @@ -38,7 +38,7 @@ Labels %small.pull-right = link_to project_labels_path(@project), class: 'light' do - %i.icon-edit + %i.fa.fa-pencil-square-o %ul.nav.nav-pills.nav-stacked.nav-small.labels-filter - @project.labels.order_by_name.each do |label| %li{class: label_filter_class(label.name)} @@ -46,7 +46,7 @@ = render_colored_label(label) - if selected_label?(label.name) .pull-right - %i.icon-remove + %i.fa.fa-times - if @project.labels.empty? .light-well @@ -58,7 +58,7 @@ %fieldset - if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any? = link_to project_entities_path, class: 'cgray pull-right' do - %i.icon-remove + %i.fa.fa-times %strong Clear filter diff --git a/app/views/snippets/_snippet.html.haml b/app/views/snippets/_snippet.html.haml index e6f8316733..c584dd8dfb 100644 --- a/app/views/snippets/_snippet.html.haml +++ b/app/views/snippets/_snippet.html.haml @@ -4,7 +4,7 @@ = truncate(snippet.title, length: 60) - if snippet.private? %span.label.label-gray - %i.icon-lock + %i.fa.fa-lock private %span.cgray.monospace.tiny.pull-right = snippet.file_name diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index 1d2e3d5ae4..f5bc543de1 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -3,7 +3,7 @@ - if @snippet.private? %span.label.label-success - %i.icon-lock + %i.fa.fa-lock private .pull-right @@ -30,7 +30,7 @@ .file-holder .file-title - %i.icon-file + %i.fa.fa-file %span.file_name = @snippet.file_name .options diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 60159a29b9..cb49c030af 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -6,7 +6,7 @@ - if @user == current_user .pull-right = link_to profile_path, class: 'btn' do - %i.icon-edit + %i.fa.fa-pencil-square-o Edit Profile settings %br %span.user-show-username #{@user.username} diff --git a/features/steps/profile/group.rb b/features/steps/profile/group.rb index 81d5bc15e2..0a10e04e21 100644 --- a/features/steps/profile/group.rb +++ b/features/steps/profile/group.rb @@ -7,22 +7,22 @@ class Spinach::Features::ProfileGroup < Spinach::FeatureSteps # Leave step 'I click on the "Leave" button for group "Owned"' do - find(:css, 'li', text: "Owner").find(:css, 'i.icon-signout').click + find(:css, 'li', text: "Owner").find(:css, 'i.fa.fa-sign-out').click # poltergeist always confirms popups. end step 'I click on the "Leave" button for group "Guest"' do - find(:css, 'li', text: "Guest").find(:css, 'i.icon-signout').click + find(:css, 'li', text: "Guest").find(:css, 'i.fa.fa-sign-out').click # poltergeist always confirms popups. end step 'I should not see the "Leave" button for group "Owned"' do - find(:css, 'li', text: "Owner").should_not have_selector(:css, 'i.icon-signout') + find(:css, 'li', text: "Owner").should_not have_selector(:css, 'i.fa.fa-sign-out') # poltergeist always confirms popups. end step 'I should not see the "Leave" button for groupr "Guest"' do - find(:css, 'li', text: "Guest").should_not have_selector(:css, 'i.icon-signout') + find(:css, 'li', text: "Guest").should_not have_selector(:css, 'i.fa.fa-sign-out') # poltergeist always confirms popups. end diff --git a/spec/helpers/notifications_helper_spec.rb b/spec/helpers/notifications_helper_spec.rb index 3ecabbaf04..31ecdacf28 100644 --- a/spec/helpers/notifications_helper_spec.rb +++ b/spec/helpers/notifications_helper_spec.rb @@ -8,7 +8,7 @@ describe NotificationsHelper do before { notification.stub(disabled?: true) } it "has a red icon" do - notification_icon(notification).should match('class="icon-volume-off ns-mute"') + notification_icon(notification).should match('class="fa fa-volume-off ns-mute"') end end @@ -16,7 +16,7 @@ describe NotificationsHelper do before { notification.stub(participating?: true) } it "has a blue icon" do - notification_icon(notification).should match('class="icon-volume-down ns-part"') + notification_icon(notification).should match('class="fa fa-volume-down ns-part"') end end @@ -24,12 +24,12 @@ describe NotificationsHelper do before { notification.stub(watch?: true) } it "has a green icon" do - notification_icon(notification).should match('class="icon-volume-up ns-watch"') + notification_icon(notification).should match('class="fa fa-volume-up ns-watch"') end end it "has a blue icon" do - notification_icon(notification).should match('class="icon-circle-blank ns-default"') + notification_icon(notification).should match('class="fa fa-circle-o ns-default"') end end end diff --git a/spec/support/login_helpers.rb b/spec/support/login_helpers.rb index cd8a076318..791d2a1fd6 100644 --- a/spec/support/login_helpers.rb +++ b/spec/support/login_helpers.rb @@ -21,6 +21,6 @@ module LoginHelpers # Requires Javascript driver. def logout - find(:css, ".icon-signout").click + find(:css, ".fa.fa-sign-out").click end end From 3960a5a25aa857959544d274097b4f0e38777468 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Fri, 3 Oct 2014 12:19:31 +0200 Subject: [PATCH 24/25] Remove assignment without effect. --- features/steps/shared/paths.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index babbef33ec..141ff13b67 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -411,7 +411,7 @@ module SharedPaths end def project - project = Project.find_by!(name: "Shop") + Project.find_by!(name: 'Shop') end # ---------------------------------------- From 6014e28c2df977643ed4d1c5480158db0e9a09eb Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Fri, 3 Oct 2014 12:21:23 +0200 Subject: [PATCH 25/25] Remove outdated comment on the project test seed --- spec/factories/projects.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 5324654c48..23314b3b1a 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -47,16 +47,6 @@ FactoryGirl.define do end end - # Generates a test repository from the repository stored under `spec/seed_project.tar.gz`. - # Once you run `rake gitlab:setup`, you can see what the repository looks like under `tmp/repositories/gitlabhq`. - # In order to modify files in the repository, you must untar the seed, modify and remake the tar. - # Before recompressing, do not forget to `git checkout master`. - # After recompressing, you need to run `RAILS_ENV=test bundle exec rake gitlab:setup` to regenerate the seeds under tmp. - # - # If you want to modify the repository only for an specific type of tests, e.g., markdown tests, - # consider using a feature branch to reduce the chances of collision with other tests. - # Create a new commit, and use the same commit message that you will use for the change in the main repo. - # Changing the commig message and SHA of branch `master` may break tests. factory :project, parent: :empty_project do path { 'gitlabhq' }