summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-30 19:36:45 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-30 19:36:45 +0300
commit32d7841b2c15cc795382c2319a041a1102a21e46 (patch)
tree62433847a56d4d56c891fcaefccaf1ecced88bc3
parent86b752e0cfe8c61cc7cc88abc8a129c5229d356c (diff)
parent39a55bdf1a1613f362bcd7da444b291210454160 (diff)
downloadgitlab-ce-32d7841b2c15cc795382c2319a041a1102a21e46.tar.gz
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: app/views/layouts/_head_panel.html.haml
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/stylesheets/base/gl_bootstrap.scss6
-rw-r--r--app/assets/stylesheets/generic/common.scss11
-rw-r--r--app/controllers/search_controller.rb9
-rw-r--r--app/helpers/gitlab_markdown_helper.rb3
-rw-r--r--app/views/admin/application_settings/_form.html.haml4
-rw-r--r--app/views/admin/services/_form.html.haml74
-rw-r--r--app/views/layouts/search.html.haml6
-rw-r--r--app/views/projects/services/_form.html.haml75
-rw-r--r--app/views/search/_category.html.haml77
-rw-r--r--app/views/search/_filter.html.haml4
-rw-r--r--app/views/search/_form.html.haml12
-rw-r--r--app/views/search/_global_filter.html.haml16
-rw-r--r--app/views/search/_project_filter.html.haml32
-rw-r--r--app/views/search/_results.html.haml39
-rw-r--r--app/views/search/_snippet_filter.html.haml13
-rw-r--r--app/views/search/results/_empty.html.haml6
-rw-r--r--app/views/search/show.html.haml28
-rw-r--r--app/views/shared/_service_settings.html.haml75
-rw-r--r--db/schema.rb28
-rw-r--r--doc/customization/issue_closing.md4
-rw-r--r--features/steps/project/source/search_code.rb2
22 files changed, 243 insertions, 282 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 909f9972712..ecffcb5262c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -29,6 +29,7 @@ v 7.11.0 (unreleased)
- Improve UI for mobile phones on dashboard and project pages
- Add room notification and message color option for HipChat
- Allow to use non-ASCII letters and dashes in project and namespace name. (Jakub Jirutka)
+ - Add footnotes support to Markdown (Guillaume Delbergue)
v 7.10.0
- Ignore submodules that are defined in .gitmodules but are checked in as directories.
diff --git a/app/assets/stylesheets/base/gl_bootstrap.scss b/app/assets/stylesheets/base/gl_bootstrap.scss
index 427f333423c..21acbfa5e5a 100644
--- a/app/assets/stylesheets/base/gl_bootstrap.scss
+++ b/app/assets/stylesheets/base/gl_bootstrap.scss
@@ -137,6 +137,12 @@
color: #666;
}
+.nav-pills > .active > a > span > .badge {
+ background-color: #fff;
+ color: $gl-primary;
+}
+
+
/**
* fix to keep tooltips position in top navigation bar
*
diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss
index 7c3021989a8..1e569978cc8 100644
--- a/app/assets/stylesheets/generic/common.scss
+++ b/app/assets/stylesheets/generic/common.scss
@@ -333,17 +333,8 @@ table {
}
.search_box {
- position: relative;
- padding: 30px;
+ @extend .well;
text-align: center;
- background-color: #F9F9F9;
- border: 1px solid #DDDDDD;
- border-radius: 0px;
-}
-
-.search_glyph {
- color: #555;
- font-size: 42px;
}
.task-status {
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index c5828d0b2df..ad9e9e8487e 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -4,20 +4,22 @@ class SearchController < ApplicationController
def show
return if params[:search].nil? || params[:search].blank?
+ @search_term = params[:search]
+
if params[:project_id].present?
@project = Project.find_by(id: params[:project_id])
@project = nil unless can?(current_user, :download_code, @project)
end
if params[:group_id].present?
- @group = Group.find_by(id: params[:group_id])
+ @group = Group.find_by(id: params[:group_id])
@group = nil unless can?(current_user, :read_group, @group)
end
-
+
@scope = params[:scope]
@show_snippets = params[:snippets].eql? 'true'
- @search_results =
+ @search_results =
if @project
unless %w(blobs notes issues merge_requests wiki_blobs).
include?(@scope)
@@ -37,6 +39,7 @@ class SearchController < ApplicationController
end
Search::GlobalService.new(current_user, params).execute
end
+
@objects = @search_results.objects(@scope, params[:page])
end
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb
index aff7011edd0..bc234500000 100644
--- a/app/helpers/gitlab_markdown_helper.rb
+++ b/app/helpers/gitlab_markdown_helper.rb
@@ -49,7 +49,8 @@ module GitlabMarkdownHelper
strikethrough: true,
lax_spacing: true,
space_after_headers: true,
- superscript: true
+ superscript: true,
+ footnotes: true
)
end
diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml
index 98d3e00153d..87e7c9634e9 100644
--- a/app/views/admin/application_settings/_form.html.haml
+++ b/app/views/admin/application_settings/_form.html.haml
@@ -42,11 +42,11 @@
= f.label :default_branch_protection, class: 'control-label col-sm-2'
.col-sm-10
= f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control'
- .form-group
+ .form-group.project-visibility-level-holder
= f.label :default_project_visibility, class: 'control-label col-sm-2'
.col-sm-10
= render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: 'Project')
- .form-group
+ .form-group.project-visibility-level-holder
= f.label :default_snippet_visibility, class: 'control-label col-sm-2'
.col-sm-10
= render('shared/visibility_radios', model_method: :default_snippet_visibility, form: f, selected_level: @application_setting.default_snippet_visibility, form_model: 'Snippet')
diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml
index 34ca7776c9e..cdbfc60f9a4 100644
--- a/app/views/admin/services/_form.html.haml
+++ b/app/views/admin/services/_form.html.haml
@@ -4,79 +4,7 @@
%p #{@service.description} template
= form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'form-horizontal fieldset-form' } do |form|
- - if @service.errors.any?
- #error_explanation
- .alert.alert-danger
- - @service.errors.full_messages.each do |msg|
- %p= msg
- - if @service.help.present?
- .well
- = preserve do
- = markdown @service.help
-
- .form-group
- = form.label :active, "Active", class: "control-label"
- .col-sm-10
- = form.check_box :active
-
- - if @service.supported_events.length > 1
- .form-group
- = form.label :url, "Trigger", class: 'control-label'
- .col-sm-10
- - if @service.supported_events.include?("push")
- %div
- = form.check_box :push_events, class: 'pull-left'
- .prepend-left-20
- = form.label :push_events, class: 'list-label' do
- %strong Push events
- %p.light
- This url will be triggered by a push to the repository
- - if @service.supported_events.include?("tag_push")
- %div
- = form.check_box :tag_push_events, class: 'pull-left'
- .prepend-left-20
- = form.label :tag_push_events, class: 'list-label' do
- %strong Tag push events
- %p.light
- This url will be triggered when a new tag is pushed to the repository
- - if @service.supported_events.include?("note")
- %div
- = form.check_box :note_events, class: 'pull-left'
- .prepend-left-20
- = form.label :note_events, class: 'list-label' do
- %strong Comments
- %p.light
- This url will be triggered when someone adds a comment
- - if @service.supported_events.include?("issue")
- %div
- = form.check_box :issues_events, class: 'pull-left'
- .prepend-left-20
- = form.label :issues_events, class: 'list-label' do
- %strong Issues events
- %p.light
- This url will be triggered when an issue is created
- - if @service.supported_events.include?("merge_request")
- %div
- = form.check_box :merge_requests_events, class: 'pull-left'
- .prepend-left-20
- = form.label :merge_requests_events, class: 'list-label' do
- %strong Merge Request events
- %p.light
- This url will be triggered when a merge request is created
-
- - @service.fields.each do |field|
- - type = field[:type]
-
- - if type == 'fieldset'
- - fields = field[:fields]
- - legend = field[:legend]
-
- %fieldset
- %legend= legend
- - fields.each do |subfield|
- = render 'shared/field', form: form, field: subfield
- - else
- = render 'shared/field', form: form, field: field
+ = render 'shared/service_settings', form: form
.form-actions
= form.submit 'Save', class: 'btn btn-save'
diff --git a/app/views/layouts/search.html.haml b/app/views/layouts/search.html.haml
index f9d8db06e10..4b526686be4 100644
--- a/app/views/layouts/search.html.haml
+++ b/app/views/layouts/search.html.haml
@@ -2,9 +2,5 @@
%html{ lang: "en"}
= render "layouts/head", title: "Search"
%body{class: "#{app_theme} application", :'data-page' => body_data_page}
- = render "layouts/broadcast"
= render "layouts/head_panel", title: link_to("Search", search_path)
- .container.navless-container
- .content
- = render "layouts/flash"
- = yield
+ = render 'layouts/page'
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml
index 1b465e3addd..e1823b51198 100644
--- a/app/views/projects/services/_form.html.haml
+++ b/app/views/projects/services/_form.html.haml
@@ -11,80 +11,7 @@
%hr
= form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |form|
- - if @service.errors.any?
- .alert.alert-danger
- %ul
- - @service.errors.full_messages.each do |msg|
- %li= msg
-
- - if @service.help.present?
- .well
- = preserve do
- = markdown @service.help
-
- .form-group
- = form.label :active, "Active", class: "control-label"
- .col-sm-10
- = form.check_box :active
-
- - if @service.supported_events.length > 1
- .form-group
- = form.label :url, "Trigger", class: 'control-label'
- .col-sm-10
- - if @service.supported_events.include?("push")
- %div
- = form.check_box :push_events, class: 'pull-left'
- .prepend-left-20
- = form.label :push_events, class: 'list-label' do
- %strong Push events
- %p.light
- This url will be triggered by a push to the repository
- - if @service.supported_events.include?("tag_push")
- %div
- = form.check_box :tag_push_events, class: 'pull-left'
- .prepend-left-20
- = form.label :tag_push_events, class: 'list-label' do
- %strong Tag push events
- %p.light
- This url will be triggered when a new tag is pushed to the repository
- - if @service.supported_events.include?("note")
- %div
- = form.check_box :note_events, class: 'pull-left'
- .prepend-left-20
- = form.label :note_events, class: 'list-label' do
- %strong Comments
- %p.light
- This url will be triggered when someone adds a comment
- - if @service.supported_events.include?("issue")
- %div
- = form.check_box :issues_events, class: 'pull-left'
- .prepend-left-20
- = form.label :issues_events, class: 'list-label' do
- %strong Issues events
- %p.light
- This url will be triggered when an issue is created
- - if @service.supported_events.include?("merge_request")
- %div
- = form.check_box :merge_requests_events, class: 'pull-left'
- .prepend-left-20
- = form.label :merge_requests_events, class: 'list-label' do
- %strong Merge Request events
- %p.light
- This url will be triggered when a merge request is created
-
- - @service.fields.each do |field|
- - type = field[:type]
-
- - if type == 'fieldset'
- - fields = field[:fields]
- - legend = field[:legend]
-
- %fieldset
- %legend= legend
- - fields.each do |subfield|
- = render 'shared/field', form: form, field: subfield
- - else
- = render 'shared/field', form: form, field: field
+ = render 'shared/service_settings', form: form
.form-actions
= form.submit 'Save', class: 'btn btn-save'
diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml
new file mode 100644
index 00000000000..154332cb9a9
--- /dev/null
+++ b/app/views/search/_category.html.haml
@@ -0,0 +1,77 @@
+%ul.nav.nav-pills.search-filter
+ - if @project
+ %li{class: ("active" if @scope == 'blobs')}
+ = link_to search_filter_path(scope: 'blobs') do
+ = icon('code fw')
+ %span
+ Code
+ %span.badge
+ = @search_results.blobs_count
+ %li{class: ("active" if @scope == 'issues')}
+ = link_to search_filter_path(scope: 'issues') do
+ = icon('exclamation-circle fw')
+ %span
+ Issues
+ %span.badge
+ = @search_results.issues_count
+ %li{class: ("active" if @scope == 'merge_requests')}
+ = link_to search_filter_path(scope: 'merge_requests') do
+ = icon('tasks fw')
+ %span
+ Merge requests
+ %span.badge
+ = @search_results.merge_requests_count
+ %li{class: ("active" if @scope == 'notes')}
+ = link_to search_filter_path(scope: 'notes') do
+ = icon('comments fw')
+ %span
+ Comments
+ %span.badge
+ = @search_results.notes_count
+ %li{class: ("active" if @scope == 'wiki_blobs')}
+ = link_to search_filter_path(scope: 'wiki_blobs') do
+ = icon('book fw')
+ %span
+ Wiki
+ %span.badge
+ = @search_results.wiki_blobs_count
+
+ - elsif @show_snippets
+ %li{class: ("active" if @scope == 'snippet_blobs')}
+ = link_to search_filter_path(scope: 'snippet_blobs', snippets: true, group_id: nil, project_id: nil) do
+ = icon('code fw')
+ %span
+ Snippet Contents
+ %span.badge
+ = @search_results.snippet_blobs_count
+ %li{class: ("active" if @scope == 'snippet_titles')}
+ = link_to search_filter_path(scope: 'snippet_titles', snippets: true, group_id: nil, project_id: nil) do
+ = icon('book fw')
+ %span
+ Titles and Filenames
+ %span.badge
+ = @search_results.snippet_titles_count
+
+ - else
+ %li{class: ("active" if @scope == 'projects')}
+ = link_to search_filter_path(scope: 'projects') do
+ = icon('bookmark fw')
+ %span
+ Projects
+ %span.badge
+ = @search_results.projects_count
+ %li{class: ("active" if @scope == 'issues')}
+ = link_to search_filter_path(scope: 'issues') do
+ = icon('exclamation-circle fw')
+ %span
+ Issues
+ %span.badge
+ = @search_results.issues_count
+ %li{class: ("active" if @scope == 'merge_requests')}
+ = link_to search_filter_path(scope: 'merge_requests') do
+ = icon('tasks fw')
+ %span
+ Merge requests
+ %span.badge
+ = @search_results.merge_requests_count
+
diff --git a/app/views/search/_filter.html.haml b/app/views/search/_filter.html.haml
index ffc145497ab..e2d0cab9e79 100644
--- a/app/views/search/_filter.html.haml
+++ b/app/views/search/_filter.html.haml
@@ -1,5 +1,5 @@
.dropdown.inline
- %button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'}
+ %button.dropdown-toggle.btn.btn{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-tags
%span.light Group:
- if @group.present?
@@ -17,7 +17,7 @@
= group.name
.dropdown.inline.prepend-left-10.project-filter
- %button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'}
+ %button.dropdown-toggle.btn.btn{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-tags
%span.light Project:
- if @project.present?
diff --git a/app/views/search/_form.html.haml b/app/views/search/_form.html.haml
new file mode 100644
index 00000000000..47016daf1f0
--- /dev/null
+++ b/app/views/search/_form.html.haml
@@ -0,0 +1,12 @@
+= form_tag search_path, method: :get, class: 'form-inline' do |f|
+ = hidden_field_tag :project_id, params[:project_id]
+ = hidden_field_tag :group_id, params[:group_id]
+ = hidden_field_tag :snippets, params[:snippets]
+ = hidden_field_tag :scope, params[:scope]
+ .search-holder.clearfix
+ .form-group
+ = search_field_tag :search, params[:search], placeholder: "Search for projects, issues etc", class: "form-control search-text-input input-mn-300", id: "dashboard_search", autofocus: true
+ = button_tag 'Search', class: "btn btn-primary"
+ - unless params[:snippets].eql? 'true'
+ .pull-right
+ = render 'filter'
diff --git a/app/views/search/_global_filter.html.haml b/app/views/search/_global_filter.html.haml
deleted file mode 100644
index 442bd84f930..00000000000
--- a/app/views/search/_global_filter.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-%ul.nav.nav-pills.nav-stacked.search-filter
- %li{class: ("active" if @scope == 'projects')}
- = link_to search_filter_path(scope: 'projects') do
- Projects
- .pull-right
- = @search_results.projects_count
- %li{class: ("active" if @scope == 'issues')}
- = link_to search_filter_path(scope: 'issues') do
- Issues
- .pull-right
- = @search_results.issues_count
- %li{class: ("active" if @scope == 'merge_requests')}
- = link_to search_filter_path(scope: 'merge_requests') do
- Merge requests
- .pull-right
- = @search_results.merge_requests_count
diff --git a/app/views/search/_project_filter.html.haml b/app/views/search/_project_filter.html.haml
deleted file mode 100644
index ad933502a28..00000000000
--- a/app/views/search/_project_filter.html.haml
+++ /dev/null
@@ -1,32 +0,0 @@
-%ul.nav.nav-pills.nav-stacked.search-filter
- %li{class: ("active" if @scope == 'blobs')}
- = link_to search_filter_path(scope: 'blobs') do
- %i.fa.fa-code
- Code
- .pull-right
- = @search_results.blobs_count
- %li{class: ("active" if @scope == 'issues')}
- = link_to search_filter_path(scope: 'issues') do
- %i.fa.fa-exclamation-circle
- Issues
- .pull-right
- = @search_results.issues_count
- %li{class: ("active" if @scope == 'merge_requests')}
- = link_to search_filter_path(scope: 'merge_requests') do
- %i.fa.fa-code-fork
- Merge requests
- .pull-right
- = @search_results.merge_requests_count
- %li{class: ("active" if @scope == 'notes')}
- = link_to search_filter_path(scope: 'notes') do
- %i.fa.fa-comments
- Comments
- .pull-right
- = @search_results.notes_count
- %li{class: ("active" if @scope == 'wiki_blobs')}
- = link_to search_filter_path(scope: 'wiki_blobs') do
- %i.fa.fa-book
- Wiki
- .pull-right
- = @search_results.wiki_blobs_count
-
diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml
index 796dd752a4c..741c780ad96 100644
--- a/app/views/search/_results.html.haml
+++ b/app/views/search/_results.html.haml
@@ -1,28 +1,21 @@
-%h4
- #{@search_results.total_count} results found
- - unless @show_snippets
- - if @project
- for #{link_to @project.name_with_namespace, [@project.namespace.becomes(Namespace), @project]}
- - elsif @group
- for #{link_to @group.name, @group}
+- if @search_results.empty?
+ = render partial: "search/results/empty"
+- else
+ .light
+ Search results for
+ %code
+ = @search_term
+ - unless @show_snippets
+ - if @project
+ in project #{link_to @project.name_with_namespace, [@project.namespace.becomes(Namespace), @project]}
+ - elsif @group
+ in group #{link_to @group.name, @group}
-%hr
-
-.row
- .col-sm-3
- - if @project
- = render "project_filter"
- - elsif @show_snippets
- = render 'snippet_filter'
- - else
- = render "global_filter"
- .col-sm-9
+ %br
+ .results.prepend-top-10
.search-results
- - if @search_results.empty?
- = render partial: "search/results/empty", locals: { message: "We couldn't find any matching results" }
- - else
- = render partial: "search/results/#{@scope.singularize}", collection: @objects
- = paginate @objects, theme: 'gitlab'
+ = render partial: "search/results/#{@scope.singularize}", collection: @objects
+ = paginate @objects, theme: 'gitlab'
:javascript
$(".search-results .term").highlight("#{escape_javascript(params[:search])}");
diff --git a/app/views/search/_snippet_filter.html.haml b/app/views/search/_snippet_filter.html.haml
deleted file mode 100644
index 95d23fa9f47..00000000000
--- a/app/views/search/_snippet_filter.html.haml
+++ /dev/null
@@ -1,13 +0,0 @@
-%ul.nav.nav-pills.nav-stacked.search-filter
- %li{class: ("active" if @scope == 'snippet_blobs')}
- = link_to search_filter_path(scope: 'snippet_blobs', snippets: true, group_id: nil, project_id: nil) do
- %i.fa.fa-code
- Snippet Contents
- .pull-right
- = @search_results.snippet_blobs_count
- %li{class: ("active" if @scope == 'snippet_titles')}
- = link_to search_filter_path(scope: 'snippet_titles', snippets: true, group_id: nil, project_id: nil) do
- %i.fa.fa-book
- Titles and Filenames
- .pull-right
- = @search_results.snippet_titles_count
diff --git a/app/views/search/results/_empty.html.haml b/app/views/search/results/_empty.html.haml
index 01fb8cd9b8e..05a63016c09 100644
--- a/app/views/search/results/_empty.html.haml
+++ b/app/views/search/results/_empty.html.haml
@@ -1,4 +1,6 @@
.search_box
.search_glyph
- %span.fa.fa-search
- %h4 #{message}
+ %h4
+ = icon('search')
+ We couldn't find any results matching
+ %code #{@search_term}
diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml
index 5b4816e4c40..e9f2711be2a 100644
--- a/app/views/search/show.html.haml
+++ b/app/views/search/show.html.haml
@@ -1,22 +1,6 @@
-= form_tag search_path, method: :get, class: 'form-horizontal' do |f|
- .search-holder.clearfix
- .form-group
- = label_tag :search, class: 'control-label' do
- %span Looking for
- .col-sm-6
- = search_field_tag :search, params[:search], placeholder: "issue 143", class: "form-control search-text-input", id: "dashboard_search"
- .col-sm-4
- = button_tag 'Search', class: "btn btn-create"
- .form-group
- .col-sm-2
- - unless params[:snippets].eql? 'true'
- .col-sm-10
- = render 'filter', f: f
- = hidden_field_tag :project_id, params[:project_id]
- = hidden_field_tag :group_id, params[:group_id]
- = hidden_field_tag :snippets, params[:snippets]
- = hidden_field_tag :scope, params[:scope]
-
- .results.prepend-top-10
- - if params[:search].present?
- = render 'search/results'
+= render 'search/form'
+%hr
+- if @search_term
+ = render 'search/category'
+ %hr
+ = render 'search/results'
diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml
new file mode 100644
index 00000000000..16a98a7233c
--- /dev/null
+++ b/app/views/shared/_service_settings.html.haml
@@ -0,0 +1,75 @@
+- if @service.errors.any?
+ #error_explanation
+ .alert.alert-danger
+ %ul
+ - @service.errors.full_messages.each do |msg|
+ %li= msg
+
+- if @service.help.present?
+ .well
+ = preserve do
+ = markdown @service.help
+
+.form-group
+ = form.label :active, "Active", class: "control-label"
+ .col-sm-10
+ = form.check_box :active
+
+- if @service.supported_events.length > 1
+ .form-group
+ = form.label :url, "Trigger", class: 'control-label'
+ .col-sm-10
+ - if @service.supported_events.include?("push")
+ %div
+ = form.check_box :push_events, class: 'pull-left'
+ .prepend-left-20
+ = form.label :push_events, class: 'list-label' do
+ %strong Push events
+ %p.light
+ This url will be triggered by a push to the repository
+ - if @service.supported_events.include?("tag_push")
+ %div
+ = form.check_box :tag_push_events, class: 'pull-left'
+ .prepend-left-20
+ = form.label :tag_push_events, class: 'list-label' do
+ %strong Tag push events
+ %p.light
+ This url will be triggered when a new tag is pushed to the repository
+ - if @service.supported_events.include?("note")
+ %div
+ = form.check_box :note_events, class: 'pull-left'
+ .prepend-left-20
+ = form.label :note_events, class: 'list-label' do
+ %strong Comments
+ %p.light
+ This url will be triggered when someone adds a comment
+ - if @service.supported_events.include?("issue")
+ %div
+ = form.check_box :issues_events, class: 'pull-left'
+ .prepend-left-20
+ = form.label :issues_events, class: 'list-label' do
+ %strong Issues events
+ %p.light
+ This url will be triggered when an issue is created
+ - if @service.supported_events.include?("merge_request")
+ %div
+ = form.check_box :merge_requests_events, class: 'pull-left'
+ .prepend-left-20
+ = form.label :merge_requests_events, class: 'list-label' do
+ %strong Merge Request events
+ %p.light
+ This url will be triggered when a merge request is created
+
+- @service.fields.each do |field|
+ - type = field[:type]
+
+ - if type == 'fieldset'
+ - fields = field[:fields]
+ - legend = field[:legend]
+
+ %fieldset
+ %legend= legend
+ - fields.each do |subfield|
+ = render 'shared/field', form: form, field: subfield
+ - else
+ = render 'shared/field', form: form, field: field
diff --git a/db/schema.rb b/db/schema.rb
index 2530eb6fa9d..a2ed9efc933 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -349,10 +349,10 @@ ActiveRecord::Schema.define(version: 20150429002313) do
t.string "import_url"
t.integer "visibility_level", default: 0, null: false
t.boolean "archived", default: false, null: false
- t.string "avatar"
t.string "import_status"
t.float "repository_size", default: 0.0
t.integer "star_count", default: 0, null: false
+ t.string "avatar"
t.string "import_type"
t.string "import_source"
end
@@ -472,7 +472,6 @@ ActiveRecord::Schema.define(version: 20150429002313) do
t.integer "notification_level", default: 1, null: false
t.datetime "password_expires_at"
t.integer "created_by_id"
- t.datetime "last_credential_check_at"
t.string "avatar"
t.string "confirmation_token"
t.datetime "confirmed_at"
@@ -480,6 +479,7 @@ ActiveRecord::Schema.define(version: 20150429002313) do
t.string "unconfirmed_email"
t.boolean "hide_no_ssh_key", default: false
t.string "website_url", default: "", null: false
+ t.datetime "last_credential_check_at"
t.string "github_access_token"
t.string "gitlab_access_token"
t.string "notification_email"
@@ -501,6 +501,30 @@ ActiveRecord::Schema.define(version: 20150429002313) do
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
add_index "users", ["username"], name: "index_users_on_username", using: :btree
+ create_table "users_groups", force: true do |t|
+ t.integer "group_access", null: false
+ t.integer "group_id", null: false
+ t.integer "user_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "notification_level", default: 3, null: false
+ end
+
+ add_index "users_groups", ["user_id"], name: "index_users_groups_on_user_id", using: :btree
+
+ create_table "users_projects", force: true do |t|
+ t.integer "user_id", null: false
+ t.integer "project_id", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "project_access", default: 0, null: false
+ t.integer "notification_level", default: 3, null: false
+ end
+
+ add_index "users_projects", ["project_access"], name: "index_users_projects_on_project_access", using: :btree
+ add_index "users_projects", ["project_id"], name: "index_users_projects_on_project_id", using: :btree
+ add_index "users_projects", ["user_id"], name: "index_users_projects_on_user_id", using: :btree
+
create_table "users_star_projects", force: true do |t|
t.integer "project_id", null: false
t.integer "user_id", null: false
diff --git a/doc/customization/issue_closing.md b/doc/customization/issue_closing.md
index aa65a082a53..64f128f5a63 100644
--- a/doc/customization/issue_closing.md
+++ b/doc/customization/issue_closing.md
@@ -1,5 +1,7 @@
# Issue closing pattern
+Here's how to close multiple issues in one commit message:
+
If a commit message matches the regular expression below, all issues referenced from
the matched text will be closed. This happens when the commit is pushed or merged
into the default branch of a project.
@@ -33,4 +35,4 @@ issue_closing_pattern: '((?:[Cc]los(?:e[sd]|ing)|[Ff]ix(?:e[sd]|ing)?) +(?:(?:is
For manual installs you can customize the pattern in [gitlab.yml][0].
[0]: https://gitlab.com/gitlab-org/gitlab-ce/blob/40c3675372320febf5264061c9bcd63db2dfd13c/config/gitlab.yml.example#L65
-[1]: http://rubular.com/r/Xmbexed1OJ
+[1]: http://rubular.com/r/Xmbexed1OJ \ No newline at end of file
diff --git a/features/steps/project/source/search_code.rb b/features/steps/project/source/search_code.rb
index 9c2864cc936..b66c5a4123a 100644
--- a/features/steps/project/source/search_code.rb
+++ b/features/steps/project/source/search_code.rb
@@ -14,6 +14,6 @@ class Spinach::Features::ProjectSourceSearchCode < Spinach::FeatureSteps
end
step 'I should see empty result' do
- page.should have_content "We couldn't find any matching"
+ page.should have_content "We couldn't find any"
end
end