summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md21
-rw-r--r--README.md2
-rw-r--r--app/assets/javascripts/branch-graph.js.coffee7
-rw-r--r--app/assets/javascripts/issues.js.coffee8
-rw-r--r--app/assets/stylesheets/generic/common.scss10
-rw-r--r--app/assets/stylesheets/generic/selects.scss12
-rw-r--r--app/assets/stylesheets/gl_bootstrap.scss50
-rw-r--r--app/assets/stylesheets/main/variables.scss4
-rw-r--r--app/contexts/issues/list_context.rb16
-rw-r--r--app/contexts/merge_requests_load_context.rb3
-rw-r--r--app/controllers/application_controller.rb2
-rw-r--r--app/controllers/projects/merge_requests_controller.rb2
-rw-r--r--app/models/concerns/issuable.rb12
-rw-r--r--app/views/dashboard/_projects_filter.html.haml55
-rw-r--r--app/views/dashboard/projects.html.haml57
-rw-r--r--app/views/layouts/_head_panel.html.haml2
-rw-r--r--app/views/projects/_settings_nav.html.haml2
-rw-r--r--app/views/projects/issues/_head.html.haml2
-rw-r--r--app/views/projects/issues/_issues.html.haml24
-rw-r--r--app/views/projects/merge_requests/index.html.haml6
-rw-r--r--app/views/shared/_filter.html.haml7
-rw-r--r--app/views/shared/_project_filter.html.haml3
-rw-r--r--app/views/shared/_sort_dropdown.html.haml22
-rw-r--r--config/gitlab.yml.example2
-rw-r--r--features/steps/dashboard/dashboard_issues.rb2
-rw-r--r--features/steps/dashboard/dashboard_merge_requests.rb2
-rw-r--r--lib/gitlab/regex.rb4
-rw-r--r--spec/features/issues_spec.rb2
28 files changed, 165 insertions, 176 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 52061c588a0..cb5c218920d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -69,15 +69,16 @@ If you can, please submit a merge request with the fix or improvements including
Please keep the change in a single MR as small as possible. If you want to contribute a large feature think very hard what the minimum viable change is. Can you split functionality? Can you only submit the backend/API code? Can you start with a very simple UI? The smaller a MR is the more likely it is it will be merged, after that you can send more MR's to enhance it.
-We will accept merge requests if:
-
-* The code has proper tests and all tests pass (or it is a test exposing a failure in existing code)
-* It can be merged without problems (if not please use: `git rebase master`)
-* It does not break any existing functionality
-* It's quality code that conforms to the [Ruby](https://github.com/bbatsov/ruby-style-guide) and [Rails](https://github.com/bbatsov/rails-style-guide) style guides and best practices
-* It is not a catch all merge request but rather fixes a specific issue or implements a specific feature
-* It keeps the GitLab code base clean and well structured
-* We think other users will benefit from the same functionality
-* It is a single commit (please use `git rebase -i` to squash commits)
+We will accept a merge requests if it:
+
+* Includes proper tests and all tests pass (unless it contains a test exposing a bug in existing code)
+* Can be merged without problems (if not please use: `git rebase master`)
+* Do not break any existing functionality
+* Conforms to the [Ruby](https://github.com/bbatsov/ruby-style-guide) and [Rails](https://github.com/bbatsov/rails-style-guide) style guides and best practices
+* Fixes one specific issue or implements one specific feature (do not combine things, send separate merge requests if needed)
+* Keeps the GitLab code base clean and well structured
+* Contains functionality we think other users will benefit from too
+* Doesn't add unnessecary configuration options since they complicate future changes
+* Contains a single commit (please use `git rebase -i` to squash commits)
For examples of feedback on merge requests please look at already [closed merge requests](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests?assignee_id=&label_name=&milestone_id=&scope=&sort=&state=closed).
diff --git a/README.md b/README.md
index c151f966c5a..ed486b0052e 100644
--- a/README.md
+++ b/README.md
@@ -145,7 +145,7 @@ or start each component separately
* [Feedback and suggestions forum](http://feedback.gitlab.com) is the place to propose and discuss new features for GitLab.
-* [Contributing guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/masterCONTRIBUTING.md) describes how to submit merge requests and issues. Pull requests and issues not in line with the guidelines in this document will be closed.
+* [Contributing guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md) describes how to submit merge requests and issues. Pull requests and issues not in line with the guidelines in this document will be closed.
* [Support subscription](http://www.gitlab.com/subscription/) connects you to the knowledge of GitLab experts that will resolve your issues and answer your questions.
diff --git a/app/assets/javascripts/branch-graph.js.coffee b/app/assets/javascripts/branch-graph.js.coffee
index 318538509a5..dd09ee51fe0 100644
--- a/app/assets/javascripts/branch-graph.js.coffee
+++ b/app/assets/javascripts/branch-graph.js.coffee
@@ -194,11 +194,14 @@ class BranchGraph
fill: @colors[commit.space]
stroke: "none"
)
- r.rect(@offsetX + @unitSpace * @mspace + 10, y - 10, 20, 20).attr(
- fill: "url(#{commit.author.icon})"
+
+ avatar_box_x = @offsetX + @unitSpace * @mspace + 10
+ avatar_box_y = y - 10
+ r.rect(avatar_box_x, avatar_box_y, 20, 20).attr(
stroke: @colors[commit.space]
"stroke-width": 2
)
+ r.image(commit.author.icon, avatar_box_x, avatar_box_y, 20, 20)
r.text(@offsetX + @unitSpace * @mspace + 35, y, commit.message.split("\n")[0]).attr(
"text-anchor": "start"
font: "14px Monaco, monospace"
diff --git a/app/assets/javascripts/issues.js.coffee b/app/assets/javascripts/issues.js.coffee
index 5e60b2775a6..6c239c66c0a 100644
--- a/app/assets/javascripts/issues.js.coffee
+++ b/app/assets/javascripts/issues.js.coffee
@@ -29,10 +29,10 @@
$('#filter_issue_search').val($('#issue_search').val())
initSelects: ->
- $("select#update_status").select2()
- $("select#update_assignee_id").select2()
- $("select#update_milestone_id").select2()
- $("select#label_name").select2()
+ $("select#update_status").select2(width: 'resolve', dropdownAutoWidth: true)
+ $("select#update_assignee_id").select2(width: 'resolve', dropdownAutoWidth: true)
+ $("select#update_milestone_id").select2(width: 'resolve', dropdownAutoWidth: true)
+ $("select#label_name").select2(width: 'resolve', dropdownAutoWidth: true)
$("#milestone_id, #assignee_id, #label_name").on "change", ->
$(this).closest("form").submit()
diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss
index 4c1a1e9a68a..79a217186de 100644
--- a/app/assets/stylesheets/generic/common.scss
+++ b/app/assets/stylesheets/generic/common.scss
@@ -475,13 +475,13 @@ table {
}
}
+.btn-sign-in {
+ margin-top: 7px;
+ text-shadow: none;
+}
+
.side-filters {
fieldset {
margin-bottom: 15px;
}
}
-
-.btn-sign-in {
- margin-top: 7px;
- text-shadow: none;
-}
diff --git a/app/assets/stylesheets/generic/selects.scss b/app/assets/stylesheets/generic/selects.scss
index fa10e85664a..24fc857f41b 100644
--- a/app/assets/stylesheets/generic/selects.scss
+++ b/app/assets/stylesheets/generic/selects.scss
@@ -14,6 +14,18 @@
.select2-drop-active {
border: 1px solid #BBB;
margin-top: 4px;
+
+ .select2-search input {
+ background: #fafafa;
+ border-color: #DDD;
+ }
+
+ .select2-results {
+ max-height: 350px;
+ .select2-highlighted {
+ background: $bg_style_color;
+ }
+ }
}
select {
diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss
index 1fdc82d36cf..7f45d64fb7c 100644
--- a/app/assets/stylesheets/gl_bootstrap.scss
+++ b/app/assets/stylesheets/gl_bootstrap.scss
@@ -6,6 +6,9 @@
*
*/
+$font-size-base: 13px !default;
+$nav-pills-active-link-hover-bg: $bg_style_color;
+$pagination-active-bg: $bg_style_color;
// Core variables and mixins
@import "bootstrap/variables";
@@ -137,49 +140,16 @@
}
}
-.nav-tabs > li > a, .nav-pills > li > a { color: $style_color; }
-
-// Nav pills
-.nav-pills {
- .active a {
- background: $primary_color;
- }
-
- &.nav-stacked {
- > li > a {
- @include border-radius(0);
- border-left: 4px solid #EEE;
- padding: 12px;
- color: #777;
- }
- > .active > a {
- border-color: $primary_color;
- background: none;
- color: #333;
- font-weight: bolder;
-
- &:hover {
- background: none;
- color: #333;
- }
- }
-
- &.nav-stacked-menu {
- li > a {
- padding: 16px;
- }
- }
- }
+.nav-tabs > li > a,
+.nav-pills > li > a {
+ color: #666;
+}
- &.nav-pills-small {
- > li > a {
- padding: 8px 12px;
- font-size: 12px;
- }
- }
+.nav-small > li > a {
+ padding: 3px 5px;
+ font-size: 12px;
}
-.nav-pills > .active > a > i[class^="icon-"] { background: inherit; }
/*
* Callouts from Bootstrap3 docs
diff --git a/app/assets/stylesheets/main/variables.scss b/app/assets/stylesheets/main/variables.scss
index 86b207f02cc..decc5f50469 100644
--- a/app/assets/stylesheets/main/variables.scss
+++ b/app/assets/stylesheets/main/variables.scss
@@ -1,12 +1,10 @@
-/** Override bootstrap variables **/
-$font-size-base: 13px !default;
-
/**
* General Colors
*/
$primary_color: #2FA0BB;
$link_color: #3A89A3;
$style_color: #474D57;
+$bg_style_color: #2299BB;
$hover: #D9EDF7;
/**
diff --git a/app/contexts/issues/list_context.rb b/app/contexts/issues/list_context.rb
index b256fd4c732..6de14d8cd4f 100644
--- a/app/contexts/issues/list_context.rb
+++ b/app/contexts/issues/list_context.rb
@@ -31,23 +31,9 @@ module Issues
end
# Sort by :sort param
- @issues = sort(@issues, params[:sort])
+ @issues = @issues.sort(params[:sort])
@issues
end
-
- private
-
- def sort(issues, condition)
- case condition
- when 'newest' then issues.except(:order).order('created_at DESC')
- when 'oldest' then issues.except(:order).order('created_at ASC')
- when 'recently_updated' then issues.except(:order).order('updated_at DESC')
- when 'last_updated' then issues.except(:order).order('updated_at ASC')
- when 'milestone_due_soon' then issues.except(:order).joins(:milestone).order("milestones.due_date ASC")
- when 'milestone_due_later' then issues.except(:order).joins(:milestone).order("milestones.due_date DESC")
- else issues
- end
- end
end
end
diff --git a/app/contexts/merge_requests_load_context.rb b/app/contexts/merge_requests_load_context.rb
index c3408db6e11..3559ebf7a36 100644
--- a/app/contexts/merge_requests_load_context.rb
+++ b/app/contexts/merge_requests_load_context.rb
@@ -30,6 +30,9 @@ class MergeRequestsLoadContext < BaseContext
merge_requests = merge_requests.where(milestone_id: (params[:milestone_id] == '0' ? nil : params[:milestone_id]))
end
+ # Sort by :sort param
+ merge_requests = merge_requests.sort(params[:sort])
+
merge_requests
end
end
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index b6501eacea3..442b1b65ce8 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -207,7 +207,7 @@ class ApplicationController < ActionController::Base
end
def configure_permitted_parameters
- devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:username, :email, :password) }
+ devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:username, :email, :password, :login, :remember_me) }
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:username, :email, :name, :password, :password_confirmation) }
end
end
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 39d4f77b73c..d89ade5352c 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -17,6 +17,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
before_filter :authorize_modify_merge_request!, only: [:close, :edit, :update, :sort]
def index
+ sort_param = params[:sort] || 'newest'
+ @sort = sort_param.humanize unless sort_param.empty?
@merge_requests = MergeRequestsLoadContext.new(project, current_user, params).execute
assignee_id, milestone_id = params[:assignee_id], params[:milestone_id]
@assignee = @project.team.find(assignee_id) if assignee_id.present? && !assignee_id.to_i.zero?
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 58bf621f91b..0f1dad4ef16 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -45,6 +45,18 @@ module Issuable
def search(query)
where("title like :query", query: "%#{query}%")
end
+
+ def sort(method)
+ case method.to_s
+ when 'newest' then reorder('created_at DESC')
+ when 'oldest' then reorder('created_at ASC')
+ when 'recently_updated' then reorder('updated_at DESC')
+ when 'last_updated' then reorder('updated_at ASC')
+ when 'milestone_due_soon' then joins(:milestone).reorder("milestones.due_date ASC")
+ when 'milestone_due_later' then joins(:milestone).reorder("milestones.due_date DESC")
+ else reorder('created_at DESC')
+ end
+ end
end
def today?
diff --git a/app/views/dashboard/_projects_filter.html.haml b/app/views/dashboard/_projects_filter.html.haml
new file mode 100644
index 00000000000..8c9893ba84f
--- /dev/null
+++ b/app/views/dashboard/_projects_filter.html.haml
@@ -0,0 +1,55 @@
+%fieldset
+ %ul.nav.nav-pills.nav-stacked
+ = nav_tab :scope, nil do
+ = link_to projects_dashboard_filter_path(scope: nil) do
+ All
+ %span.pull-right
+ = current_user.authorized_projects.count
+ = nav_tab :scope, 'personal' do
+ = link_to projects_dashboard_filter_path(scope: 'personal') do
+ Personal
+ %span.pull-right
+ = current_user.personal_projects.count
+ = nav_tab :scope, 'joined' do
+ = link_to projects_dashboard_filter_path(scope: 'joined') do
+ Joined
+ %span.pull-right
+ = current_user.authorized_projects.joined(current_user).count
+ = nav_tab :scope, 'owned' do
+ = link_to projects_dashboard_filter_path(scope: 'owned') do
+ Owned
+ %span.pull-right
+ = current_user.owned_projects.count
+
+%fieldset
+ %legend Visibility
+ %ul.nav.nav-pills.nav-stacked.nav-small.visibility-filter
+ - Gitlab::VisibilityLevel.values.each do |level|
+ %li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' }
+ = link_to projects_dashboard_filter_path(visibility_level: level) do
+ = visibility_level_icon(level)
+ = visibility_level_label(level)
+
+- if @groups.present?
+ %fieldset
+ %legend Groups
+ %ul.nav.nav-pills.nav-stacked.nav-small
+ - @groups.each do |group|
+ %li{ class: (group.name == params[:group]) ? 'active' : 'light' }
+ = link_to projects_dashboard_filter_path(group: group.name) do
+ %i.icon-folder-close-alt
+ = group.name
+ %small.pull-right
+ = group.projects.count
+
+
+
+- if @labels.present?
+ %fieldset
+ %legend Labels
+ %ul.nav.nav-pills.nav-stacked.nav-small
+ - @labels.each do |label|
+ %li{ class: (label.name == params[:label]) ? 'active' : 'light' }
+ = link_to projects_dashboard_filter_path(scope: params[:scope], label: label.name) do
+ %i.icon-tag
+ = label.name
diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml
index e6a69195105..8feef97c732 100644
--- a/app/views/dashboard/projects.html.haml
+++ b/app/views/dashboard/projects.html.haml
@@ -26,62 +26,7 @@
%hr
.row
.col-md-3.hidden-sm.hidden-xs.side-filters
- %fieldset
- %ul.nav.nav-pills.nav-stacked
- = nav_tab :scope, nil do
- = link_to projects_dashboard_filter_path(scope: nil) do
- All
- %span.pull-right
- = current_user.authorized_projects.count
- = nav_tab :scope, 'personal' do
- = link_to projects_dashboard_filter_path(scope: 'personal') do
- Personal
- %span.pull-right
- = current_user.personal_projects.count
- = nav_tab :scope, 'joined' do
- = link_to projects_dashboard_filter_path(scope: 'joined') do
- Joined
- %span.pull-right
- = current_user.authorized_projects.joined(current_user).count
- = nav_tab :scope, 'owned' do
- = link_to projects_dashboard_filter_path(scope: 'owned') do
- Owned
- %span.pull-right
- = current_user.owned_projects.count
-
- %fieldset
- %legend Visibility
- %ul.bordered-list.visibility-filter
- - Gitlab::VisibilityLevel.values.each do |level|
- %li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' }
- = link_to projects_dashboard_filter_path(visibility_level: level) do
- = visibility_level_icon(level)
- = visibility_level_label(level)
-
- - if @groups.present?
- %fieldset
- %legend Groups
- %ul.bordered-list
- - @groups.each do |group|
- %li{ class: (group.name == params[:group]) ? 'active' : 'light' }
- = link_to projects_dashboard_filter_path(group: group.name) do
- %i.icon-folder-close-alt
- = group.name
- %small.pull-right
- = group.projects.count
-
-
-
- - if @labels.present?
- %fieldset
- %legend Labels
- %ul.bordered-list
- - @labels.each do |label|
- %li{ class: (label.name == params[:label]) ? 'active' : 'light' }
- = link_to projects_dashboard_filter_path(scope: params[:scope], label: label.name) do
- %i.icon-tag
- = label.name
-
+ = render "projects_filter"
.col-md-9
%ul.bordered-list.my-projects.top-list
- @projects.each do |project|
diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml
index f303e45094a..58b216f2e98 100644
--- a/app/views/layouts/_head_panel.html.haml
+++ b/app/views/layouts/_head_panel.html.haml
@@ -28,7 +28,7 @@
= link_to public_root_path, title: "Public area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
%i.icon-globe
%li
- = link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
+ = link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'My snippets' do
%i.icon-paste
- if current_user.is_admin?
%li
diff --git a/app/views/projects/_settings_nav.html.haml b/app/views/projects/_settings_nav.html.haml
index 48e7181931f..e4cfabc3100 100644
--- a/app/views/projects/_settings_nav.html.haml
+++ b/app/views/projects/_settings_nav.html.haml
@@ -1,11 +1,9 @@
%ul.nav.nav-pills.nav-stacked.nav-stacked-menu.append-bottom-20
= nav_link(path: 'projects#edit') do
= link_to edit_project_path(@project), class: "stat-tab tab " do
- %i.icon-edit
Edit Project
= nav_link(controller: [:team_members, :teams]) do
= link_to project_team_index_path(@project), class: "team-tab tab" do
- %i.icon-group
Members
= nav_link(controller: :deploy_keys) do
= link_to project_deploy_keys_path(@project) do
diff --git a/app/views/projects/issues/_head.html.haml b/app/views/projects/issues/_head.html.haml
index 36549aae7d3..61213e752f8 100644
--- a/app/views/projects/issues/_head.html.haml
+++ b/app/views/projects/issues/_head.html.haml
@@ -19,7 +19,7 @@
.pull-right
= form_tag project_issues_path(@project), method: :get, id: "issue_search_form", class: 'inline issue-search-form' do
.append-right-10.hidden-xs.hidden-sm
- = search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input' }
+ = search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' }
- 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", title: "New Issue", id: "new_issue_link" do
%i.icon-plus
diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml
index e2ce26feac3..87d30a4a163 100644
--- a/app/views/projects/issues/_issues.html.haml
+++ b/app/views/projects/issues/_issues.html.haml
@@ -78,28 +78,8 @@
%strong= milestone.title
%small.light= milestone.expires_at
- .dropdown.inline.prepend-left-10
- %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
- %span.light sort:
- - if @sort.present?
- = @sort
- - else
- Newest
- %b.caret
- %ul.dropdown-menu
- %li
- = link_to project_filter_path(sort: 'newest') do
- Newest
- = link_to project_filter_path(sort: 'oldest') do
- Oldest
- = link_to project_filter_path(sort: 'recently_updated') do
- Recently updated
- = link_to project_filter_path(sort: 'last_updated') do
- Last updated
- = link_to project_filter_path(sort: 'milestone_due_soon') do
- Milestone due soon
- = link_to project_filter_path(sort: 'milestone_due_later') do
- Milestone due later
+ .pull-right
+ = render 'shared/sort_dropdown'
%ul.well-list.issues-list
diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml
index d6d0cde85be..a525a49015f 100644
--- a/app/views/projects/merge_requests/index.html.haml
+++ b/app/views/projects/merge_requests/index.html.haml
@@ -5,8 +5,7 @@
%h3.page-title
Merge Requests
%span (#{@merge_requests.total_count})
-
-
+%hr
.row
.col-md-3
= render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project)
@@ -61,6 +60,9 @@
%strong= milestone.title
%small.light= milestone.expires_at
+ .pull-right
+ = render 'shared/sort_dropdown'
+
%ul.well-list.mr-list
= render @merge_requests
- if @merge_requests.blank?
diff --git a/app/views/shared/_filter.html.haml b/app/views/shared/_filter.html.haml
index 00496b067ac..96299f8dcf2 100644
--- a/app/views/shared/_filter.html.haml
+++ b/app/views/shared/_filter.html.haml
@@ -10,10 +10,11 @@
Created by me
%li{class: ("active" if params[:scope] == 'all')}
= link_to filter_path(entity, scope: 'all') do
- All
+ Everyone's
%fieldset.status-filter
- %ul.nav.nav-pills.nav-stacked
+ %legend State
+ %ul.nav.nav-pills
%li{class: ("active" if params[:status].blank?)}
= link_to filter_path(entity, status: nil) do
Open
@@ -26,7 +27,7 @@
%fieldset
%legend Projects
- %ul.nav.nav-pills.nav-pills-small.nav-stacked
+ %ul.nav.nav-pills.nav-stacked.nav-small
- @projects.each do |project|
- unless entities_per_project(project, entity).zero?
%li{class: ("active" if params[:project_id] == project.id.to_s)}
diff --git a/app/views/shared/_project_filter.html.haml b/app/views/shared/_project_filter.html.haml
index 0509cd41efc..a4f406a4ab6 100644
--- a/app/views/shared/_project_filter.html.haml
+++ b/app/views/shared/_project_filter.html.haml
@@ -14,7 +14,8 @@
Created by me
%fieldset
- %ul.nav.nav-pills.nav-stacked
+ %legend State
+ %ul.nav.nav-pills
%li{class: ("active" if params[:state].blank?)}
= link_to project_filter_path(state: nil) do
Open
diff --git a/app/views/shared/_sort_dropdown.html.haml b/app/views/shared/_sort_dropdown.html.haml
new file mode 100644
index 00000000000..2e875669967
--- /dev/null
+++ b/app/views/shared/_sort_dropdown.html.haml
@@ -0,0 +1,22 @@
+.dropdown.inline.prepend-left-10
+ %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
+ %span.light sort:
+ - if @sort.present?
+ = @sort
+ - else
+ Newest
+ %b.caret
+ %ul.dropdown-menu
+ %li
+ = link_to project_filter_path(sort: 'newest') do
+ Newest
+ = link_to project_filter_path(sort: 'oldest') do
+ Oldest
+ = link_to project_filter_path(sort: 'recently_updated') do
+ Recently updated
+ = link_to project_filter_path(sort: 'last_updated') do
+ Last updated
+ = link_to project_filter_path(sort: 'milestone_due_soon') do
+ Milestone due soon
+ = link_to project_filter_path(sort: 'milestone_due_later') do
+ Milestone due later
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 2bc984c9294..f552bee8250 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -65,7 +65,7 @@ production: &base
# If a commit message matches this regular expression, 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.
# When not specified the default issue_closing_pattern as specified below will be used.
- # issue_closing_pattern: ([Cc]lose[sd]|[Ff]ixe[sd]) +#\d+
+ # issue_closing_pattern: "([Cc]lose[sd]|[Ff]ixe[sd]) +#\d+"
## Default project features settings
default_projects_features:
diff --git a/features/steps/dashboard/dashboard_issues.rb b/features/steps/dashboard/dashboard_issues.rb
index 9d486bd8156..a458acdae07 100644
--- a/features/steps/dashboard/dashboard_issues.rb
+++ b/features/steps/dashboard/dashboard_issues.rb
@@ -40,7 +40,7 @@ class DashboardIssues < Spinach::FeatureSteps
step 'I click "All" link' do
within ".scope-filter" do
- click_link 'All'
+ click_link "Everyone's"
end
end
diff --git a/features/steps/dashboard/dashboard_merge_requests.rb b/features/steps/dashboard/dashboard_merge_requests.rb
index f6fe47470b3..73286532b93 100644
--- a/features/steps/dashboard/dashboard_merge_requests.rb
+++ b/features/steps/dashboard/dashboard_merge_requests.rb
@@ -40,7 +40,7 @@ class DashboardMergeRequests < Spinach::FeatureSteps
step 'I click "All" link' do
within ".scope-filter" do
- click_link 'All'
+ click_link "Everyone's"
end
end
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index 943dc9dc7ea..d18fc8bf2ce 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -17,7 +17,7 @@ module Gitlab
def path_regex
default_regex
end
-
+
def archive_formats_regex
#|zip|tar| tar.gz | tar.bz2 |
/(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/
@@ -49,7 +49,7 @@ module Gitlab
protected
def default_regex
- /\A[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
+ /\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
end
end
end
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb
index 538a6ee9fc9..1d225e8bad0 100644
--- a/spec/features/issues_spec.rb
+++ b/spec/features/issues_spec.rb
@@ -222,8 +222,6 @@ describe "Issues" do
it 'with dropdown menu' do
visit project_issue_path(project, issue)
- p find('.edit-issue.inline-update').text
-
find('.edit-issue.inline-update').select(milestone.title, from: 'issue_milestone_id')
click_button 'Update Issue'