Commit 37169e54 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ee-7-4' into 'master'

More new code from CE 7.4 into EE

See merge request !191
parents 74ac2df3 7cf86dc4
...@@ -12,6 +12,9 @@ v 7.4.0 ...@@ -12,6 +12,9 @@ v 7.4.0
- API: Add support for forking a project via the API (Bernhard Kaindl) - API: Add support for forking a project via the API (Bernhard Kaindl)
- API: filter project issues by milestone (Julien Bianchi) - API: filter project issues by milestone (Julien Bianchi)
- Fail harder in the backup script - 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 v 7.3.2
- Fix creating new file via web editor - Fix creating new file via web editor
......
...@@ -90,7 +90,7 @@ gem "github-markup" ...@@ -90,7 +90,7 @@ gem "github-markup"
gem 'redcarpet', '~> 3.1.2' gem 'redcarpet', '~> 3.1.2'
gem 'RedCloth' gem 'RedCloth'
gem 'rdoc', '~>3.6' gem 'rdoc', '~>3.6'
gem 'org-ruby' gem 'org-ruby', '= 0.9.9'
gem 'creole', '~>0.3.6' gem 'creole', '~>0.3.6'
gem 'wikicloth', '=0.8.1' gem 'wikicloth', '=0.8.1'
gem 'asciidoctor', '= 0.1.4' gem 'asciidoctor', '= 0.1.4'
...@@ -181,7 +181,7 @@ gem "jquery-ui-rails" ...@@ -181,7 +181,7 @@ gem "jquery-ui-rails"
gem "jquery-scrollto-rails" gem "jquery-scrollto-rails"
gem "raphael-rails", "~> 2.1.2" gem "raphael-rails", "~> 2.1.2"
gem 'bootstrap-sass', '~> 3.0' 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 "gitlab_emoji", "~> 0.0.1.1"
gem "gon", '~> 5.0.0' gem "gon", '~> 5.0.0'
gem 'nprogress-rails' gem 'nprogress-rails'
......
...@@ -152,7 +152,7 @@ GEM ...@@ -152,7 +152,7 @@ GEM
net-ssh (>= 2.1.3) net-ssh (>= 2.1.3)
fog-json (1.0.0) fog-json (1.0.0)
multi_json (~> 1.0) multi_json (~> 1.0)
font-awesome-rails (3.2.1.3) font-awesome-rails (4.2.0.0)
railties (>= 3.2, < 5.0) railties (>= 3.2, < 5.0)
foreman (0.63.0) foreman (0.63.0)
dotenv (>= 0.7) dotenv (>= 0.7)
...@@ -332,7 +332,7 @@ GEM ...@@ -332,7 +332,7 @@ GEM
omniauth-twitter (1.0.1) omniauth-twitter (1.0.1)
multi_json (~> 1.3) multi_json (~> 1.3)
omniauth-oauth (~> 1.0) omniauth-oauth (~> 1.0)
org-ruby (0.9.8) org-ruby (0.9.9)
rubypants (~> 0.2) rubypants (~> 0.2)
orm_adapter (0.5.0) orm_adapter (0.5.0)
pg (0.15.1) pg (0.15.1)
...@@ -614,7 +614,7 @@ DEPENDENCIES ...@@ -614,7 +614,7 @@ DEPENDENCIES
factory_girl_rails factory_girl_rails
ffaker ffaker
fog (~> 1.14) fog (~> 1.14)
font-awesome-rails (~> 3.2) font-awesome-rails (~> 4.2)
foreman foreman
gemnasium-gitlab-service (~> 0.2) gemnasium-gitlab-service (~> 0.2)
github-markup github-markup
...@@ -656,7 +656,7 @@ DEPENDENCIES ...@@ -656,7 +656,7 @@ DEPENDENCIES
omniauth-google-oauth2 omniauth-google-oauth2
omniauth-shibboleth omniauth-shibboleth
omniauth-twitter omniauth-twitter
org-ruby org-ruby (= 0.9.9)
pg pg
poltergeist (~> 1.5.1) poltergeist (~> 1.5.1)
pry pry
......
...@@ -172,8 +172,8 @@ $ -> ...@@ -172,8 +172,8 @@ $ ->
# Show/hide comments on diff # Show/hide comments on diff
$("body").on "click", ".js-toggle-diff-comments", (e) -> $("body").on "click", ".js-toggle-diff-comments", (e) ->
$(@).find('i'). $(@).find('i').
toggleClass('icon-chevron-down'). toggleClass('fa fa-chevron-down').
toggleClass('icon-chevron-up') toggleClass('fa fa-chevron-up')
$(@).closest(".diff-file").find(".notes_holder").toggle() $(@).closest(".diff-file").find(".notes_holder").toggle()
e.preventDefault() e.preventDefault()
......
...@@ -8,7 +8,7 @@ $ -> ...@@ -8,7 +8,7 @@ $ ->
# #
$("body").on "click", ".js-toggle-button", (e) -> $("body").on "click", ".js-toggle-button", (e) ->
$(@).find('i'). $(@).find('i').
toggleClass('icon-chevron-down'). toggleClass('fa fa-chevron-down').
toggleClass('icon-chevron-up') toggleClass('fa fa-chevron-up')
$(@).closest(".js-toggle-container").find(".js-toggle-content").toggle() $(@).closest(".js-toggle-container").find(".js-toggle-content").toggle()
e.preventDefault() e.preventDefault()
...@@ -27,6 +27,8 @@ class Dispatcher ...@@ -27,6 +27,8 @@ class Dispatcher
new ZenMode() new ZenMode()
when 'projects:milestones:show' when 'projects:milestones:show'
new Milestone() new Milestone()
when 'projects:milestones:new'
new ZenMode()
when 'projects:issues:new','projects:issues:edit' when 'projects:issues:new','projects:issues:edit'
GitLab.GfmAutoComplete.setup() GitLab.GfmAutoComplete.setup()
shortcut_handler = new ShortcutsNavigation() shortcut_handler = new ShortcutsNavigation()
...@@ -87,6 +89,7 @@ class Dispatcher ...@@ -87,6 +89,7 @@ class Dispatcher
when 'wikis' when 'wikis'
new Wikis() new Wikis()
shortcut_handler = new ShortcutsNavigation() shortcut_handler = new ShortcutsNavigation()
new ZenMode()
when 'snippets', 'labels', 'graphs' when 'snippets', 'labels', 'graphs'
shortcut_handler = new ShortcutsNavigation() shortcut_handler = new ShortcutsNavigation()
when 'team_members', 'deploy_keys', 'hooks', 'services', 'protected_branches' when 'team_members', 'deploy_keys', 'hooks', 'services', 'protected_branches'
......
...@@ -7,8 +7,8 @@ $(document).ready -> ...@@ -7,8 +7,8 @@ $(document).ready ->
divHover = "<div class=\"div-dropzone-hover\"></div>" divHover = "<div class=\"div-dropzone-hover\"></div>"
divSpinner = "<div class=\"div-dropzone-spinner\"></div>" divSpinner = "<div class=\"div-dropzone-spinner\"></div>"
divAlert = "<div class=\"" + alertClass + "\"></div>" divAlert = "<div class=\"" + alertClass + "\"></div>"
iconPicture = "<i class=\"icon-picture div-dropzone-icon\"></i>" iconPicture = "<i class=\"fa fa-picture-o div-dropzone-icon\"></i>"
iconSpinner = "<i class=\"icon-spinner icon-spin div-dropzone-icon\"></i>" iconSpinner = "<i class=\"fa fa-spinner fa-spin div-dropzone-icon\"></i>"
btnAlert = "<button type=\"button\"" + alertAttr + ">&times;</button>" btnAlert = "<button type=\"button\"" + alertAttr + ">&times;</button>"
project_image_path_upload = window.project_image_path_upload or null project_image_path_upload = window.project_image_path_upload or null
......
...@@ -15,7 +15,7 @@ class MergeRequest ...@@ -15,7 +15,7 @@ class MergeRequest
modal = $('#modal_merge_info').modal(show: false) modal = $('#modal_merge_info').modal(show: false)
disableButtonIfEmptyField '#merge_commit_message', '.accept_merge_request' disableButtonIfEmptyField '#commit_message', '.accept_merge_request'
# Local jQuery finder # Local jQuery finder
...@@ -40,6 +40,8 @@ class MergeRequest ...@@ -40,6 +40,8 @@ class MergeRequest
if @opts.ci_enable if @opts.ci_enable
$.get @opts.url_to_ci_check, (data) => $.get @opts.url_to_ci_check, (data) =>
this.showCiState data.status this.showCiState data.status
if data.coverage
this.showCiCoverage data.coverage
, 'json' , 'json'
bindEvents: -> bindEvents: ->
...@@ -102,7 +104,11 @@ class MergeRequest ...@@ -102,7 +104,11 @@ class MergeRequest
when "running", "pending" when "running", "pending"
$('.mr-state-widget').addClass("panel-warning") $('.mr-state-widget').addClass("panel-warning")
showCiCoverage: (coverage) ->
cov_html = $('<span>')
cov_html.addClass('ci-coverage')
cov_html.text('Coverage ' + coverage + '%')
$('.ci_widget:visible').append(cov_html)
loadDiff: (event) -> loadDiff: (event) ->
$.ajax $.ajax
......
/**
* 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
/**
* Styles that apply to both issues and merge requests.
*/
.issue-form, .merge-request-form {
.description {
height: 20em;
}
}
...@@ -124,7 +124,7 @@ $list-group-active-bg: $bg_primary; ...@@ -124,7 +124,7 @@ $list-group-active-bg: $bg_primary;
color: #888; color: #888;
text-shadow: 0 1px 1px #fff; text-shadow: 0 1px 1px #fff;
} }
i[class^="icon-"] { i[class~="fa"] {
line-height: 14px; line-height: 14px;
} }
} }
......
...@@ -113,6 +113,10 @@ ...@@ -113,6 +113,10 @@
margin-bottom: 0; margin-bottom: 0;
} }
} }
.ci-coverage {
float: right;
}
} }
.merge-request-show-labels .label { .merge-request-show-labels .label {
......
...@@ -119,8 +119,7 @@ ul.notes { ...@@ -119,8 +119,7 @@ ul.notes {
display: none; display: none;
float: right; float: right;
[class^="icon-"], [class~="fa"] {
[class*="icon-"] {
font-size: 16px; font-size: 16px;
line-height: 16px; line-height: 16px;
vertical-align: middle; vertical-align: middle;
......
...@@ -62,7 +62,7 @@ class ApplicationController < ActionController::Base ...@@ -62,7 +62,7 @@ class ApplicationController < ActionController::Base
end end
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? if resource.is_a?(User) && resource.respond_to?(:blocked?) && resource.blocked?
sign_out resource sign_out resource
flash[:alert] = "Your account is blocked. Retry when an admin has unblocked it." flash[:alert] = "Your account is blocked. Retry when an admin has unblocked it."
......
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
...@@ -122,7 +122,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -122,7 +122,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
if @merge_request.open? && @merge_request.can_be_merged? if @merge_request.open? && @merge_request.can_be_merged?
@merge_request.should_remove_source_branch = params[:should_remove_source_branch] @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 @status = true
else else
@status = false @status = false
...@@ -150,8 +150,17 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -150,8 +150,17 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end end
def ci_status def ci_status
status = @merge_request.source_project.ci_service.commit_status(merge_request.last_commit.sha) ci_service = @merge_request.source_project.ci_service
response = {status: status} 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 render json: response
end end
......
...@@ -15,11 +15,11 @@ class RegistrationsController < Devise::RegistrationsController ...@@ -15,11 +15,11 @@ class RegistrationsController < Devise::RegistrationsController
super super
end end
def after_sign_up_path_for resource def after_sign_up_path_for(resource)
new_user_session_path new_user_session_path
end end
def after_inactive_sign_up_path_for resource def after_inactive_sign_up_path_for(resource)
new_user_session_path new_user_session_path
end end
......
...@@ -229,7 +229,7 @@ module ApplicationHelper ...@@ -229,7 +229,7 @@ module ApplicationHelper
css_class << " hide" unless visible css_class << " hide" unless visible
content_tag :div, class: css_class do 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
end end
......
...@@ -19,7 +19,7 @@ module EventsHelper ...@@ -19,7 +19,7 @@ module EventsHelper
[event.action_name, target].join(" ") [event.action_name, target].join(" ")
end end
def event_filter_link key, tooltip def event_filter_link(key, tooltip)
key = key.to_s key = key.to_s
inactive = if @event_filter.active? key inactive = if @event_filter.active? key
nil nil
...@@ -36,10 +36,10 @@ module EventsHelper ...@@ -36,10 +36,10 @@ module EventsHelper
def icon_for_event def icon_for_event
{ {
EventFilter.push => "icon-upload-alt", EventFilter.push => 'fa fa-upload',
EventFilter.merged => "icon-check", EventFilter.merged => 'fa fa-check-square-o',
EventFilter.comments => "icon-comments", EventFilter.comments => 'fa fa-comments',
EventFilter.team => "icon-user", EventFilter.team => 'fa fa-user',
} }
end end
......
module IconsHelper module IconsHelper
def boolean_to_icon(value) def boolean_to_icon(value)
if value.to_s == "true" if value.to_s == "true"
content_tag :i, nil, class: 'icon-circle cgreen' content_tag :i, nil, class: 'fa fa-circle cgreen'
else else
content_tag :i, nil, class: 'icon-off clgray' content_tag :i, nil, class: 'fa fa-power-off clgray'
end end
end end
def public_icon def public_icon
content_tag :i, nil, class: 'icon-globe' content_tag :i, nil, class: 'fa fa-globe'
end end
def internal_icon def internal_icon
content_tag :i, nil, class: 'icon-shield' content_tag :i, nil, class: 'fa fa-shield'
end end
def private_icon def private_icon
content_tag :i, nil, class: 'icon-lock' content_tag :i, nil, class: 'fa fa-lock'
end end
end end
module IssuesHelper module IssuesHelper
def issue_css_classes issue def issue_css_classes(issue)
classes = "issue" classes = "issue"
classes << " closed" if issue.closed? classes << " closed" if issue.closed?
classes << " today" if issue.today? classes << " today" if issue.today?
...@@ -84,7 +84,7 @@ module IssuesHelper ...@@ -84,7 +84,7 @@ module IssuesHelper
'id', 'name', object.assignee_id) 'id', 'name', object.assignee_id)
end end
def milestone_options object def milestone_options(object)
options_from_collection_for_select(object.project.milestones.active, options_from_collection_for_select(object.project.milestones.active,
'id', 'title', object.milestone_id) 'id', 'title', object.milestone_id)
end end
......
...@@ -24,7 +24,7 @@ module MergeRequestsHelper ...@@ -24,7 +24,7 @@ module MergeRequestsHelper
} }
end end
def mr_css_classes mr def mr_css_classes(mr)
classes = "merge-request" classes = "merge-request"
classes << " closed" if mr.closed? classes << " closed" if mr.closed?
classes << " merged" if mr.merged? classes << " merged" if mr.merged?
......
...@@ -69,7 +69,7 @@ module NotesHelper ...@@ -69,7 +69,7 @@ module NotesHelper
button_tag class: 'btn reply-btn js-discussion-reply-button', button_tag class: 'btn reply-btn js-discussion-reply-button',
data: data, title: 'Add a reply' do 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' link_text << ' Reply'
end end
end end
......
module NotificationsHelper module NotificationsHelper
def notification_icon(notification) def notification_icon(notification)
if notification.disabled? 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? 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? 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 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 end
end end
module ProfileHelper module ProfileHelper
def oauth_active_class provider def oauth_active_class(provider)
if current_user.provider == provider.to_s if current_user.provider == provider.to_s
'active' 'active'
end end
......
...@@ -3,7 +3,7 @@ module ProjectsHelper ...@@ -3,7 +3,7 @@ module ProjectsHelper
"You are going to remove #{user.name} from #{project.name} project team. Are you sure?" "You are going to remove #{user.name} from #{project.name} project team. Are you sure?"
end end
def link_to_project project def link_to_project(project)
link_to project do link_to project do
title = content_tag(:span, project.name, class: 'project-name') title = content_tag(:span, project.name, class: 'project-name')
...@@ -39,7 +39,7 @@ module ProjectsHelper ...@@ -39,7 +39,7 @@ module ProjectsHelper
end end
end end
def project_title project def project_title(project)
if project.group if project.group
content_tag :span do content_tag :span do
link_to(simple_sanitize(project.group.name), group_path(project.group)) + " / " + project.name link_to(simple_sanitize(project.group.name), group_path(project.group)) + " / " + project.name
...@@ -133,7 +133,7 @@ module ProjectsHelper ...@@ -133,7 +133,7 @@ module ProjectsHelper
'Star' 'Star'
end end
content_tag('i', ' ', class: 'icon-star') + toggle_text content_tag('i', ' ', class: 'fa fa-star') + toggle_text
end end
count_html = content_tag('span', class: 'count') do count_html = content_tag('span', class: 'count') do
...@@ -157,7 +157,7 @@ module ProjectsHelper ...@@ -157,7 +157,7 @@ module ProjectsHelper
end end
def link_to_toggle_fork 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 << ' Fork'
out << content_tag(:span, class: 'count') do out << content_tag(:span, class: 'count') do
@project.forks_count.to_s @project.forks_count.to_s
......
...@@ -89,7 +89,7 @@ module TabHelper ...@@ -89,7 +89,7 @@ module TabHelper
end end
# Use nav_tab for save controller/action but different params # Use nav_tab for save controller/action but different params
def nav_tab key, value, &block def nav_tab(key, value, &block)
o = {} o = {}
o[:class] = "" o[:class] = ""
......
module TagsHelper module TagsHelper
def tag_path tag def tag_path(tag)
"/tags/#{tag}" "/tags/#{tag}"
end end
def tag_list project def tag_list(project)
html = '' html = ''
project.tag_list.each do |tag| project.tag_list.each do |tag|
html += link_to tag, tag_path(tag) html += link_to tag, tag_path(tag)
......
...@@ -36,9 +36,9 @@ module TreeHelper ...@@ -36,9 +36,9 @@ module TreeHelper
# type - String type of the tree item; either 'folder' or 'file' # type - String type of the tree item; either 'folder' or 'file'
def tree_icon(type) def tree_icon(type)
icon_class = if type == 'folder' icon_class = if type == 'folder'
'icon-folder-close' 'fa fa-folder'
else else
'icon-file-alt' 'fa fa-file-o'
end end
content_tag :i, nil, class: icon_class content_tag :i, nil, class: icon_class
...@@ -80,7 +80,7 @@ module TreeHelper ...@@ -80,7 +80,7 @@ module TreeHelper
end end
end end
def up_dir_path tree def up_dir_path(tree)
file = File.join(@path, "..") file = File.join(@path, "..")
tree_join(@ref, file) tree_join(@ref, file)
end end
......
...@@ -184,7 +184,7 @@ class Ability ...@@ -184,7 +184,7 @@ class Ability
] ]
end end
def group_abilities user, group def group_abilities(user, group)
rules = [] rules = []
if user.admin? || group.users.include?(user) || ProjectsFinder.new.execute(user, group: group).any? if user.admin? || group.users.include?(user) || ProjectsFinder.new.execute(user, group: group).any?
...@@ -209,7 +209,7 @@ class Ability ...@@ -209,7 +209,7 @@ class Ability
rules.flatten rules.flatten
end end
def namespace_abilities user, namespace def namespace_abilities(user, namespace)
rules = [] rules = []
# Only namespace owner and administrators can manage it # Only namespace owner and administrators can manage it
......
...@@ -88,9 +88,24 @@ class Commit ...@@ -88,9 +88,24 @@ class Commit
description.present? description.present?
end 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 # Discover issues should be closed when this commit is pushed to a project's
# default branch. # default branch.
def closes_issues project def closes_issues(project)
Gitlab::ClosingIssueExtractor.closed_by_message_in_project(safe_message, project) Gitlab::ClosingIssueExtractor.closed_by_message_in_project(safe_message, project)
end end
......
...@@ -134,7 +134,7 @@ module Issuable ...@@ -134,7 +134,7 @@ module Issuable
def to_hook_data def to_hook_data
{ {
object_kind: self.class.name.underscore, object_kind: self.class.name.underscore,
object_attributes: self.attributes object_attributes: hook_attrs
} }
end end
......
...@@ -10,7 +10,7 @@ module Mentionable ...@@ -10,7 +10,7 @@ module Mentionable
module ClassMethods module ClassMethods
# Indicate which attributes of the Mentionable to search for GFM references. # 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)) mentionable_attrs.concat(attrs.map(&:to_s))
end end
...@@ -38,7 +38,7 @@ module Mentionable ...@@ -38,7 +38,7 @@ module Mentionable
# Determine whether or not a cross-reference Note has already been created between this Mentionable and # Determine whether or not a cross-reference Note has already been created between this Mentionable and
# the specified target. # the specified target.
def has_mentioned? target def has_mentioned?(target)
Note.cross_reference_exists?(target, local_reference) Note.cross_reference_exists?(target, local_reference)
end end
...@@ -64,7 +64,7 @@ module Mentionable ...@@ -64,7 +64,7 @@ module Mentionable
end end
# Extract GFM references to other Mentionables from this Mentionable. Always excludes its #local_reference. # 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? return [] if text.blank?
ext = Gitlab::ReferenceExtractor.new ext = Gitlab::ReferenceExtractor.new
ext.analyze(text) ext.analyze(text)
...@@ -73,7 +73,7 @@ module Mentionable ...@@ -73,7 +73,7 @@ module Mentionable
end end
# Create a cross-reference Note for each GFM reference to another Mentionable found in +mentionable_text+. # 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 = references(p) - without
refs.each do |ref| refs.each do |ref|
Note.create_cross_reference_note(ref, local_reference, a, p) Note.create_cross_reference_note(ref, local_reference, a, p)
...@@ -82,7 +82,7 @@ module Mentionable ...@@ -82,7 +82,7 @@ module Mentionable
# If the mentionable_text field is about to change, locate any *added* references and create cross references for # 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. # 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 ch = changed_attributes
original, mentionable_changed = "", false original, mentionable_changed = "", false
self.class.mentionable_attrs.each do |attr| self.class.mentionable_attrs.each do |attr|
......
...@@ -21,6 +21,7 @@ class WebHook < ActiveRecord::Base ...@@ -21,6 +21,7 @@ class WebHook < ActiveRecord::Base
default_value_for :push_events, true default_value_for :push_events, true
default_value_for :issues_events, false default_value_for :issues_events, false
default_value_for :merge_requests_events, false default_value_for :merge_requests_events, false
default_value_for :tag_push_events, false
# HTTParty timeout # HTTParty timeout
default_timeout Gitlab.config.gitlab.webhook_timeout default_timeout Gitlab.config.gitlab.webhook_timeout
......
...@@ -48,6 +48,10 @@ class Issue < ActiveRecord::Base ...@@ -48,6 +48,10 @@ class Issue < ActiveRecord::Base
state :closed state :closed
end end
def hook_attrs
attributes
end
# Mentionable overrides. # Mentionable overrides.
def gfm_reference def gfm_reference
......
...@@ -77,7 +77,7 @@ class ProjectMember < Member ...@@ -77,7 +77,7 @@ class ProjectMember < Member
false false
end end
def truncate_team project def truncate_team(project)
truncate_teams [project.id] truncate_teams [project.id]
end end
......
...@@ -211,6 +211,20 @@ class MergeRequest < ActiveRecord::Base ...@@ -211,6 +211,20 @@ class MergeRequest < ActiveRecord::Base
Gitlab::Satellite::MergeAction.new(current_user, self).format_patch Gitlab::Satellite::MergeAction.new(current_user, self).format_patch
end 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? def for_fork?
target_project != source_project target_project != source_project
end end
......
...@@ -38,7 +38,7 @@ class Namespace < ActiveRecord::Base ...@@ -38,7 +38,7 @@ class Namespace < ActiveRecord::Base
scope :root, -> { where('type IS NULL') } scope :root, -> { where('type IS NULL') }
def self.search query def self.search(query)
where("name LIKE :query OR path LIKE :query", query: "%#{query}%") where("name LIKE :query OR path LIKE :query", query: "%#{query}%")
end end
......
...@@ -6,7 +6,7 @@ module Network ...@@ -6,7 +6,7 @@ module Network
@max_count ||= 650 @max_count ||= 650
end end
def initialize project, ref, commit, filter_ref def initialize(project, ref, commit, filter_ref)
@project = project @project = project
@ref = ref @ref = ref
@commit = commit @commit = commit
......
...@@ -346,7 +346,7 @@ class Project < ActiveRecord::Base ...@@ -346,7 +346,7 @@ class Project < ActiveRecord::Base
path path
end end
def items_for entity def items_for(entity)
case entity case entity
when 'issue' then when 'issue' then
issues issues
...@@ -519,7 +519,7 @@ class Project < ActiveRecord::Base ...@@ -519,7 +519,7 @@ class Project < ActiveRecord::Base
end end
# Check if current branch name is marked as protected in the system # 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) protected_branches_names.include?(branch_name)
end end
...@@ -559,6 +559,16 @@ class Project < ActiveRecord::Base ...@@ -559,6 +559,16 @@ class Project < ActiveRecord::Base
end end
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 # Reset events cache related to this project
# #
# Since we do cache @event we need to reset cache in special cases: # Since we do cache @event we need to reset cache in special cases:
......
...@@ -27,12 +27,17 @@ class GitlabCiService < CiService ...@@ -27,12 +27,17 @@ class GitlabCiService < CiService
hook.save hook.save
end end
def commit_status_path sha def commit_status_path(sha)
project_url + "/builds/#{sha}/status.json?token=#{token}" project_url + "/builds/#{sha}/status.json?token=#{token}"
end end
def commit_status sha def get_ci_build(sha)
response = HTTParty.get(commit_status_path(sha), verify: false) @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"] if response.code == 200 and response["status"]
response["status"] response["status"]
...@@ -41,7 +46,15 @@ class GitlabCiService < CiService ...@@ -41,7 +46,15 @@ class GitlabCiService < CiService
end end
end end
def build_page sha 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}" project_url + "/builds/#{sha}"
end end
......
...@@ -11,7 +11,7 @@ class ProjectTeam ...@@ -11,7 +11,7 @@ class ProjectTeam
# @team << [@user, :master] # @team << [@user, :master]
# @team << [@users, :master] # @team << [@users, :master]
# #
def << args def <<(args)
users = args.first users = args.first
if users.respond_to?(:each) if users.respond_to?(:each)
......
...@@ -204,7 +204,7 @@ class User < ActiveRecord::Base ...@@ -204,7 +204,7 @@ class User < ActiveRecord::Base
User.where(name: name).first User.where(name: name).first
end end
def filter filter_name def filter(filter_name)
case filter_name case filter_name
when "admins"; self.admins when "admins"; self.admins
when "blocked"; self.blocked when "blocked"; self.blocked
...@@ -214,7 +214,7 @@ class User < ActiveRecord::Base ...@@ -214,7 +214,7 @@ class User < ActiveRecord::Base
end end
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}%") where("lower(name) LIKE :query OR lower(email) LIKE :query OR lower(username) LIKE :query", query: "%#{query.downcase}%")
end end
...@@ -334,7 +334,7 @@ class User < ActiveRecord::Base ...@@ -334,7 +334,7 @@ class User < ActiveRecord::Base
several_namespaces? || admin several_namespaces? || admin
end end
def can? action, subject def can?(action, subject)
abilities.allowed?(self, action, subject) abilities.allowed?(self, action, subject)
end end
...@@ -355,7 +355,7 @@ class User < ActiveRecord::Base ...@@ -355,7 +355,7 @@ class User < ActiveRecord::Base
(personal_projects.count.to_f / projects_limit) * 100 (personal_projects.count.to_f / projects_limit) * 100
end end
def recent_push project_id = nil def recent_push(project_id = nil)
# Get push events not earlier than 2 hours ago # Get push events not earlier than 2 hours ago
events = recent_events.code_push.where("created_at > ?", Time.now - 2.hours) events = recent_events.code_push.where("created_at > ?", Time.now - 2.hours)
events = events.where(project_id: project_id) if project_id events = events.where(project_id: project_id) if project_id
...@@ -384,11 +384,11 @@ class User < ActiveRecord::Base ...@@ -384,11 +384,11 @@ class User < ActiveRecord::Base
project.team_member_by_id(self.id) project.team_member_by_id(self.id)
end end
def already_forked? project def already_forked?(project)
!!fork_of(project) !!fork_of(project)
end end
def fork_of project def fork_of(project)
links = ForkedProjectLink.where(forked_from_project_id: project, forked_to_project_id: personal_projects) links = ForkedProjectLink.where(forked_from_project_id: project, forked_to_project_id: personal_projects)
if links.any? if links.any?
...@@ -514,7 +514,7 @@ class User < ActiveRecord::Base ...@@ -514,7 +514,7 @@ class User < ActiveRecord::Base
NotificationService.new NotificationService.new
end end
def log_info message def log_info(message)
Gitlab::AppLogger.info message Gitlab::AppLogger.info message
end end
......
...@@ -25,7 +25,7 @@ class BaseService ...@@ -25,7 +25,7 @@ class BaseService
EventCreateService.new EventCreateService.new
end end
def log_info message def log_info(message)
Gitlab::AppLogger.info message Gitlab::AppLogger.info message
end end
......
...@@ -75,7 +75,7 @@ class GitPushService ...@@ -75,7 +75,7 @@ class GitPushService
# Extract any GFM references from the pushed commit messages. If the configured issue-closing regex is matched, # 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. # 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) is_default_branch = is_default_branch?(ref)
@push_commits.each do |commit| @push_commits.each do |commit|
...@@ -154,49 +154,40 @@ class GitPushService ...@@ -154,49 +154,40 @@ class GitPushService
# will be passed as post receive hook data. # will be passed as post receive hook data.
# #
push_commits_limited.each do |commit| push_commits_limited.each do |commit|
data[:commits] << { data[:commits] << commit.hook_attrs(project)
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
}
}
end end
data data
end end
def push_to_existing_branch? ref, oldrev def push_to_existing_branch?(ref, oldrev)
ref_parts = ref.split('/') ref_parts = ref.split('/')
# Return if this is not a push to a branch (e.g. new commits) # Return if this is not a push to a branch (e.g. new commits)
ref_parts[1] =~ /heads/ && oldrev != "0000000000000000000000000000000000000000" ref_parts[1] =~ /heads/ && oldrev != "0000000000000000000000000000000000000000"
end end
def push_to_new_branch? ref, oldrev def push_to_new_branch?(ref, oldrev)
ref_parts = ref.split('/') ref_parts = ref.split('/')
ref_parts[1] =~ /heads/ && oldrev == "0000000000000000000000000000000000000000" ref_parts[1] =~ /heads/ && oldrev == "0000000000000000000000000000000000000000"
end end
def push_remove_branch? ref, newrev def push_remove_branch?(ref, newrev)
ref_parts = ref.split('/') ref_parts = ref.split('/')
ref_parts[1] =~ /heads/ && newrev == "0000000000000000000000000000000000000000" ref_parts[1] =~ /heads/ && newrev == "0000000000000000000000000000000000000000"
end end
def push_to_branch? ref def push_to_branch?(ref)
ref =~ /refs\/heads/ ref =~ /refs\/heads/
end end
def is_default_branch? ref def is_default_branch?(ref)
ref == "refs/heads/#{project.default_branch}" ref == "refs/heads/#{project.default_branch}"
end end
def commit_user commit def commit_user(commit)
User.find_for_commit(commit.author_email, commit.author_name) || user User.find_for_commit(commit.author_email, commit.author_name) || user
end end
end end
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
.panel-body .panel-body
- if @sidekiq_processes.empty? - if @sidekiq_processes.empty?
%h4.cred %h4.cred
%i.icon-warning-sign %i.fa.fa-exclamation-triangle
There are no running sidekiq processes. Please restart GitLab There are no running sidekiq processes. Please restart GitLab
- else - else
%table.table %table.table
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
.clearfix .clearfix
%p %p
%i.icon-exclamation-sign %i.fa.fa-exclamation-circle
If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'. If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'.
%p %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. 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.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
%p.light %p.light
Broadcast messages are displayed for every user and can be used to notify users about scheduled maintenance, recent upgrades and more. Broadcast messages are displayed for every user and can be used to notify users about scheduled maintenance, recent upgrades and more.
.broadcast-message-preview .broadcast-message-preview
%i.icon-bullhorn %i.fa.fa-bullhorn
%span Your message here %span Your message here
= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal'} do |f| = form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal'} do |f|
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
#{broadcast_message.ends_at.to_s(:short)} #{broadcast_message.ends_at.to_s(:short)}
&nbsp; &nbsp;
= link_to [:admin, broadcast_message], method: :delete, remote: true, class: 'remove-row btn btn-tiny' do = 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 .message= broadcast_message.message
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
= f.label :avatar, "Group avatar", class: 'control-label' = f.label :avatar, "Group avatar", class: 'control-label'
.col-sm-10 .col-sm-10
%a.choose-btn.btn.btn-small.js-choose-group-avatar-button %a.choose-btn.btn.btn-small.js-choose-group-avatar-button
%i.icon-paper-clip %i.fa.fa-paperclip
%span Choose File ... %span Choose File ...
&nbsp; &nbsp;
%span.file_name.js-avatar-filename File name... %span.file_name.js-avatar-filename File name...
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
%h4 %h4
= link_to [:admin, group] do = link_to [:admin, group] do
%i.icon-folder-close %i.fa.fa-folder
= group.name = group.name
&rarr; &rarr;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Group: #{@group.name} Group: #{@group.name}
= link_to edit_admin_group_path(@group), class: "btn pull-right" do = link_to edit_admin_group_path(@group), class: "btn pull-right" do
%i.icon-edit %i.fa.fa-pencil-square-o
Edit Edit
%hr %hr
.row .row
...@@ -108,6 +108,6 @@ ...@@ -108,6 +108,6 @@
%span.pull-right.light %span.pull-right.light
= member.human_access = 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 = 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 .panel-footer
= paginate @members, param_name: 'members_page', theme: 'gitlab' = paginate @members, param_name: 'members_page', theme: 'gitlab'
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
.tab-pane.active#githost .tab-pane.active#githost
.file-holder#README .file-holder#README
.file-title .file-title
%i.icon-file %i.fa.fa-file
githost.log githost.log
.pull-right .pull-right
= link_to '#', class: 'log-bottom' do = link_to '#', class: 'log-bottom' do
%i.icon-arrow-down %i.fa.fa-arrow-down
Scroll down Scroll down
.file-content.logs .file-content.logs
%ol %ol
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
.tab-pane#application .tab-pane#application
.file-holder#README .file-holder#README
.file-title .file-title
%i.icon-file %i.fa.fa-file
application.log application.log
.pull-right .pull-right
= link_to '#', class: 'log-bottom' do = link_to '#', class: 'log-bottom' do
%i.icon-arrow-down %i.fa.fa-arrow-down
Scroll down Scroll down
.file-content.logs .file-content.logs
%ol %ol
...@@ -41,11 +41,11 @@ ...@@ -41,11 +41,11 @@
.tab-pane#production .tab-pane#production
.file-holder#README .file-holder#README
.file-title .file-title
%i.icon-file %i.fa.fa-file
production.log production.log
.pull-right .pull-right
= link_to '#', class: 'log-bottom' do = link_to '#', class: 'log-bottom' do
%i.icon-arrow-down %i.fa.fa-arrow-down
Scroll down Scroll down
.file-content.logs .file-content.logs
%ol %ol
...@@ -55,11 +55,11 @@ ...@@ -55,11 +55,11 @@
.tab-pane#sidekiq .tab-pane#sidekiq
.file-holder#README .file-holder#README
.file-title .file-title
%i.icon-file %i.fa.fa-file
sidekiq.log sidekiq.log
.pull-right .pull-right
= link_to '#', class: 'log-bottom' do = link_to '#', class: 'log-bottom' do
%i.icon-arrow-down %i.fa.fa-arrow-down
Scroll down Scroll down
.file-content.logs .file-content.logs
%ol %ol
......
%h3.page-title %h3.page-title
Project: #{@project.name_with_namespace} Project: #{@project.name_with_namespace}
= link_to edit_project_path(@project), class: "btn pull-right" do = link_to edit_project_path(@project), class: "btn pull-right" do
%i.icon-edit %i.fa.fa-pencil-square-o
Edit Edit
%hr %hr
.row .row
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
group members (#{@group.group_members.count}) group members (#{@group.group_members.count})
.pull-right .pull-right
= link_to admin_group_path(@group), class: 'btn btn-small' do = link_to admin_group_path(@group), class: 'btn btn-small' do
%i.icon-edit %i.fa.fa-pencil-square-o
%ul.well-list %ul.well-list
- @group_members.each do |member| - @group_members.each do |member|
= render 'groups/group_members/group_member', member: member, show_controls: false = render 'groups/group_members/group_member', member: member, show_controls: false
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
(#{@project.users.count}) (#{@project.users.count})
.pull-right .pull-right
= link_to project_team_index_path(@project), class: "btn btn-tiny" do = link_to project_team_index_path(@project), class: "btn btn-tiny" do
%i.icon-edit %i.fa.fa-pencil-square-o
Manage Access Manage Access
%ul.well-list.team_members %ul.well-list.team_members
- @project_members.each do |project_member| - @project_members.each do |project_member|
...@@ -127,6 +127,6 @@ ...@@ -127,6 +127,6 @@
- else - else
%span.light= project_member.human_access %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 = 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 .panel-footer
= paginate @project_members, param_name: 'project_members_page', theme: 'gitlab' = paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
.form-group .form-group
= search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control' = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control'
= button_tag class: 'btn btn-primary' do = button_tag class: 'btn btn-primary' do
%i.icon-search %i.fa.fa-search
%hr %hr
= link_to 'Reset', admin_users_path, class: "btn btn-cancel" = link_to 'Reset', admin_users_path, class: "btn btn-cancel"
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
%li %li
.list-item-name .list-item-name
- if user.blocked? - if user.blocked?
%i.icon-lock.cred %i.fa.fa-lock.cred
- else - else
%i.icon-user.cgreen %i.fa.fa-user.cgreen
= link_to user.name, [:admin, user] = link_to user.name, [:admin, user]
- if user.admin? - if user.admin?
%strong.cred (Admin) %strong.cred (Admin)
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
%span.cred It's you! %span.cred It's you!
.pull-right .pull-right
%span.light %span.light
%i.icon-envelope %i.fa.fa-envelope
= mail_to user.email, user.email, class: 'light' = mail_to user.email, user.email, class: 'light'
&nbsp; &nbsp;
= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-small" = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-small"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
.pull-right .pull-right
= link_to edit_admin_user_path(@user), class: "btn btn-grouped" do = link_to edit_admin_user_path(@user), class: "btn btn-grouped" do
%i.icon-edit %i.fa.fa-pencil-square-o
Edit Edit
%hr %hr
%ul.nav.nav-tabs %ul.nav.nav-tabs
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
%span.light Secondary email: %span.light Secondary email:
%strong= email.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 = 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 %li
%span.light Can create groups: %span.light Can create groups:
...@@ -86,6 +86,11 @@ ...@@ -86,6 +86,11 @@
- else - else
never never
%li
%span.light Sign-in count:
%strong
= @user.sign_in_count
- if @user.ldap_user? - if @user.ldap_user?
%li %li
%span.light LDAP uid: %span.light LDAP uid:
...@@ -171,8 +176,8 @@ ...@@ -171,8 +176,8 @@
.pull-right .pull-right
%span.light= user_group.human_access %span.light= user_group.human_access
- unless user_group.owner? - 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 %i.fa.fa-times.fa-inverse
- else - else
.nothing-here-block This user has no groups. .nothing-here-block This user has no groups.
...@@ -211,4 +216,4 @@ ...@@ -211,4 +216,4 @@
- if tm.respond_to? :project - 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 = 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
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= search_field_tag :filter_group, nil, placeholder: 'Filter by name', class: 'dash-filter form-control' = search_field_tag :filter_group, nil, placeholder: 'Filter by name', class: 'dash-filter form-control'
- if current_user.can_create_group? - if current_user.can_create_group?
= link_to new_group_path, class: "btn btn-new pull-right" do = link_to new_group_path, class: "btn btn-new pull-right" do
%i.icon-plus %i.fa.fa-plus
New group New group
%ul.well-list.dash-list %ul.well-list.dash-list
- groups.each do |group| - groups.each do |group|
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
%span.group-name.filter-title %span.group-name.filter-title
= truncate(group.name, length: 35) = truncate(group.name, length: 35)
%span.arrow %span.arrow
%i.icon-angle-right %i.fa.fa-angle-right
- if groups.blank? - if groups.blank?
%li %li
.nothing-here-block You have no groups yet. .nothing-here-block You have no groups yet.
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
%span.project-name.filter-title %span.project-name.filter-title
= project.name = project.name
%span.arrow %span.arrow
%i.icon-angle-right %i.fa.fa-angle-right
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-filter form-control' = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-filter form-control'
- if current_user.can_create_project? - if current_user.can_create_project?
= link_to new_project_path, class: "btn btn-new pull-right" do = link_to new_project_path, class: "btn btn-new pull-right" do
%i.icon-plus %i.fa.fa-plus
New project New project
%ul.well-list.dash-list %ul.well-list.dash-list
...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
.pull-right .pull-right
= link_to projects_dashboard_path do = link_to projects_dashboard_path do
Show all Show all
%i.icon-angle-right %i.fa.fa-angle-right
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
- @groups.each do |group| - @groups.each do |group|
%li{ class: (group.name == params[:group]) ? 'active' : 'light' } %li{ class: (group.name == params[:group]) ? 'active' : 'light' }
= link_to projects_dashboard_filter_path(group: group.name) do = link_to projects_dashboard_filter_path(group: group.name) do
%i.icon-folder-close-alt %i.fa.fa-folder-o
= group.name = group.name
%small.pull-right %small.pull-right
= group.projects.count = group.projects.count
...@@ -51,5 +51,5 @@ ...@@ -51,5 +51,5 @@
- @tags.each do |tag| - @tags.each do |tag|
%li{ class: (tag.name == params[:tag]) ? 'active' : 'light' } %li{ class: (tag.name == params[:tag]) ? 'active' : 'light' }
= link_to projects_dashboard_filter_path(scope: params[:scope], tag: tag.name) do = link_to projects_dashboard_filter_path(scope: params[:scope], tag: tag.name) do
%i.icon-tag %i.fa.fa-tag
= tag.name = tag.name
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
%span.rss-icon %span.rss-icon
= link_to dashboard_path(:atom, { private_token: current_user.private_token }) do = link_to dashboard_path(:atom, { private_token: current_user.private_token }) do
%strong %strong
%i.icon-rss %i.fa.fa-rss
News Feed News Feed
%hr %hr
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
%hr %hr
%div %div
.dashboard-intro-icon .dashboard-intro-icon
%i.icon-bookmark-empty %i.fa.fa-bookmark-o
%div %div
%p.slead %p.slead
You don't have access to any projects right now. You don't have access to any projects right now.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
%hr %hr
%div %div
.dashboard-intro-icon .dashboard-intro-icon
%i.icon-group %i.fa.fa-users
%div %div
%p.slead %p.slead
You can create a group for several dependent projects. You can create a group for several dependent projects.
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
%hr %hr
%div %div
.dashboard-intro-icon .dashboard-intro-icon
%i.icon-globe %i.fa.fa-globe
%div %div
%p.slead %p.slead
There are There are
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
.row .row
.fixed.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.fa.fa-list.fa-2x
.col-md-3.responsive-side .col-md-3.responsive-side
= render 'shared/filter', entity: 'issue' = render 'shared/filter', entity: 'issue'
.col-md-9 .col-md-9
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
%hr %hr
.row .row
.fixed.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.fa.fa-list.fa-2x
.col-md-3.responsive-side .col-md-3.responsive-side
= render 'shared/filter', entity: 'merge_request' = render 'shared/filter', entity: 'merge_request'
.col-md-9 .col-md-9
......
...@@ -40,23 +40,23 @@ ...@@ -40,23 +40,23 @@
- if current_user.can_leave_project?(project) - if current_user.can_leave_project?(project)
.pull-right .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 = 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 Leave
- if project.forked_from_project - if project.forked_from_project
%small.pull-right %small.pull-right
%i.icon-code-fork %i.fa.fa-code-fork
Forked from: Forked from:
= link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project) = link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project)
.project-info .project-info
.pull-right .pull-right
- if project.archived? - if project.archived?
%span.label %span.label
%i.icon-archive %i.fa.fa-archive
Archived Archived
- project.tags.each do |tag| - project.tags.each do |tag|
%span.label.label-info %span.label.label-info
%i.icon-tag %i.fa.fa-tag
= tag.name = tag.name
- if project.description.present? - if project.description.present?
%p= truncate project.description, length: 100 %p= truncate project.description, length: 100
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
= render 'sidebar' = render 'sidebar'
.fixed.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.fa.fa-list.fa-2x
- else - else
= render "zero_authorized_projects" = render "zero_authorized_projects"
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.event-body .event-body
.event-note .event-note
.md .md
%i.icon-comment-alt.event-note-icon %i.fa.fa-comment-o.event-note-icon
= event_note(event.target.note) = event_note(event.target.note)
- note = event.target - note = event.target
- if note.attachment.url - if note.attachment.url
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
= image_tag note.attachment.secure_url, class: 'note-image-attach' = image_tag note.attachment.secure_url, class: 'note-image-attach'
- else - else
= link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do
%i.icon-paper-clip %i.fa.fa-paperclip
= note.attachment_identifier = note.attachment_identifier
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
.clearfix .clearfix
%h4 %h4
= link_to group_path(id: group.path) do = link_to group_path(id: group.path) do
%i.icon-group %i.fa.fa-users
= group.name = group.name
.clearfix .clearfix
%p %p
......
...@@ -21,5 +21,5 @@ ...@@ -21,5 +21,5 @@
&middot; &middot;
= link_to pluralize(project.repository.tag_names.count, 'tag'), project_tags_path(project) = link_to pluralize(project.repository.tag_names.count, 'tag'), project_tags_path(project)
- else - else
%i.icon-warning-sign %i.fa.fa-exclamation-triangle
Empty repository Empty repository
.explore-trending-block .explore-trending-block
%p.lead %p.lead
%i.icon-comments-alt %i.fa.fa-comments-o
See most starred projects See most starred projects
%hr %hr
.public-projects .public-projects
......
.explore-trending-block .explore-trending-block
%p.lead %p.lead
%i.icon-comments-alt %i.fa.fa-comments-o
See most discussed projects for last month See most discussed projects for last month
%hr %hr
.public-projects .public-projects
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- if can? current_user, :create_projects, @group - if can? current_user, :create_projects, @group
.panel-head-actions .panel-head-actions
= link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do = link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do
%i.icon-plus %i.fa.fa-plus
New project New project
%ul.well-list %ul.well-list
- if projects.blank? - if projects.blank?
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
%span.project-name %span.project-name
= project.name = project.name
%span.arrow %span.arrow
%i.icon-angle-right %i.fa.fa-angle-right
%ul.nav.nav-pills.nav-stacked.nav-stacked-menu %ul.nav.nav-pills.nav-stacked.nav-stacked-menu
= nav_link(path: 'groups#edit') do = nav_link(path: 'groups#edit') do
= link_to edit_group_path(@group) do = link_to edit_group_path(@group) do
%i.icon-edit %i.fa.fa-pencil-square-o
Group Group
= nav_link(path: 'groups#projects') do = nav_link(path: 'groups#projects') do
= link_to projects_group_path(@group) do = link_to projects_group_path(@group) do
%i.icon-folder-close %i.fa.fa-folder
Projects Projects
= nav_link(controller: :ldap_group_links) do = nav_link(controller: :ldap_group_links) do
= link_to group_ldap_group_links_path(@group) do = link_to group_ldap_group_links_path(@group) do
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
- else - else
You can upload a group avatar here You can upload a group avatar here
%a.choose-btn.btn.btn-small.js-choose-group-avatar-button %a.choose-btn.btn.btn-small.js-choose-group-avatar-button
%i.icon-paper-clip %i.fa.fa-paperclip
%span Choose File ... %span Choose File ...
&nbsp; &nbsp;
%span.file_name.js-avatar-filename File name... %span.file_name.js-avatar-filename File name...
......
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
- if show_controls - if show_controls
- if can?(current_user, :modify, member) - if can?(current_user, :modify, member)
= link_to '#', class: "btn-tiny btn js-toggle-button", title: 'Edit access level' do = 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 can?(current_user, :destroy, member)
- if current_user == member.user - 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 = 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 - 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 = 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 .edit-member.hide.js-toggle-content
= form_for [@group, member], remote: true do |f| = form_for [@group, member], remote: true do |f|
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.row .row
.fixed.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.fa.fa-list.fa-2x
.col-md-3.responsive-side .col-md-3.responsive-side
= render 'shared/filter', entity: 'issue' = render 'shared/filter', entity: 'issue'
.col-md-9 .col-md-9
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
= link_to '#', class: 'btn btn-new js-toggle-button' do = link_to '#', class: 'btn btn-new js-toggle-button' do
Add members Add members
%i.icon-chevron-down %i.fa.fa-chevron-down
.js-toggle-content.hide.new-group-member-holder .js-toggle-content.hide.new-group-member-holder
= render "new_group_member" = render "new_group_member"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
%hr %hr
.row .row
.fixed.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.fa.fa-list.fa-2x
.col-md-3.responsive-side .col-md-3.responsive-side
= render 'shared/filter', entity: 'merge_request' = render 'shared/filter', entity: 'merge_request'
.col-md-9 .col-md-9
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.row .row
.fixed.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.fa.fa-list.fa-2x
.col-md-3.responsive-side .col-md-3.responsive-side
= render 'groups/filter', entity: 'milestone' = render 'groups/filter', entity: 'milestone'
.col-md-9 .col-md-9
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
= f.label :avatar, "Group avatar", class: 'control-label' = f.label :avatar, "Group avatar", class: 'control-label'
.col-sm-10 .col-sm-10
%a.choose-btn.btn.btn-small.js-choose-group-avatar-button %a.choose-btn.btn.btn-small.js-choose-group-avatar-button
%i.icon-paper-clip %i.fa.fa-paperclip
%span Choose File ... %span Choose File ...
&nbsp; &nbsp;
%span.file_name.js-avatar-filename File name... %span.file_name.js-avatar-filename File name...
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
- if can? current_user, :manage_group, @group - if can? current_user, :manage_group, @group
.panel-head-actions .panel-head-actions
= link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do = link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do
%i.icon-plus %i.fa.fa-plus
New Project New Project
%ul.well-list %ul.well-list
- @projects.each do |project| - @projects.each do |project|
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
.prepend-top-20 .prepend-top-20
= link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed" do = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed" do
%strong %strong
%i.icon-rss %i.fa.fa-rss
News Feed News Feed
%hr %hr
......
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
%tr %tr
%td.shortcut %td.shortcut
.key .key
%i.icon-arrow-up %i.fa.fa-arrow-up
%td Move selection up %td Move selection up
%tr %tr
%td.shortcut %td.shortcut
.key .key
%i.icon-arrow-down %i.fa.fa-arrow-down
%td Move selection down %td Move selection down
%tr %tr
%td.shortcut %td.shortcut
...@@ -132,28 +132,28 @@ ...@@ -132,28 +132,28 @@
%tr %tr
%td.shortcut %td.shortcut
.key .key
%i.icon-arrow-left %i.fa.fa-arrow-left
\/ \/
.key h .key h
%td Scroll left %td Scroll left
%tr %tr
%td.shortcut %td.shortcut
.key .key
%i.icon-arrow-right %i.fa.fa-arrow-right
\/ \/
.key l .key l
%td Scroll right %td Scroll right
%tr %tr
%td.shortcut %td.shortcut
.key .key
%i.icon-arrow-up %i.fa.fa-arrow-up
\/ \/
.key k .key k
%td Scroll up %td Scroll up
%tr %tr
%td.shortcut %td.shortcut
.key .key
%i.icon-arrow-down %i.fa.fa-arrow-down
\/ \/
.key j .key j
%td Scroll down %td Scroll down
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
%td.shortcut %td.shortcut
.key .key
shift shift
%i.icon-arrow-up %i.fa.fa-arrow-up
\/ \/
.key .key
shift k shift k
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
%td.shortcut %td.shortcut
.key .key
shift shift
%i.icon-arrow-down %i.fa.fa-arrow-down
\/ \/
.key .key
shift j shift j
......
- if broadcast_message.present? - if broadcast_message.present?
.broadcast-message{ style: broadcast_styling(broadcast_message) } .broadcast-message{ style: broadcast_styling(broadcast_message) }
%i.icon-bullhorn %i.fa.fa-bullhorn
= broadcast_message.message = broadcast_message.message
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"} %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation %span.sr-only Toggle navigation
%i.icon-reorder %i.fa.fa-bars
.navbar-collapse.collapse .navbar-collapse.collapse
%ul.nav.navbar-nav %ul.nav.navbar-nav
...@@ -18,31 +18,31 @@ ...@@ -18,31 +18,31 @@
= render "layouts/search" = render "layouts/search"
%li.visible-sm.visible-xs %li.visible-sm.visible-xs
= link_to search_path, title: "Search", class: 'has_bottom_tooltip', 'data-original-title' => 'Search area' do = link_to search_path, title: "Search", class: 'has_bottom_tooltip', 'data-original-title' => 'Search area' do
%i.icon-search %i.fa.fa-search
%li %li
= link_to help_path, title: 'Help', class: 'has_bottom_tooltip', = link_to help_path, title: 'Help', class: 'has_bottom_tooltip',
'data-original-title' => 'Help' do 'data-original-title' => 'Help' do
%i.icon-question-sign %i.fa.fa-question-circle
%li %li
= link_to explore_root_path, title: "Explore", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do = 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 %li
= link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'My snippets' do = 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? - if current_user.is_admin?
%li %li
= link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do = 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? - if current_user.can_create_project?
%li %li
= link_to new_project_path, title: "New project", class: 'has_bottom_tooltip', 'data-original-title' => 'New project' do = 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 %li
= link_to profile_path, title: "Profile settings", class: 'has_bottom_tooltip', 'data-original-title' => 'Profile settings"' do = 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 %li
= link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do = 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 %li.hidden-xs
= link_to current_user, class: "profile-pic", id: 'profile-pic' do = link_to current_user, class: "profile-pic", id: 'profile-pic' do
= image_tag avatar_icon(current_user.email, 26), alt: 'User activity' = image_tag avatar_icon(current_user.email, 26), alt: 'User activity'
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"} %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation %span.sr-only Toggle navigation
%i.icon-reorder %i.fa.fa-bars
.pull-right.hidden-xs .pull-right.hidden-xs
= link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-new' = link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-new'
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
&nbsp; &nbsp;
.loading-gif.hide .loading-gif.hide
%p %p
%i.icon-spinner.icon-spin %i.fa.fa-spinner.fa-spin
Saving new username Saving new username
%p.light %p.light
= user_url(@user) = user_url(@user)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- if current_user.can_create_group? - if current_user.can_create_group?
%span.pull-right %span.pull-right
= link_to new_group_path, class: "btn btn-new" do = link_to new_group_path, class: "btn btn-new" do
%i.icon-plus %i.fa.fa-plus
New Group New Group
%p.light %p.light
Group members have access to all a group's projects Group members have access to all a group's projects
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
.pull-right .pull-right
- if can?(current_user, :manage_group, group) - if can?(current_user, :manage_group, group)
= link_to edit_group_path(group), class: "btn-small btn btn-grouped" do = link_to edit_group_path(group), class: "btn-small btn btn-grouped" do
%i.icon-cogs %i.fa.fa-cogs
Settings Settings
- if can?(current_user, :destroy, user_group) - 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 = 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 Leave
= link_to group, class: 'group-name' do = link_to group, class: 'group-name' do
......
%li %li
%span.notification-icon-holder %span.notification.fa.fa-holder
- if notification.global? - if notification.global?
= notification_icon(@notification) = notification_icon(@notification)
- else - else
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
or change it at #{link_to "gravatar.com", "http://gravatar.com"} or change it at #{link_to "gravatar.com", "http://gravatar.com"}
%hr %hr
%a.choose-btn.btn.btn-small.js-choose-user-avatar-button %a.choose-btn.btn.btn-small.js-choose-user-avatar-button
%i.icon-paper-clip %i.fa.fa-paperclip
%span Choose File ... %span Choose File ...
&nbsp; &nbsp;
%span.file_name.js-avatar-filename File name... %span.file_name.js-avatar-filename File name...
......
- if current_user - if current_user
.dropdown.pull-right .dropdown.pull-right
%a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"}
%i.icon-reorder %i.fa.fa-bars
%ul.dropdown-menu %ul.dropdown-menu
- if @project.issues_enabled && can?(current_user, :write_issue, @project) - if @project.issues_enabled && can?(current_user, :write_issue, @project)
%li %li
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
%li.divider %li.divider
%li %li
= link_to new_project_branch_path(@project) do = link_to new_project_branch_path(@project) do
%i.icon-code-fork %i.fa.fa-code-fork
Git branch Git branch
%li %li
= link_to new_project_tag_path(@project) do = link_to new_project_tag_path(@project) do
%i.icon-tag %i.fa.fa-tag
Git tag Git tag
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
.form-group .form-group
.issue-assignee .issue-assignee
= f.label :assignee_id, class: 'control-label' do = f.label :assignee_id, class: 'control-label' do
%i.icon-user %i.fa.fa-user
Assign to Assign to
.col-sm-10 .col-sm-10
= project_users_select_tag("#{issuable.class.model_name.param_key}[assignee_id]", = project_users_select_tag("#{issuable.class.model_name.param_key}[assignee_id]",
...@@ -40,17 +40,29 @@ ...@@ -40,17 +40,29 @@
.form-group .form-group
.issue-milestone .issue-milestone
= f.label :milestone_id, class: 'control-label' do = f.label :milestone_id, class: 'control-label' do
%i.icon-time %i.fa.fa-clock-o
Milestone Milestone
.col-sm-10= f.select(:milestone_id, milestone_options(issuable), .col-sm-10
- if milestone_options(issuable).present?
= f.select(:milestone_id, milestone_options(issuable),
{ include_blank: 'Select milestone' }, { class: 'select2' }) { include_blank: 'Select milestone' }, { class: 'select2' })
- else
%span.light No open milestones available.
&nbsp;
= link_to 'Create new milestone', new_project_milestone_path(issuable.project)
.form-group .form-group
= f.label :label_ids, class: 'control-label' do = f.label :label_ids, class: 'control-label' do
%i.icon-tag %i.icon-tag
Labels Labels
.col-sm-10 .col-sm-10
- if issuable.project.labels.any?
= f.collection_select :label_ids, issuable.project.labels.all, :id, :name, = f.collection_select :label_ids, issuable.project.labels.all, :id, :name,
{ selected: issuable.label_ids }, multiple: true, class: 'select2' { selected: issuable.label_ids }, multiple: true, class: 'select2'
- else
%span.light No labels yet.
&nbsp;
= link_to 'Create new label', new_project_label_path(issuable.project)
.form-actions .form-actions
- if issuable.new_record? - if issuable.new_record?
= f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create' = f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create'
......
%ul.nav.nav-pills.nav-stacked.nav-stacked-menu.append-bottom-20.project-settings-nav %ul.nav.nav-pills.nav-stacked.nav-stacked-menu.append-bottom-20.project-settings-nav
= nav_link(path: 'projects#edit') do = nav_link(path: 'projects#edit') do
= link_to edit_project_path(@project), class: "stat-tab tab " do = link_to edit_project_path(@project), class: "stat-tab tab " do
%i.icon-edit %i.fa.fa-pencil-square-o
Project Project
= nav_link(controller: [:team_members, :teams]) do = nav_link(controller: [:team_members, :teams]) do
= link_to project_team_index_path(@project), class: "team-tab tab" do = link_to project_team_index_path(@project), class: "team-tab tab" do
%i.icon-group %i.fa.fa-users
Members Members
= nav_link(controller: :group_links) do = nav_link(controller: :group_links) do
= link_to project_group_links_path(@project) do = link_to project_group_links_path(@project) do
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
Groups Groups
= nav_link(controller: :deploy_keys) do = nav_link(controller: :deploy_keys) do
= link_to project_deploy_keys_path(@project) do = link_to project_deploy_keys_path(@project) do
%i.icon-key %i.fa.fa-key
Deploy Keys Deploy Keys
= nav_link(controller: :hooks) do = nav_link(controller: :hooks) do
= link_to project_hooks_path(@project) do = link_to project_hooks_path(@project) do
%i.icon-link %i.fa.fa-link
Web Hooks Web Hooks
= nav_link(controller: :git_hooks) do = nav_link(controller: :git_hooks) do
= link_to project_git_hooks_path(@project) do = link_to project_git_hooks_path(@project) do
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
Git Hooks Git Hooks
= nav_link(controller: :services) do = nav_link(controller: :services) do
= link_to project_services_path(@project) do = link_to project_services_path(@project) do
%i.icon-cogs %i.fa.fa-cogs
Services Services
= nav_link(controller: :protected_branches) do = nav_link(controller: :protected_branches) do
= link_to project_protected_branches_path(@project) do = link_to project_protected_branches_path(@project) do
%i.icon-lock %i.fa.fa-lock
Protected branches Protected branches
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#tree-holder.tree-holder #tree-holder.tree-holder
.file-holder .file-holder
.file-title .file-title
%i.icon-file %i.fa.fa-file
%span.file_name %span.file_name
= @path = @path
%small= number_to_human_size @blob.size %small= number_to_human_size @blob.size
......
%ul.breadcrumb.repo-breadcrumb %ul.breadcrumb.repo-breadcrumb
%li %li
%i.icon-angle-right %i.fa.fa-angle-right
= link_to project_tree_path(@project, @ref) do = link_to project_tree_path(@project, @ref) do
= @project.path = @project.path
- tree_breadcrumbs(@tree, 6) do |title, path| - tree_breadcrumbs(@tree, 6) do |title, path|
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
%div#tree-content-holder.tree-content-holder %div#tree-content-holder.tree-content-holder
%article.file-holder %article.file-holder
.file-title.clearfix .file-title.clearfix
%i.icon-file %i.fa.fa-file
%span.file_name %span.file_name
= blob.name = blob.name
%small= number_to_human_size blob.size %small= number_to_human_size blob.size
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
.center .center
= link_to project_raw_path(@project, @id) do = link_to project_raw_path(@project, @id) do
%h1.light %h1.light
%i.icon-download-alt %i.fa.fa-arrow-circle-o-down-alt
%h4 %h4
Download (#{number_to_human_size blob.size}) Download (#{number_to_human_size blob.size})
...@@ -10,12 +10,8 @@ ...@@ -10,12 +10,8 @@
.modal-body .modal-body
= form_tag project_blob_path(@project, @id), method: :delete, class: 'form-horizontal' do = form_tag project_blob_path(@project, @id), method: :delete, class: 'form-horizontal' do
.form-group.commit_message-group = render 'shared/commit_message_container', params: params,
= label_tag 'commit_message', class: "control-label" do placeholder: 'Removed this file because...'
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')}
.form-group .form-group
.col-sm-2 .col-sm-2
.col-sm-10 .col-sm-10
......
...@@ -7,19 +7,19 @@ ...@@ -7,19 +7,19 @@
%span.label.label-info default %span.label.label-info default
- if @project.protected_branch? branch.name - if @project.protected_branch? branch.name
%span.label.label-success %span.label.label-success
%i.icon-lock %i.fa.fa-lock
protected protected
.pull-right .pull-right
- if can?(current_user, :download_code, @project) - if can?(current_user, :download_code, @project)
= render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'btn-grouped btn-group-small' = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'btn-grouped btn-group-small'
- if branch.name != @repository.root_ref - 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 = 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 Compare
- if can_remove_branch?(@project, branch.name) - 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 = 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 - if commit
%ul.list-unstyled %ul.list-unstyled
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.pull-right .pull-right
- if can? current_user, :push_code, @project - if can? current_user, :push_code, @project
= link_to new_project_branch_path(@project), class: 'btn btn-create' do = link_to new_project_branch_path(@project), class: 'btn btn-create' do
%i.icon-add-sign %i.fa.fa-add-sign
New branch New branch
&nbsp; &nbsp;
.dropdown.inline .dropdown.inline
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
%button{ type: "button", class: "close", "data-dismiss" => "alert"} &times; %button{ type: "button", class: "close", "data-dismiss" => "alert"} &times;
= @error = @error
%h3.page-title %h3.page-title
%i.icon-code-fork %i.fa.fa-code-fork
New branch New branch
= form_tag project_branches_path, method: :post, class: "form-horizontal" do = form_tag project_branches_path, method: :post, class: "form-horizontal" do
.form-group .form-group
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
%div %div
- if @notes_count > 0 - if @notes_count > 0
%span.btn.disabled.btn-grouped %span.btn.disabled.btn-grouped
%i.icon-comment %i.fa.fa-comment
= @notes_count = @notes_count
.pull-left.btn-group .pull-left.btn-group
%a.btn.btn-grouped.dropdown-toggle{ data: {toggle: :dropdown} } %a.btn.btn-grouped.dropdown-toggle{ data: {toggle: :dropdown} }
%i.icon-download-alt %i.fa.fa-arrow-circle-o-down-alt
Download as Download as
%span.caret %span.caret
%ul.dropdown-menu %ul.dropdown-menu
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
- if note_count > 0 - if note_count > 0
%span.label.label-gray %span.label.label-gray
%i.icon-comment= note_count %i.fa.fa-comment= note_count
- if commit.description? - if commit.description?
.commit-row-description.js-toggle-content .commit-row-description.js-toggle-content
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.row.commits-row .row.commits-row
.col-md-2 .col-md-2
%h4 %h4
%i.icon-calendar %i.fa.fa-calendar
%span= day.stamp("28 Aug, 2010") %span= day.stamp("28 Aug, 2010")
%p= pluralize(commits.count, 'commit') %p= pluralize(commits.count, 'commit')
.col-md-10 .col-md-10
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- if current_user && current_user.private_token - if current_user && current_user.private_token
.commits-feed-holder.hidden-xs.hidden-sm .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 = 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 Commits feed
%ul.breadcrumb.repo-breadcrumb %ul.breadcrumb.repo-breadcrumb
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
.pull-right .pull-right
- if @available_keys.include?(deploy_key) - if @available_keys.include?(deploy_key)
= link_to enable_project_deploy_key_path(@project, deploy_key), class: 'btn btn-small', method: :put do = 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 Enable
- else - else
- if deploy_key.projects.count > 1 - if deploy_key.projects.count > 1
= link_to disable_project_deploy_key_path(@project, deploy_key), class: 'btn btn-small', method: :put do = 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 Disable
- else - 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 '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 = 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 %strong= deploy_key.title
%p.light.prepend-top-10 %p.light.prepend-top-10
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Deploy keys allow read-only access to the repository 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 = 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 New Deploy Key
%p.light %p.light
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Wrap text Wrap text
&nbsp; &nbsp;
= link_to '#', class: 'js-toggle-diff-comments btn btn-small' do = link_to '#', class: 'js-toggle-diff-comments btn btn-small' do
%i.icon-chevron-down %i.fa.fa-chevron-down
Diff comments Diff comments
&nbsp; &nbsp;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
&nbsp; &nbsp;
= link_to '#', class: 'btn btn-small js-toggle-button' do = link_to '#', class: 'btn btn-small js-toggle-button' do
Show diff stats Show diff stats
%i.icon-chevron-down %i.fa.fa-chevron-down
.file-stats.js-toggle-content.hide .file-stats.js-toggle-content.hide
%ul.bordered-list %ul.bordered-list
- diffs.each_with_index do |diff, i| - diffs.each_with_index do |diff, i|
...@@ -19,23 +19,23 @@ ...@@ -19,23 +19,23 @@
- if diff.deleted_file - if diff.deleted_file
%span.deleted-file %span.deleted-file
%a{href: "#diff-#{i}"} %a{href: "#diff-#{i}"}
%i.icon-minus %i.fa.fa-minus
= diff.old_path = diff.old_path
- elsif diff.renamed_file - elsif diff.renamed_file
%span.renamed-file %span.renamed-file
%a{href: "#diff-#{i}"} %a{href: "#diff-#{i}"}
%i.icon-minus %i.fa.fa-minus
= diff.old_path = diff.old_path
\-> \->
= diff.new_path = diff.new_path
- elsif diff.new_file - elsif diff.new_file
%span.new-file %span.new-file
%a{href: "#diff-#{i}"} %a{href: "#diff-#{i}"}
%i.icon-plus %i.fa.fa-plus
= diff.new_path = diff.new_path
- else - else
%span.edit-file %span.edit-file
%a{href: "#diff-#{i}"} %a{href: "#diff-#{i}"}
%i.icon-adjust %i.fa.fa-adjust
= diff.new_path = diff.new_path
...@@ -96,13 +96,13 @@ ...@@ -96,13 +96,13 @@
.danger-settings.js-toggle-container .danger-settings.js-toggle-container
.centered-light-block .centered-light-block
%h3 %h3
%i.icon-warning-sign %i.fa.fa-exclamation-triangle
Dangerous settings Dangerous settings
%p Project settings below may result in data loss! %p Project settings below may result in data loss!
= link_to '#', class: 'btn js-toggle-button' do = link_to '#', class: 'btn js-toggle-button' do
Show them to me Show them to me
%i.icon-chevron-down %i.fa.fa-chevron-down
.js-toggle-content.hide .js-toggle-content.hide
- if can? current_user, :archive_project, @project - if can? current_user, :archive_project, @project
...@@ -192,6 +192,6 @@ ...@@ -192,6 +192,6 @@
.save-project-loader.hide .save-project-loader.hide
.center .center
%h2 %h2
%i.icon-spinner.icon-spin %i.fa.fa-spinner.fa-spin
Saving project. Saving project.
%p Please wait a moment, this page will automatically refresh when ready. %p Please wait a moment, this page will automatically refresh when ready.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
= form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do
.file-holder.file .file-holder.file
.file-title .file-title
%i.icon-file %i.fa.fa-file
%span.file_name %span.file_name
%span.monospace.light #{@ref}: %span.monospace.light #{@ref}:
= @path = @path
...@@ -20,14 +20,9 @@ ...@@ -20,14 +20,9 @@
.js-edit-mode-pane#preview.hide .js-edit-mode-pane#preview.hide
.center .center
%h2 %h2
%i.icon-spinner.icon-spin %i.fa.fa-spinner.fa-spin
= render 'shared/commit_message_container', params: params,
.form-group.commit_message-group placeholder: "Update #{@blob.name}"
= 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')}
.form-actions .form-actions
= hidden_field_tag 'last_commit', @last_commit = hidden_field_tag 'last_commit', @last_commit
= hidden_field_tag 'content', '', id: "file-content" = hidden_field_tag 'content', '', id: "file-content"
......
.alert.alert-danger.alert-block .alert.alert-danger.alert-block
%h4 %h4
%i.icon-code-fork %i.fa.fa-code-fork
Fork Error! Fork Error!
%p %p
You tried to fork You tried to fork
...@@ -15,5 +15,5 @@ ...@@ -15,5 +15,5 @@
%p %p
= link_to fork_project_path(@project), title: "Fork", class: "btn", method: "POST" do = 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 Try to Fork again
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.loading-graph .loading-graph
.center .center
%h3.page-title %h3.page-title
%i.icon-spinner.icon-spin %i.fa.fa-spinner.fa-spin
Building repository graph. Building repository graph.
%p.slead Please wait a moment, this page will automatically refresh when ready. %p.slead Please wait a moment, this page will automatically refresh when ready.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.save-project-loader .save-project-loader
.center .center
%h2 %h2
%i.icon-spinner.icon-spin %i.fa.fa-spinner.fa-spin
Import in progress. Import in progress.
%p.monospace git clone --bare #{hidden_pass_url(@project.import_url)} %p.monospace git clone --bare #{hidden_pass_url(@project.import_url)}
%p Please wait while we import the repository for you. Refresh at will. %p Please wait while we import the repository for you. Refresh at will.
......
...@@ -10,18 +10,18 @@ ...@@ -10,18 +10,18 @@
- if current_controller?(:milestones) - if current_controller?(:milestones)
%li.pull-right %li.pull-right
%button.btn.btn-default.sidebar-expand-button %button.btn.btn-default.sidebar-expand-button
%i.icon.icon-list %i.icon.fa.fa-list
- if current_controller?(:issues) - if current_controller?(:issues)
- if current_user - if current_user
%li %li
= link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do
%i.icon-rss %i.fa.fa-rss
%li.pull-right %li.pull-right
.pull-right .pull-right
%button.btn.btn-default.sidebar-expand-button %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 = 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 .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' } = 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 @@ ...@@ -32,5 +32,5 @@
= hidden_field_tag :label_id, params['label_id'] = hidden_field_tag :label_id, params['label_id']
- if can? current_user, :write_issue, @project - 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 = 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 New Issue
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
= render 'votes/votes_inline', votable: issue = render 'votes/votes_inline', votable: issue
- if issue.notes.any? - if issue.notes.any?
%span %span
%i.icon-comments %i.fa.fa-comments
= issue.notes.count = issue.notes.count
- if issue.milestone - if issue.milestone
%span %span
%i.icon-time %i.fa.fa-clock-o
= issue.milestone.title = issue.milestone.title
.pull-right .pull-right
%small updated #{time_ago_with_tooltip(issue.updated_at, 'bottom', 'issue_update_ago')} %small updated #{time_ago_with_tooltip(issue.updated_at, 'bottom', 'issue_update_ago')}
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
- else - 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 '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 = 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 Edit
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.issues-filters .issues-filters
.dropdown.inline .dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%i.icon-user %i.fa.fa-user
%span.light assignee: %span.light assignee:
- if @assignee.present? - if @assignee.present?
%strong= @assignee.name %strong= @assignee.name
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
.dropdown.inline.prepend-left-10 .dropdown.inline.prepend-left-10
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%i.icon-time %i.fa.fa-clock-o
%span.light milestone: %span.light milestone:
- if @milestone.present? - if @milestone.present?
%strong= @milestone.title %strong= @milestone.title
......
= render "head" = render "head"
.row .row
.fixed.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs .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 .col-md-3.responsive-side
= render 'shared/project_filter', project_entities_path: project_issues_path(@project), = render 'shared/project_filter', project_entities_path: project_issues_path(@project),
labels: true, redirect: 'issues', entity: 'issue' labels: true, redirect: 'issues', entity: 'issue'
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%span.pull-right.issue-btn-group %span.pull-right.issue-btn-group
- if can?(current_user, :write_issue, @project) - 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 = 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 New Issue
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
- if @issue.closed? - if @issue.closed?
...@@ -13,7 +13,7 @@ ...@@ -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 '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 = link_to edit_project_issue_path(@project, @issue), class: "btn btn-grouped" do
%i.icon-edit %i.fa.fa-pencil-square-o
Edit Edit
.clearfix .clearfix
......
...@@ -4,7 +4,7 @@ ...@@ -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" = 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? - if merge_request.merged?
%small.pull-right %small.pull-right
%i.icon-ok %i.fa.fa-check
MERGED MERGED
- else - else
%span.pull-right %span.pull-right
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%span.light %span.light
#{merge_request.source_project_namespace}: #{merge_request.source_project_namespace}:
= truncate merge_request.source_branch, length: 25 = truncate merge_request.source_branch, length: 25
%i.icon-angle-right.light %i.fa.fa-angle-right.light
= merge_request.target_branch = merge_request.target_branch
.merge-request-info .merge-request-info
- if merge_request.author - if merge_request.author
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
= render 'votes/votes_inline', votable: merge_request = render 'votes/votes_inline', votable: merge_request
- if merge_request.notes.any? - if merge_request.notes.any?
%span %span
%i.icon-comments %i.fa.fa-comments
= merge_request.mr_and_commit_notes.count = merge_request.mr_and_commit_notes.count
- if merge_request.milestone_id? - if merge_request.milestone_id?
%span %span
%i.icon-time %i.fa.fa-clock-o
= merge_request.milestone.title = merge_request.milestone.title
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
.form-group .form-group
.issue-assignee .issue-assignee
= f.label :assignee_id do = f.label :assignee_id do
%i.icon-user %i.fa.fa-user
Assign to Assign to
%div %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) = 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 @@ ...@@ -39,12 +39,12 @@
.form-group .form-group
.issue-milestone .issue-milestone
= f.label :milestone_id do = f.label :milestone_id do
%i.icon-time %i.fa.fa-clock-o
Milestone Milestone
%div= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'}) %div= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'})
.form-group .form-group
= f.label :label_ids do = f.label :label_ids do
%i.icon-tag %i.fa.fa-tag
Labels Labels
%div %div
= f.collection_select :label_ids, @merge_request.target_project.labels.all, :id, :name, { selected: @merge_request.label_ids }, multiple: true, class: 'select2' = f.collection_select :label_ids, @merge_request.target_project.labels.all, :id, :name, { selected: @merge_request.label_ids }, multiple: true, class: 'select2'
......
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
%ul.nav.nav-pills.merge-request-tabs %ul.nav.nav-pills.merge-request-tabs
%li.notes-tab{data: {action: 'notes'}} %li.notes-tab{data: {action: 'notes'}}
= link_to project_merge_request_path(@project, @merge_request) do = link_to project_merge_request_path(@project, @merge_request) do
%i.icon-comment %i.fa.fa-comment
Discussion Discussion
%span.badge= @merge_request.mr_and_commit_notes.count %span.badge= @merge_request.mr_and_commit_notes.count
%li.diffs-tab{data: {action: 'diffs'}} %li.diffs-tab{data: {action: 'diffs'}}
= link_to diffs_project_merge_request_path(@project, @merge_request) do = link_to diffs_project_merge_request_path(@project, @merge_request) do
%i.icon-list-alt %i.fa.fa-list-alt
Changes Changes
%span.badge= @merge_request.diffs.size %span.badge= @merge_request.diffs.size
......
- if can? current_user, :write_merge_request, @project - 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 = 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 New Merge Request
%h3.page-title %h3.page-title
Merge Requests Merge Requests
%hr %hr
.row .row
.fixed.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x %i.fa.fa-list.fa-2x
.col-md-3.responsive-side .col-md-3.responsive-side
= render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project), = render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project),
labels: true, redirect: 'merge_requests', entity: 'merge_request' labels: true, redirect: 'merge_requests', entity: 'merge_request'
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
.mr-filters.append-bottom-10 .mr-filters.append-bottom-10
.dropdown.inline .dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%i.icon-user %i.fa.fa-user
%span.light assignee: %span.light assignee:
- if @assignee.present? - if @assignee.present?
%strong= @assignee.name %strong= @assignee.name
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
.dropdown.inline.prepend-left-10 .dropdown.inline.prepend-left-10
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%i.icon-time %i.fa.fa-clock-o
%span.light milestone: %span.light milestone:
- if @milestone.present? - if @milestone.present?
%strong= @milestone.title %strong= @milestone.title
......
- if @commits.present? - if @commits.present?
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%i.icon-list %i.fa.fa-list
Commits (#{@commits.count}) Commits (#{@commits.count})
.commits.mr-commits .commits.mr-commits
- if @commits.count > 8 - if @commits.count > 8
......
...@@ -22,15 +22,9 @@ ...@@ -22,15 +22,9 @@
%strong= link_to "modify merge commit message", "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message" %strong= link_to "modify merge commit message", "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message"
before accepting merge request before accepting merge request
.js-toggle-content.hide .js-toggle-content.hide
.form-group = render 'shared/commit_message_container', params: params,
= label_tag :merge_commit_message, "Commit message", class: 'control-label' text: @merge_request.merge_commit_message,
.col-sm-10 rows: 14, hint: true
= 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.
.accept-group .accept-group
.pull-left .pull-left
= f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request" = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
...@@ -63,7 +57,7 @@ ...@@ -63,7 +57,7 @@
.automerge_widget.unchecked .automerge_widget.unchecked
%p %p
%strong %strong
%i.icon-spinner.icon-spin %i.fa.fa-spinner.fa-spin
Checking for ability to automatically merge… Checking for ability to automatically merge…
.automerge_widget.already_cannot_be_merged.hide .automerge_widget.already_cannot_be_merged.hide
...@@ -72,6 +66,6 @@ ...@@ -72,6 +66,6 @@
.merge-in-progress.hide .merge-in-progress.hide
%p %p
%i.icon-spinner.icon-spin %i.fa.fa-spinner.fa-spin
&nbsp; &nbsp;
Merge is in progress. Please wait. Page will be automatically reloaded. &nbsp; Merge is in progress. Please wait. Page will be automatically reloaded. &nbsp;
- if @commits.any? - if @commits.any?
.ci_widget.ci-success{style: "display:none"} .ci_widget.ci-success{style: "display:none"}
%i.icon-ok %i.fa.fa-check
%span CI build passed %span CI build passed
for #{@merge_request.last_commit_short_sha}. for #{@merge_request.last_commit_short_sha}.
= link_to "Build page", ci_build_details_path(@merge_request) = link_to "Build page", ci_build_details_path(@merge_request)
.ci_widget.ci-failed{style: "display:none"} .ci_widget.ci-failed{style: "display:none"}
%i.icon-remove %i.fa.fa-times
%span CI build failed %span CI build failed
for #{@merge_request.last_commit_short_sha}. for #{@merge_request.last_commit_short_sha}.
= link_to "Build page", ci_build_details_path(@merge_request) = link_to "Build page", ci_build_details_path(@merge_request)
- [:running, :pending].each do |status| - [:running, :pending].each do |status|
.ci_widget{class: "ci-#{status}", style: "display:none"} .ci_widget{class: "ci-#{status}", style: "display:none"}
%i.icon-time %i.fa.fa-clock-o
%span CI build #{status} %span CI build #{status}
for #{@merge_request.last_commit_short_sha}. for #{@merge_request.last_commit_short_sha}.
= link_to "Build page", ci_build_details_path(@merge_request) = link_to "Build page", ci_build_details_path(@merge_request)
.ci_widget .ci_widget
%strong %strong
%i.icon-spinner %i.fa.fa-spinner
Checking for CI status for #{@merge_request.last_commit_short_sha} Checking for CI status for #{@merge_request.last_commit_short_sha}
.ci_widget.ci-error{style: "display:none"} .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. %span Cannot connect to the CI server. Please check your settings and try again.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- if @merge_request.open? - if @merge_request.open?
.btn-group.pull-left .btn-group.pull-left
%a.btn.btn-grouped.dropdown-toggle{ data: {toggle: :dropdown} } %a.btn.btn-grouped.dropdown-toggle{ data: {toggle: :dropdown} }
%i.icon-download-alt %i.fa.fa-arrow-circle-o-down-alt
Download as Download as
%span.caret %span.caret
%ul.dropdown-menu %ul.dropdown-menu
...@@ -16,7 +16,7 @@ ...@@ -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 '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 = 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 Edit
- if @merge_request.closed? - 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" = 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"
...@@ -31,7 +31,12 @@ ...@@ -31,7 +31,12 @@
%span.prepend-left-20 %span.prepend-left-20
%span From %span From
- if @merge_request.for_fork? - 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 %span into
%strong.label-branch #{@merge_request.target_project_namespace}:#{@merge_request.target_branch} %strong.label-branch #{@merge_request.target_project_namespace}:#{@merge_request.target_branch}
- else - else
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
.remove_source_branch_widget .remove_source_branch_widget
%p Changes merged into #{@merge_request.target_branch}. You can remove source branch now %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 = 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
.remove_source_branch_widget.failed.hide .remove_source_branch_widget.failed.hide
Failed to remove source branch '#{@merge_request.source_branch}' Failed to remove source branch '#{@merge_request.source_branch}'
.remove_source_branch_in_progress.hide .remove_source_branch_in_progress.hide
%i.icon-refresh.icon-spin %i.fa.fa-refresh.fa-spin
&nbsp; &nbsp;
Removing source branch '#{@merge_request.source_branch}'. Please wait. Page will be automatically reloaded. &nbsp; Removing source branch '#{@merge_request.source_branch}'. Please wait. Page will be automatically reloaded. &nbsp;
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
- if !@closes_issues.empty? && @merge_request.open? - if !@closes_issues.empty? && @merge_request.open?
.panel-footer .panel-footer
%span %span
%i.icon-ok %i.fa.fa-check
Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'} Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'}
= succeed '.' do = succeed '.' do
!= gfm(issues_sentence(@closes_issues)) != gfm(issues_sentence(@closes_issues))
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
%hr %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? -if @milestone.errors.any?
.alert.alert-danger .alert.alert-danger
%ul %ul
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
.form-group .form-group
= f.label :description, "Description", class: "control-label" = f.label :description, "Description", class: "control-label"
.col-sm-10 .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 .hint
.pull-left Milestones are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}. .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' }. .pull-left Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.pull-right .pull-right
- if can?(current_user, :admin_milestone, milestone.project) and milestone.active? - 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 = 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 Edit
= link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-close" = link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-close"
%h4 %h4
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
Milestones Milestones
- if can? current_user, :admin_milestone, @project - if can? current_user, :admin_milestone, @project
= link_to new_project_milestone_path(@project), class: "pull-right btn btn-new", title: "New Milestone" do = 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 New Milestone
.row .row
.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs .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 .col-md-3.responsive-side
%ul.nav.nav-pills.nav-stacked %ul.nav.nav-pills.nav-stacked
%li{class: ("active" if (params[:f] == "active" || !params[:f]))} %li{class: ("active" if (params[:f] == "active" || !params[:f]))}
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.pull-right .pull-right
- if can?(current_user, :admin_milestone, @project) - if can?(current_user, :admin_milestone, @project)
= link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped" do = link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped" do
%i.icon-edit %i.fa.fa-pencil-square-o
Edit Edit
- if @milestone.active? - if @milestone.active?
= link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-grouped" = 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 @@ ...@@ -70,7 +70,7 @@
.pull-right .pull-right
= link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small btn-grouped", title: "New Issue" do = 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 New Issue
= link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn btn-small edit-milestone-link btn-grouped" = link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn btn-small edit-milestone-link btn-grouped"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= form_tag project_network_path(@project, @id), method: :get, class: 'form-inline network-form' do |f| = 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' = 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 = button_tag class: 'btn btn-success btn-search-sha' do
%i.icon-search %i.fa.fa-search
.inline.prepend-left-20 .inline.prepend-left-20
.checkbox.light .checkbox.light
= label_tag :filter_ref do = label_tag :filter_ref do
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
.col-sm-2 .col-sm-2
.col-sm-10 .col-sm-10
= link_to "#", class: 'js-toggle-button' do = link_to "#", class: 'js-toggle-button' do
%i.icon-edit %i.fa.fa-pencil-square-o
%span Customize repository name? %span Customize repository name?
.js-toggle-content.hide .js-toggle-content.hide
.form-group .form-group
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
.col-sm-2 .col-sm-2
.col-sm-10 .col-sm-10
= link_to "#", class: 'js-toggle-button' do = link_to "#", class: 'js-toggle-button' do
%i.icon-upload-alt %i.fa.fa-upload
%span Import existing repository? %span Import existing repository?
.js-toggle-content.hide .js-toggle-content.hide
.form-group.import-url-data .form-group.import-url-data
...@@ -74,6 +74,6 @@ ...@@ -74,6 +74,6 @@
.save-project-loader.hide .save-project-loader.hide
.center .center
%h2 %h2
%i.icon-spinner.icon-spin %i.fa.fa-spinner.fa-spin
Creating project &amp; repository. Creating project &amp; repository.
%p Please wait a moment, this page will automatically refresh when ready. %p Please wait a moment, this page will automatically refresh when ready.
...@@ -19,18 +19,11 @@ ...@@ -19,18 +19,11 @@
Encoding Encoding
.col-sm-10 .col-sm-10
= select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'form-control' = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'form-control'
= render 'shared/commit_message_container', params: params,
.form-group.commit_message-group placeholder: 'Add new file'
= 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')}
.file-holder .file-holder
.file-title .file-title
%i.icon-file %i.fa.fa-file
.file-content.code .file-content.code
%pre#editor= params[:content] %pre#editor= params[:content]
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%tr.notes_holder %tr.notes_holder
%td.notes_line{ colspan: 2 } %td.notes_line{ colspan: 2 }
%span.discussion-notes-count %span.discussion-notes-count
%i.icon-comment %i.fa.fa-comment
= notes.count = notes.count
%td.notes_content %td.notes_content
%ul.notes{ rel: note.discussion_id } %ul.notes{ rel: note.discussion_id }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- if note1 - if note1
%td.notes_line %td.notes_line
%span.btn.disabled %span.btn.disabled
%i.icon-comment %i.fa.fa-comment
= notes1.count = notes1.count
%td.notes_content.parallel %td.notes_content.parallel
%ul.notes{ rel: note1.discussion_id } %ul.notes{ rel: note1.discussion_id }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
- if note2 - if note2
%td.notes_line %td.notes_line
%span.btn.disabled %span.btn.disabled
%i.icon-comment %i.fa.fa-comment
= notes2.count = notes2.count
%td.notes_content.parallel %td.notes_content.parallel
%ul.notes{ rel: note2.discussion_id } %ul.notes{ rel: note2.discussion_id }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
.note-form-option .note-form-option
%a.choose-btn.btn.js-choose-note-attachment-button %a.choose-btn.btn.js-choose-note-attachment-button
%i.icon-paper-clip %i.fa.fa-paperclip
%span Choose File ... %span Choose File ...
&nbsp; &nbsp;
%span.file_name.js-attachment-filename File name... %span.file_name.js-attachment-filename File name...
......
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
.note-header .note-header
.note-actions .note-actions
= link_to "##{dom_id(note)}", name: dom_id(note) do = link_to "##{dom_id(note)}", name: dom_id(note) do
%i.icon-link %i.fa.fa-link
Link here Link here
&nbsp; &nbsp;
- if can?(current_user, :admin_note, note) && note.editable? - if can?(current_user, :admin_note, note) && note.editable?
= link_to "#", title: "Edit comment", class: "js-note-edit" do = link_to "#", title: "Edit comment", class: "js-note-edit" do
%i.icon-edit %i.fa.fa-pencil-square-o
Edit Edit
&nbsp; &nbsp;
= 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 = 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 Remove
= link_to_member(@project, note.author, avatar: false) = link_to_member(@project, note.author, avatar: false)
%span.note-last-update %span.note-last-update
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
- if note.upvote? - if note.upvote?
%span.vote.upvote.label.label-success %span.vote.upvote.label.label-success
%i.icon-thumbs-up %i.fa.fa-thumbs-up
\+1 \+1
- if note.downvote? - if note.downvote?
%span.vote.downvote.label.label-danger %span.vote.downvote.label.label-danger
%i.icon-thumbs-down %i.fa.fa-thumbs-down
\-1 \-1
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
.note-form-option .note-form-option
%a.choose-btn.btn.js-choose-note-attachment-button %a.choose-btn.btn.js-choose-note-attachment-button
%i.icon-paper-clip %i.fa.fa-paperclip
%span Choose File ... %span Choose File ...
&nbsp; &nbsp;
%span.file_name.js-attachment-filename File name... %span.file_name.js-attachment-filename File name...
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
= image_tag note.attachment.secure_url, class: 'note-image-attach' = image_tag note.attachment.secure_url, class: 'note-image-attach'
.attachment.pull-right .attachment.pull-right
= link_to note.attachment.secure_url, target: "_blank" do = link_to note.attachment.secure_url, target: "_blank" do
%i.icon-paper-clip %i.fa.fa-paperclip
= note.attachment_identifier = note.attachment_identifier
= link_to delete_attachment_project_note_path(@project, note), = 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 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 .clear
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.discussion-header .discussion-header
.discussion-actions .discussion-actions
= link_to "#", class: "js-toggle-button" do = link_to "#", class: "js-toggle-button" do
%i.icon-chevron-up %i.fa.fa-chevron-up
Show/hide discussion Show/hide discussion
%div %div
= link_to_member(@project, note.author, avatar: false) = link_to_member(@project, note.author, avatar: false)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.discussion-header .discussion-header
.discussion-actions .discussion-actions
= link_to "#", class: "js-toggle-button" do = link_to "#", class: "js-toggle-button" do
%i.icon-chevron-up %i.fa.fa-chevron-up
Show/hide discussion Show/hide discussion
%div %div
= link_to_member(@project, note.author, avatar: false) = link_to_member(@project, note.author, avatar: false)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.discussion-header .discussion-header
.discussion-actions .discussion-actions
= link_to "#", class: "js-toggle-button" do = link_to "#", class: "js-toggle-button" do
%i.icon-chevron-down %i.fa.fa-chevron-down
Show/hide discussion Show/hide discussion
%div %div
= link_to_member(@project, note.author, avatar: false) = link_to_member(@project, note.author, avatar: false)
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
- if @project.root_ref?(branch.name) - if @project.root_ref?(branch.name)
%span.label.label-info default %span.label.label-info default
%span.label.label-success %span.label.label-success
%i.icon-lock %i.fa.fa-lock
.pull-right .pull-right
- if can? current_user, :admin_project, @project - 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" = link_to 'Unprotect', [@project, branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-remove btn-small"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- if split_button == true - if split_button == true
%span.btn-group{class: btn_class} %span.btn-group{class: btn_class}
= link_to archive_project_repository_path(@project, ref: ref, format: 'zip'), class: 'btn', rel: 'nofollow' do = 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 %span Download zip
%a.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' } %a.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' }
%span.caret %span.caret
...@@ -13,25 +13,25 @@ ...@@ -13,25 +13,25 @@
%ul.dropdown-menu{ role: 'menu' } %ul.dropdown-menu{ role: 'menu' }
%li %li
= link_to archive_project_repository_path(@project, ref: ref, format: 'zip'), rel: 'nofollow' do = 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 %span Download zip
%li %li
= link_to archive_project_repository_path(@project, ref: ref, format: 'tar.gz'), rel: 'nofollow' do = 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 %span Download tar.gz
%li %li
= link_to archive_project_repository_path(@project, ref: ref, format: 'tar.bz2'), rel: 'nofollow' do = 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 %span Download tar.bz2
%li %li
= link_to archive_project_repository_path(@project, ref: ref, format: 'tar'), rel: 'nofollow' do = 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 %span Download tar
- else - else
%span.btn-group{class: btn_class} %span.btn-group{class: btn_class}
= link_to archive_project_repository_path(@project, ref: ref, format: 'zip'), class: 'btn', rel: 'nofollow' do = 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 %span zip
= link_to archive_project_repository_path(@project, ref: ref, format: 'tar.gz'), class: 'btn', rel: 'nofollow' do = 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 %span tar.gz
...@@ -29,13 +29,13 @@ ...@@ -29,13 +29,13 @@
- if @project.archived? - if @project.archived?
.alert.alert-warning .alert.alert-warning
%h4 %h4
%i.icon-warning-sign %i.fa.fa-exclamation-triangle
Archived project! Archived project!
%p Repository is read-only %p Repository is read-only
- if @project.forked_from_project - if @project.forked_from_project
.alert.alert-success .alert.alert-success
%i.icon-code-fork.project-fork-icon %i.fa.fa-code-fork.project-fork-icon
Forked from: Forked from:
%br %br
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
%article.readme-holder#README %article.readme-holder#README
= link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)) do = link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)) do
%h4.readme-file-title %h4.readme-file-title
%i.icon-file %i.fa.fa-file
= readme.name = readme.name
.wiki .wiki
= render_readme(readme) = render_readme(readme)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
.file-holder .file-holder
.file-title .file-title
%i.icon-file %i.fa.fa-file
%span.file_name %span.file_name
= @snippet.file_name = @snippet.file_name
.options .options
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
%li %li
%h4 %h4
= link_to project_commits_path(@project, tag.name), class: "" do = link_to project_commits_path(@project, tag.name), class: "" do
%i.icon-tag %i.fa.fa-tag
= tag.name = tag.name
.pull-right .pull-right
- if can? current_user, :download_code, @project - if can? current_user, :download_code, @project
= render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'btn-grouped btn-group-small' = render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'btn-grouped btn-group-small'
- if can?(current_user, :admin_project, @project) - 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 = 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 - if commit
%ul.list-unstyled %ul.list-unstyled
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- if can? current_user, :push_code, @project - if can? current_user, :push_code, @project
.pull-right .pull-right
= link_to new_project_tag_path(@project), class: 'btn btn-create new-tag-btn' do = 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 New tag
%p.light %p.light
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
%button{ type: "button", class: "close", "data-dismiss" => "alert"} &times; %button{ type: "button", class: "close", "data-dismiss" => "alert"} &times;
= @error = @error
%h3.page-title %h3.page-title
%i.icon-code-fork %i.fa.fa-code-fork
New tag New tag
= form_tag project_tags_path, method: :post, class: "form-horizontal" do = form_tag project_tags_path, method: :post, class: "form-horizontal" do
.form-group .form-group
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
group members (#{group_users_count}) group members (#{group_users_count})
.pull-right .pull-right
= link_to members_group_path(@group), class: 'btn btn-small' do = link_to members_group_path(@group), class: 'btn btn-small' do
%i.icon-edit %i.fa.fa-pencil-square-o
%ul.well-list %ul.well-list
- @group.group_members.order('access_level DESC').limit(20).each do |member| - @group.group_members.order('access_level DESC').limit(20).each do |member|
= render 'groups/group_members/group_member', member: member, show_controls: false = render 'groups/group_members/group_member', member: member, show_controls: false
......
...@@ -8,7 +8,7 @@ ...@@ -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" = f.select :access_level, options_for_select(ProjectMember.access_roles, member.access_level), {}, class: "medium project-access-select span2 trigger-submit"
&nbsp; &nbsp;
= 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 = 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" = image_tag avatar_icon(user.email, 32), class: "avatar s32"
%p %p
%strong= user.name %strong= user.name
......
%article.readme-holder#README %article.readme-holder#README
= link_to '#README' do = link_to '#README' do
%h4.readme-file-title %h4.readme-file-title
%i.icon-file %i.fa.fa-file
= readme.name = readme.name
.wiki .wiki
= render_readme(readme) = render_readme(readme)
%span.log_loading.hide %span.log_loading.hide
%i.icon-spinner.icon-spin %i.fa.fa-spinner.fa-spin
Loading commit data... Loading commit data...
- tree, commit = submodule_links(submodule_item) - tree, commit = submodule_links(submodule_item)
%tr{ class: "tree-item" } %tr{ class: "tree-item" }
%td.tree-item-file-name %td.tree-item-file-name
%i.icon-archive %i.fa.fa-archive
%span %span
= link_to truncate(submodule_item.name, length: 40), tree = link_to truncate(submodule_item.name, length: 40), tree
@ @
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
%li %li
= link_to project_new_tree_path(@project, @id), title: 'New file', id: 'new-file-link' do = link_to project_new_tree_path(@project, @id), title: 'New file', id: 'new-file-link' do
%small %small
%i.icon-plus %i.fa.fa-plus
%div#tree-content-holder.tree-content-holder %div#tree-content-holder.tree-content-holder
%table#tree-slider{class: "table_#{@hex_path} tree-table" } %table#tree-slider{class: "table_#{@hex_path} tree-table" }
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
.pull-left Last Commit .pull-left Last Commit
.last-commit.hidden-sm.pull-left .last-commit.hidden-sm.pull-left
&nbsp; &nbsp;
%i.icon-angle-right %i.fa.fa-angle-right
&nbsp; &nbsp;
%small.light %small.light
= link_to @commit.short_id, project_commit_path(@project, @commit) = link_to @commit.short_id, project_commit_path(@project, @commit)
......
= 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? -if @page.errors.any?
#error_explanation #error_explanation
.alert.alert-danger .alert.alert-danger
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
.form-group .form-group
= f.label :content, class: 'control-label' = f.label :content, class: 'control-label'
.col-sm-10 .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 .col-sm-12.hint
.pull-left Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'} .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' }. .pull-right Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }.
......
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
Page History Page History
- if can?(current_user, :write_wiki, @project) - if can?(current_user, :write_wiki, @project)
= link_to edit_project_wiki_path(@project, @page), class: "btn btn-grouped" do = link_to edit_project_wiki_path(@project, @page), class: "btn btn-grouped" do
%i.icon-edit %i.fa.fa-pencil-square-o
Edit Edit
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
= nav_link(path: 'wikis#git_access') do = nav_link(path: 'wikis#git_access') do
= link_to git_access_project_wikis_path(@project) do = link_to git_access_project_wikis_path(@project) do
%i.icon-download-alt %i.fa.fa-arrow-circle-o-down-alt
Git Access Git Access
- if can?(current_user, :write_wiki, @project) - if can?(current_user, :write_wiki, @project)
.pull-right .pull-right
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do = 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 New Page
= render 'projects/wikis/new' = render 'projects/wikis/new'
.dropdown.inline .dropdown.inline
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
%i.icon-tags %i.fa.fa-tags
%span.light Group: %span.light Group:
- if @group.present? - if @group.present?
%strong= @group.name %strong= @group.name
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
.dropdown.inline.prepend-left-10.project-filter .dropdown.inline.prepend-left-10.project-filter
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
%i.icon-tags %i.fa.fa-tags
%span.light Project: %span.light Project:
- if @project.present? - if @project.present?
%strong= @project.name_with_namespace %strong= @project.name_with_namespace
......
%ul.nav.nav-pills.nav-stacked.search-filter %ul.nav.nav-pills.nav-stacked.search-filter
%li{class: ("active" if @scope == 'blobs')} %li{class: ("active" if @scope == 'blobs')}
= link_to search_filter_path(scope: 'blobs') do = link_to search_filter_path(scope: 'blobs') do
%i.icon-code %i.fa.fa-code
Code Code
.pull-right .pull-right
= @search_results.blobs_count = @search_results.blobs_count
%li{class: ("active" if @scope == 'issues')} %li{class: ("active" if @scope == 'issues')}
= link_to search_filter_path(scope: 'issues') do = link_to search_filter_path(scope: 'issues') do
%i.icon-exclamation-sign %i.fa.fa-exclamation-circle
Issues Issues
.pull-right .pull-right
= @search_results.issues_count = @search_results.issues_count
%li{class: ("active" if @scope == 'merge_requests')} %li{class: ("active" if @scope == 'merge_requests')}
= link_to search_filter_path(scope: 'merge_requests') do = link_to search_filter_path(scope: 'merge_requests') do
%i.icon-code-fork %i.fa.fa-code-fork
Merge requests Merge requests
.pull-right .pull-right
= @search_results.merge_requests_count = @search_results.merge_requests_count
%li{class: ("active" if @scope == 'notes')} %li{class: ("active" if @scope == 'notes')}
= link_to search_filter_path(scope: 'notes') do = link_to search_filter_path(scope: 'notes') do
%i.icon-comments %i.fa.fa-comments
Comments Comments
.pull-right .pull-right
= @search_results.notes_count = @search_results.notes_count
......
%ul.nav.nav-pills.nav-stacked.search-filter %ul.nav.nav-pills.nav-stacked.search-filter
%li{class: ("active" if @scope == 'snippet_blobs')} %li{class: ("active" if @scope == 'snippet_blobs')}
= link_to search_filter_path(scope: 'snippet_blobs', snippets: true, group_id: nil, project_id: nil) do = 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 Snippet Contents
.pull-right .pull-right
= @search_results.snippet_blobs_count = @search_results.snippet_blobs_count
%li{class: ("active" if @scope == 'snippet_titles')} %li{class: ("active" if @scope == 'snippet_titles')}
= link_to search_filter_path(scope: 'snippet_titles', snippets: true, group_id: nil, project_id: nil) do = 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 Titles and Filenames
.pull-right .pull-right
= @search_results.snippet_titles_count = @search_results.snippet_titles_count
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.file-holder .file-holder
.file-title .file-title
= link_to project_blob_path(@project, tree_join(blob.ref, blob.filename), :anchor => "L" + blob.startline.to_s) do = 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 %strong
= blob.filename = blob.filename
.file-content.code.term .file-content.code.term
......
.search_box .search_box
.search_glyph .search_glyph
%span.icon-search %span.fa.fa-search
%h4 #{message} %h4 #{message}
- project = note.project - project = note.project
.search-result-row .search-result-row
%h5.note-search-caption.str-truncated %h5.note-search-caption.str-truncated
%i.icon-comment %i.fa.fa-comment
= link_to_member(project, note.author, avatar: false) = link_to_member(project, note.author, avatar: false)
commented on commented on
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
= link_to snippet_path do = link_to snippet_path do
.file-holder .file-holder
.file-title .file-title
%i.icon-file %i.fa.fa-file
%strong= snippet_blob[:snippet_object].file_name %strong= snippet_blob[:snippet_object].file_name
%span.options %span.options
.btn-group.tree-btn-group.pull-right .btn-group.tree-btn-group.pull-right
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
- offset = defined?(snippet[:start_line]) ? snippet[:start_line] : 1 - offset = defined?(snippet[:start_line]) ? snippet[:start_line] : 1
- i = index + offset - i = index + offset
= link_to snippet_path+"#L#{i}", id: "L#{i}", rel: "#L#{i}" do = link_to snippet_path+"#L#{i}", id: "L#{i}", rel: "#L#{i}" do
%i.icon-link %i.fa.fa-link
= i = i
- unless snippet == snippet_blob[:snippet_chunks].last - unless snippet == snippet_blob[:snippet_chunks].last
%a %a
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= truncate(snippet_title.title, length: 60) = truncate(snippet_title.title, length: 60)
- if snippet_title.private? - if snippet_title.private?
%span.label.label-gray %span.label.label-gray
%i.icon-lock %i.fa.fa-lock
private private
%span.cgray.monospace.tiny.pull-right.term %span.cgray.monospace.tiny.pull-right.term
= snippet_title.file_name = snippet_title.file_name
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.file-holder .file-holder
.file-title .file-title
= link_to project_wiki_path(@project, wiki_blob.filename) do = link_to project_wiki_path(@project, wiki_blob.filename) do
%i.icon-file %i.fa.fa-file
%strong %strong
= wiki_blob.filename = wiki_blob.filename
.file-content.code.term .file-content.code.term
......
.commit-message-container .form-group.commit_message-group
= label_tag 'commit_message', class: 'control-label' do
Commit message
.col-sm-10
.commit-message-container
.max-width-marker .max-width-marker
= textarea = 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.
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- offset = defined?(first_line_number) ? first_line_number : 1 - offset = defined?(first_line_number) ? first_line_number : 1
- i = index + offset - i = index + offset
= link_to "#L#{i}", id: "L#{i}", rel: "#L#{i}" do = link_to "#L#{i}", id: "L#{i}", rel: "#L#{i}" do
%i.icon-link %i.fa.fa-link
= i = i
.highlight .highlight
%pre %pre
......
...@@ -45,6 +45,6 @@ ...@@ -45,6 +45,6 @@
%fieldset %fieldset
- if params[:state].present? || params[:project_id].present? - if params[:state].present? || params[:project_id].present?
= link_to filter_path(entity, state: nil, project_id: nil), class: 'pull-right cgray' do = 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 %strong Clear filter
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
Labels Labels
%small.pull-right %small.pull-right
= link_to project_labels_path(@project), class: 'light' do = 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 %ul.nav.nav-pills.nav-stacked.nav-small.labels-filter
- @project.labels.order_by_name.each do |label| - @project.labels.order_by_name.each do |label|
%li{class: label_filter_class(label.name)} %li{class: label_filter_class(label.name)}
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
= render_colored_label(label) = render_colored_label(label)
- if selected_label?(label.name) - if selected_label?(label.name)
.pull-right .pull-right
%i.icon-remove %i.fa.fa-times
- if @project.labels.empty? - if @project.labels.empty?
.light-well .light-well
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
%fieldset %fieldset
- if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any? - 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 = link_to project_entities_path, class: 'cgray pull-right' do
%i.icon-remove %i.fa.fa-times
%strong Clear filter %strong Clear filter
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= truncate(snippet.title, length: 60) = truncate(snippet.title, length: 60)
- if snippet.private? - if snippet.private?
%span.label.label-gray %span.label.label-gray
%i.icon-lock %i.fa.fa-lock
private private
%span.cgray.monospace.tiny.pull-right %span.cgray.monospace.tiny.pull-right
= snippet.file_name = snippet.file_name
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- if @snippet.private? - if @snippet.private?
%span.label.label-success %span.label.label-success
%i.icon-lock %i.fa.fa-lock
private private
.pull-right .pull-right
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
.file-holder .file-holder
.file-title .file-title
%i.icon-file %i.fa.fa-file
%span.file_name %span.file_name
= @snippet.file_name = @snippet.file_name
.options .options
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- if @user == current_user - if @user == current_user
.pull-right .pull-right
= link_to profile_path, class: 'btn' do = link_to profile_path, class: 'btn' do
%i.icon-edit %i.fa.fa-pencil-square-o
Edit Profile settings Edit Profile settings
%br %br
%span.user-show-username #{@user.username} %span.user-show-username #{@user.username}
......
...@@ -190,7 +190,7 @@ Gitlab::Application.routes.draw do ...@@ -190,7 +190,7 @@ Gitlab::Application.routes.draw do
post 'unsubscribes/:email', to: 'unsubscribes#create' post 'unsubscribes/:email', to: 'unsubscribes#create'
resources :projects, constraints: { id: /[^\/]+/ }, only: [:new, :create] 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 devise_scope :user do
get "/users/auth/:provider/omniauth_error" => "omniauth_callbacks#omniauth_error", as: :omniauth_error get "/users/auth/:provider/omniauth_error" => "omniauth_callbacks#omniauth_error", as: :omniauth_error
......
...@@ -447,6 +447,7 @@ Parameters: ...@@ -447,6 +447,7 @@ Parameters:
- `push_events` - Trigger hook on push events - `push_events` - Trigger hook on push events
- `issues_events` - Trigger hook on issues events - `issues_events` - Trigger hook on issues events
- `merge_requests_events` - Trigger hook on merge_requests events - `merge_requests_events` - Trigger hook on merge_requests events
- `tag_push_events` - Trigger hook on push_tag events
### Edit project hook ### Edit project hook
...@@ -464,6 +465,7 @@ Parameters: ...@@ -464,6 +465,7 @@ Parameters:
- `push_events` - Trigger hook on push events - `push_events` - Trigger hook on push events
- `issues_events` - Trigger hook on issues events - `issues_events` - Trigger hook on issues events
- `merge_requests_events` - Trigger hook on merge_requests events - `merge_requests_events` - Trigger hook on merge_requests events
- `tag_push_events` - Trigger hook on push_tag events
### Delete project hook ### Delete project hook
......
...@@ -22,6 +22,12 @@ FileUtils.mkdir_p "tmp/special/directory" ...@@ -22,6 +22,12 @@ FileUtils.mkdir_p "tmp/special/directory"
contents = `cat #{filename}` contents = `cat #{filename}`
# Correct # Correct
contents = File.read(filename) 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. This coding style could have prevented CVE-2013-4490.
......
- [The individual version update guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update) Depending on the installation method and your GitLab version, there are multiple update guides. Choose one that fits your needs.
## CE to EE
- [The CE to EE update guides (subscribers only)](https://gitlab.com/subscribers/gitlab-ee/tree/master/doc/update) 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. - [The CE to EE update guides (subscribers only)](https://gitlab.com/subscribers/gitlab-ee/tree/master/doc/update) 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) automatic script to perform the update
- [Patch versions](patch_versions.md) ## Omnibus Packages
- [MySQL to PostgreSQL](mysql_to_postgresql.md)
- [Omnibus update guide](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md) - [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.
...@@ -109,7 +109,31 @@ Triggered when a new merge request is created or an existing merge request was u ...@@ -109,7 +109,31 @@ Triggered when a new merge request is created or an existing merge request was u
"merge_status": "unchecked", "merge_status": "unchecked",
"target_project_id": 14, "target_project_id": 14,
"iid": 1, "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)"
}
}
} }
} }
``` ```
......
...@@ -26,7 +26,7 @@ After getting used to these three steps the branching model becomes the challeng ...@@ -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. 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. 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. 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. We think there is still room for improvement and will detail a set of practices we call GitLab flow.
# Git flow and its problems # Git flow and its problems
...@@ -54,7 +54,7 @@ And doing releases doesn't automatically mean also doing hotfixes. ...@@ -54,7 +54,7 @@ And doing releases doesn't automatically mean also doing hotfixes.
![Master branch with feature branches merged in](github_flow.png) ![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 flow has only feature branches and a master branch.
This is very simple and clean, many organizations have adopted it with great success. 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. Atlassian recommends [a similar strategy](http://blogs.atlassian.com/2014/01/simple-git-workflow-simple/) although they rebase feature branches.
......
...@@ -16,6 +16,12 @@ Feature: Admin Users ...@@ -16,6 +16,12 @@ Feature: Admin Users
Then See username error message Then See username error message
And Not changed form action url 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 Scenario: Edit my user attributes
Given I visit admin users page Given I visit admin users page
And click edit on my user And click edit on my user
......
...@@ -11,18 +11,20 @@ Feature: Project Forked Merge Requests ...@@ -11,18 +11,20 @@ Feature: Project Forked Merge Requests
And I submit the merge request And I submit the merge request
Then I should see merge request "Merge Request On Forked Project" Then I should see merge request "Merge Request On Forked Project"
@javascript # TODO: Improve it so it does not fail randomly
Scenario: I can edit a forked merge request #
Given I visit project "Forked Shop" merge requests page #@javascript
And I click link "New Merge Request" #Scenario: I can edit a forked merge request
And I fill out a "Merge Request On Forked Project" merge request #Given I visit project "Forked Shop" merge requests page
And I submit the merge request #And I click link "New Merge Request"
And I should see merge request "Merge Request On Forked Project" #And I fill out a "Merge Request On Forked Project" merge request
And I click link edit "Merge Request On Forked Project" #And I submit the merge request
Then I see the edit page prefilled for "Merge Request On Forked Project" #And I should see merge request "Merge Request On Forked Project"
And I update the merge request title #And I click link edit "Merge Request On Forked Project"
And I save the merge request #Then I see the edit page prefilled for "Merge Request On Forked Project"
Then I should see the edited merge request #And I update the merge request title
#And I save the merge request
#Then I should see the edited merge request
@javascript @javascript
Scenario: I cannot submit an invalid merge request Scenario: I cannot submit an invalid merge request
......
...@@ -63,4 +63,23 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps ...@@ -63,4 +63,23 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
step 'I should not see secondary email anymore' do step 'I should not see secondary email anymore' do
page.should_not have_content "Secondary email:" page.should_not have_content "Secondary email:"
end 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 end
...@@ -212,7 +212,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps ...@@ -212,7 +212,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
protected protected
def assigned_to_me key def assigned_to_me(key)
project.send(key).where(assignee_id: current_user.id) project.send(key).where(assignee_id: current_user.id)
end end
......
...@@ -7,22 +7,22 @@ class Spinach::Features::ProfileGroup < Spinach::FeatureSteps ...@@ -7,22 +7,22 @@ class Spinach::Features::ProfileGroup < Spinach::FeatureSteps
# Leave # Leave
step 'I click on the "Leave" button for group "Owned"' do 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. # poltergeist always confirms popups.
end end
step 'I click on the "Leave" button for group "Guest"' do 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. # poltergeist always confirms popups.
end end
step 'I should not see the "Leave" button for group "Owned"' do 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. # poltergeist always confirms popups.
end end
step 'I should not see the "Leave" button for groupr "Guest"' do 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. # poltergeist always confirms popups.
end end
......
...@@ -232,8 +232,5 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps ...@@ -232,8 +232,5 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
def filter_issue(text) def filter_issue(text)
fill_in 'issue_search', with: 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 end
end end
...@@ -154,7 +154,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -154,7 +154,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I modify merge commit message' do step 'I modify merge commit message' do
find('.modify-merge-commit-link').click find('.modify-merge-commit-link').click
fill_in 'merge_commit_message', with: "wow such merge" fill_in 'commit_message', with: 'wow such merge'
end end
step 'merge request "Bug NS-05" is mergeable' do step 'merge request "Bug NS-05" is mergeable' do
......
...@@ -426,7 +426,7 @@ module SharedPaths ...@@ -426,7 +426,7 @@ module SharedPaths
end end
def project def project
project = Project.find_by!(name: "Shop") Project.find_by!(name: 'Shop')
end end
# ---------------------------------------- # ----------------------------------------
......
...@@ -30,7 +30,8 @@ module API ...@@ -30,7 +30,8 @@ module API
end end
class ProjectHook < Hook 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 end
class ForkedFromProject < Grape::Entity class ForkedFromProject < Grape::Entity
......
...@@ -71,7 +71,7 @@ module API ...@@ -71,7 +71,7 @@ module API
forbidden! unless current_user.is_admin? forbidden! unless current_user.is_admin?
end end
def authorize! action, subject def authorize!(action, subject)
unless abilities.allowed?(current_user, action, subject) unless abilities.allowed?(current_user, action, subject)
forbidden! forbidden!
end end
......
...@@ -38,7 +38,13 @@ module API ...@@ -38,7 +38,13 @@ module API
# POST /projects/:id/hooks # POST /projects/:id/hooks
post ":id/hooks" do post ":id/hooks" do
required_attributes! [:url] 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) @hook = user_project.hooks.new(attrs)
if @hook.save if @hook.save
...@@ -62,7 +68,13 @@ module API ...@@ -62,7 +68,13 @@ module API
put ":id/hooks/:hook_id" do put ":id/hooks/:hook_id" do
@hook = user_project.hooks.find(params[:hook_id]) @hook = user_project.hooks.find(params[:hook_id])
required_attributes! [:url] 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 if @hook.update_attributes attrs
present @hook, with: Entities::ProjectHook present @hook, with: Entities::ProjectHook
......
...@@ -23,7 +23,7 @@ class EventFilter ...@@ -23,7 +23,7 @@ class EventFilter
end end
end end
def initialize params def initialize(params)
@params = if params @params = if params
params.dup params.dup
else else
...@@ -31,7 +31,7 @@ class EventFilter ...@@ -31,7 +31,7 @@ class EventFilter
end end
end end
def apply_filter events def apply_filter(events)
return events unless params.present? return events unless params.present?
filter = params.dup filter = params.dup
...@@ -50,7 +50,7 @@ class EventFilter ...@@ -50,7 +50,7 @@ class EventFilter
events = events.where(action: actions) events = events.where(action: actions)
end end
def options key def options(key)
filter = params.dup filter = params.dup
if filter.include? key if filter.include? key
...@@ -62,7 +62,7 @@ class EventFilter ...@@ -62,7 +62,7 @@ class EventFilter
filter filter
end end
def active? key def active?(key)
params.include? key params.include? key
end end
end end
...@@ -213,7 +213,7 @@ module Gitlab ...@@ -213,7 +213,7 @@ module Gitlab
FileUtils.rm_r(satellites_path, force: true) FileUtils.rm_r(satellites_path, force: true)
end end
def url_to_repo path def url_to_repo(path)
Gitlab.config.gitlab_shell.ssh_path_prefix + "#{path}.git" Gitlab.config.gitlab_shell.ssh_path_prefix + "#{path}.git"
end end
......
...@@ -72,7 +72,7 @@ module Gitlab ...@@ -72,7 +72,7 @@ module Gitlab
end end
end end
def html_escape str def html_escape(str)
replacements = { '&' => '&amp;', '>' => '&gt;', '<' => '&lt;', '"' => '&quot;', "'" => '&#39;' } replacements = { '&' => '&amp;', '>' => '&gt;', '<' => '&lt;', '"' => '&quot;', "'" => '&#39;' }
str.gsub(/[&"'><]/, replacements) str.gsub(/[&"'><]/, replacements)
end end
......
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
START = "#!idiff-start!#" START = "#!idiff-start!#"
FINISH = "#!idiff-finish!#" FINISH = "#!idiff-finish!#"
def processing diff_arr def processing(diff_arr)
indexes = _indexes_of_changed_lines diff_arr indexes = _indexes_of_changed_lines diff_arr
indexes.each do |index| indexes.each do |index|
...@@ -52,7 +52,7 @@ module Gitlab ...@@ -52,7 +52,7 @@ module Gitlab
diff_arr diff_arr
end end
def _indexes_of_changed_lines diff_arr def _indexes_of_changed_lines(diff_arr)
chain_of_first_symbols = "" chain_of_first_symbols = ""
diff_arr.each_with_index do |line, i| diff_arr.each_with_index do |line, i|
chain_of_first_symbols += line[0] chain_of_first_symbols += line[0]
...@@ -68,7 +68,7 @@ module Gitlab ...@@ -68,7 +68,7 @@ module Gitlab
indexes indexes
end end
def replace_markers line def replace_markers(line)
line.gsub!(START, "<span class='idiff'>") line.gsub!(START, "<span class='idiff'>")
line.gsub!(FINISH, "</span>") line.gsub!(FINISH, "</span>")
line line
......
...@@ -15,7 +15,7 @@ module Gitlab ...@@ -15,7 +15,7 @@ module Gitlab
tail_output.split("\n") tail_output.split("\n")
end end
def self.read_latest_for filename def self.read_latest_for(filename)
path = Rails.root.join("log", filename) path = Rails.root.join("log", filename)
tail_output, _ = Gitlab::Popen.popen(%W(tail -n 2000 #{path})) tail_output, _ = Gitlab::Popen.popen(%W(tail -n 2000 #{path}))
tail_output.split("\n") tail_output.split("\n")
......
...@@ -9,20 +9,20 @@ module Gitlab ...@@ -9,20 +9,20 @@ module Gitlab
@users, @issues, @merge_requests, @snippets, @commits = [], [], [], [], [] @users, @issues, @merge_requests, @snippets, @commits = [], [], [], [], []
end end
def analyze string def analyze(string)
parse_references(string.dup) parse_references(string.dup)
end end
# Given a valid project, resolve the extracted identifiers of the requested type to # Given a valid project, resolve the extracted identifiers of the requested type to
# model objects. # model objects.
def users_for project def users_for(project)
users.map do |identifier| users.map do |identifier|
project.users.where(username: identifier).first project.users.where(username: identifier).first
end.reject(&:nil?) end.reject(&:nil?)
end end
def issues_for project def issues_for(project)
if project.jira_tracker? if project.jira_tracker?
issues.uniq.map do |jira_identifier| issues.uniq.map do |jira_identifier|
JiraIssue.new(jira_identifier) JiraIssue.new(jira_identifier)
...@@ -34,19 +34,19 @@ module Gitlab ...@@ -34,19 +34,19 @@ module Gitlab
end end
end end
def merge_requests_for project def merge_requests_for(project)
merge_requests.map do |identifier| merge_requests.map do |identifier|
project.merge_requests.where(iid: identifier).first project.merge_requests.where(iid: identifier).first
end.reject(&:nil?) end.reject(&:nil?)
end end
def snippets_for project def snippets_for(project)
snippets.map do |identifier| snippets.map do |identifier|
project.snippets.where(id: identifier).first project.snippets.where(id: identifier).first
end.reject(&:nil?) end.reject(&:nil?)
end end
def commits_for project def commits_for(project)
repo = project.repository repo = project.repository
return [] if repo.nil? return [] if repo.nil?
......
...@@ -11,7 +11,7 @@ module Gitlab ...@@ -11,7 +11,7 @@ module Gitlab
@project = project @project = project
end end
def log message def log(message)
Gitlab::Satellite::Logger.error(message) Gitlab::Satellite::Logger.error(message)
end end
......
...@@ -72,6 +72,8 @@ server { ...@@ -72,6 +72,8 @@ server {
ssl_prefer_server_ciphers on; 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 Strict-Transport-Security max-age=63072000;
add_header X-Frame-Options SAMEORIGIN; add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff; add_header X-Content-Type-Options nosniff;
......
...@@ -47,16 +47,6 @@ FactoryGirl.define do ...@@ -47,16 +47,6 @@ FactoryGirl.define do
end end
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 factory :project, parent: :empty_project do
path { 'gitlabhq' } path { 'gitlabhq' }
......
...@@ -8,7 +8,7 @@ describe NotificationsHelper do ...@@ -8,7 +8,7 @@ describe NotificationsHelper do
before { notification.stub(disabled?: true) } before { notification.stub(disabled?: true) }
it "has a red icon" do 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
end end
...@@ -16,7 +16,7 @@ describe NotificationsHelper do ...@@ -16,7 +16,7 @@ describe NotificationsHelper do
before { notification.stub(participating?: true) } before { notification.stub(participating?: true) }
it "has a blue icon" do 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
end end
...@@ -24,12 +24,12 @@ describe NotificationsHelper do ...@@ -24,12 +24,12 @@ describe NotificationsHelper do
before { notification.stub(watch?: true) } before { notification.stub(watch?: true) }
it "has a green icon" do 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
end end
it "has a blue icon" do 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 end
end end
...@@ -97,7 +97,7 @@ describe 'Gitlab::Satellite::Action' do ...@@ -97,7 +97,7 @@ describe 'Gitlab::Satellite::Action' do
end end
class FileLockStatusChecker < File class FileLockStatusChecker < File
def flocked? &block def flocked?(&block)
status = flock LOCK_EX|LOCK_NB status = flock LOCK_EX|LOCK_NB
case status case status
when false when false
......
...@@ -21,6 +21,6 @@ module LoginHelpers ...@@ -21,6 +21,6 @@ module LoginHelpers
# Requires Javascript driver. # Requires Javascript driver.
def logout def logout
find(:css, ".icon-signout").click find(:css, ".fa.fa-sign-out").click
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment