diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-27 12:00:31 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-27 12:00:31 -0700 |
commit | 70496fe5d840eeb2be08556008a0595b4c808e4b (patch) | |
tree | cc0a7176de90936645a7d1035cb6e89bb45dd1c8 | |
parent | c1c93f4f7a51760660ea2e1994071e63e6793808 (diff) | |
download | gitlab-ce-issues-filters.tar.gz |
Improve UI for issues filtersissues-filters
-rw-r--r-- | app/assets/stylesheets/generic/filters.scss | 25 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/issuable.scss | 8 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/issues.scss | 9 | ||||
-rw-r--r-- | app/helpers/labels_helper.rb | 3 | ||||
-rw-r--r-- | app/helpers/milestones_helper.rb | 3 | ||||
-rw-r--r-- | app/views/shared/_issuable_filter.html.haml | 34 |
6 files changed, 39 insertions, 43 deletions
diff --git a/app/assets/stylesheets/generic/filters.scss b/app/assets/stylesheets/generic/filters.scss new file mode 100644 index 00000000000..20c6a85de98 --- /dev/null +++ b/app/assets/stylesheets/generic/filters.scss @@ -0,0 +1,25 @@ +.filter-item { + margin-right: 15px; +} + +.issues-state-filters { + li.active a, + li.active a:hover { + background: #f5f5f5; + border-bottom: 1px solid #f5f5f5 !important; + } +} + +.issues-details-filters { + font-size: 13px; + background: #f5f5f5; + margin: -10px 0; + padding: 10px 15px; + margin-top: -15px; + border-left: 1px solid #DDD; + border-right: 1px solid #DDD; + + .btn { + font-size: 13px; + } +} diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index 13e09d5596f..a640a4e2051 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -45,11 +45,3 @@ .btn { font-size: 13px; } } - -.filter-item { - margin-right: 15px; - - > span { - margin-right: 4px; - } -} diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index 55e648a568f..b8ad26d69cd 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -41,12 +41,9 @@ } .check-all-holder { - height: 36px; + line-height: 36px; float: left; - margin-right: 12px; - padding: 6px 15px; - border: 1px solid #ccc; - @include border-radius(4px); + margin-right: 15px; } .issues_content { @@ -73,7 +70,7 @@ .issues-filters, .issues_bulk_update { select, .select2-container { - width: 140px !important; + width: 150px !important; display: inline-block; } } diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb index aa98ead43f1..32ef2e7ca84 100644 --- a/app/helpers/labels_helper.rb +++ b/app/helpers/labels_helper.rb @@ -49,7 +49,6 @@ module LabelsHelper end def project_labels_options(project) - options_for_select([['Any', nil]]) + - options_from_collection_for_select(project.labels, 'name', 'name', params[:label_name]) + options_from_collection_for_select(project.labels, 'name', 'name', params[:label_name]) end end diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb index e1dec3ec628..282bdf744d2 100644 --- a/app/helpers/milestones_helper.rb +++ b/app/helpers/milestones_helper.rb @@ -28,7 +28,6 @@ module MilestonesHelper Milestone.where(project_id: @projects) end.active - options_for_select([['Any', nil]]) + - options_from_collection_for_select(milestones, 'id', 'title', params[:milestone_id]) + options_from_collection_for_select(milestones, 'id', 'title', params[:milestone_id]) end end diff --git a/app/views/shared/_issuable_filter.html.haml b/app/views/shared/_issuable_filter.html.haml index 686a3389bb4..77085ccb56b 100644 --- a/app/views/shared/_issuable_filter.html.haml +++ b/app/views/shared/_issuable_filter.html.haml @@ -14,7 +14,7 @@ %i.fa.fa-compass All - %div + .issues-details-filters = form_tag page_filter_path(without: [:assignee_id, :author_id, :milestone_id, :label_name]), method: :get, class: 'filter-form' do - if controller.controller_name == 'issues' .check-all-holder @@ -23,35 +23,19 @@ disabled: !can?(current_user, :modify_issue, @project) .issues-other-filters .filter-item.inline - %span.light - %i.fa.fa-user - Assignee - %strong - = users_select_tag(:assignee_id, selected: params[:assignee_id], - placeholder: 'Any', class: 'trigger-submit', any_user: true, null_user: true) + = users_select_tag(:assignee_id, selected: params[:assignee_id], + placeholder: 'Assignee', class: 'trigger-submit', any_user: true, null_user: true) .filter-item.inline - %span.light - %i.fa.fa-user - Author - %strong - = users_select_tag(:author_id, selected: params[:author_id], - placeholder: 'Any', class: 'trigger-submit', any_user: true) + = users_select_tag(:author_id, selected: params[:author_id], + placeholder: 'Author', class: 'trigger-submit', any_user: true) - .filter-item.inline - %span.light - %i.fa.fa-clock-o - Milestone - %strong - = select_tag('milestone_id', projects_milestones_options, class: "select2 trigger-submit") + .filter-item.inline.milestone-filter + = select_tag('milestone_id', projects_milestones_options, class: "select2 trigger-submit", prompt: 'Milestone') - if @project - .filter-item.inline - %span.light - %i.fa.fa-tag - Label - %strong - = select_tag('label_name', project_labels_options(@project), class: "select2 trigger-submit") + .filter-item.inline.labels-filter + = select_tag('label_name', project_labels_options(@project), class: "select2 trigger-submit", prompt: 'Label') .pull-right = render 'shared/sort_dropdown' |