Commit 9b572805 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Restyle issue/mr top filters for list

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 67798492
...@@ -112,6 +112,7 @@ pre.well-pre { ...@@ -112,6 +112,7 @@ pre.well-pre {
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus { .dropdown-menu > li > a:focus {
background: #29b; background: #29b;
color: #FFF
} }
.breadcrumb > li + li:before { .breadcrumb > li + li:before {
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
.issue-check { .issue-check {
float: left; float: left;
padding: 8px 0;
padding-right: 8px; padding-right: 8px;
margin-bottom: 10px;
min-width: 15px; min-width: 15px;
} }
...@@ -38,13 +38,21 @@ ...@@ -38,13 +38,21 @@
} }
} }
input.check_all_issues { .check-all-holder {
height: 32px;
float: left; float: left;
padding: 0; margin-right: 12px;
margin: 0; padding: 6px 10px;
margin-right: 10px; border: 1px solid #ccc;
position: relative; @include border-radius(4px);
top: 13px;
input.check_all_issues {
padding: 0;
margin: 0;
position: relative;
top: 3px;
}
} }
.issues_content { .issues_content {
...@@ -91,6 +99,13 @@ input.check_all_issues { ...@@ -91,6 +99,13 @@ input.check_all_issues {
.update_selected_issues { .update_selected_issues {
margin-left: 4px; margin-left: 4px;
} }
.select2-container .select2-choice {
height: 32px;
line-height: 28px;
color: #444 !important;
font-weight: 500;
}
} }
} }
......
...@@ -70,11 +70,11 @@ module IssuesHelper ...@@ -70,11 +70,11 @@ module IssuesHelper
end end
def bulk_update_milestone_options def bulk_update_milestone_options
options_for_select(["None (backlog)", nil]) + options_from_collection_for_select(project_active_milestones, "id", "title", params[:milestone_id]) options_for_select(["None (backlog)"]) + options_from_collection_for_select(project_active_milestones, "id", "title", params[:milestone_id])
end end
def bulk_update_assignee_options def bulk_update_assignee_options
options_for_select(["None (unassigned)", nil]) + options_from_collection_for_select(@project.team.members, "id", "name", params[:assignee_id]) options_for_select(["None (unassigned)"]) + options_from_collection_for_select(@project.team.members, "id", "name", params[:assignee_id])
end end
def assignee_options object def assignee_options object
......
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
%li.pull-right %li.pull-right
.pull-right .pull-right
= form_tag project_issues_path(@project), method: :get, id: "issue_search_form", class: 'inline 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, nil, { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' } = 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 - 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 = 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.icon-plus
New Issue New Issue
.ui-box .append-bottom-10
.title .check-all-holder
= check_box_tag "check_all_issues", nil, false, class: "check_all_issues left" = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left"
.clearfix .issues-filters
.issues_bulk_update.hide .dropdown.inline
= form_tag bulk_update_project_issues_path(@project), method: :post do %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%span Update selected issues with &nbsp; %i.icon-tags
= select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status") %span.light labels:
= project_users_select_tag('update[assignee_id]', placeholder: 'Assignee') - if params[:label_name].present?
= select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone") %strong= params[:label_name]
= hidden_field_tag 'update[issues_ids]', [] - else
= hidden_field_tag :status, params[:status] Any
= button_tag "Save", class: "btn update_selected_issues btn-small btn-save" %b.caret
.issues-filters %ul.dropdown-menu
%span Filter by %li
.dropdown.inline.prepend-left-10 = link_to project_filter_path(label_name: nil) do
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} Any
%i.icon-tags - issue_label_names.each do |label_name|
%span.light labels: %li
- if params[:label_name].present? = link_to project_filter_path(label_name: label_name) do
%strong= params[:label_name] %span{class: "label #{label_css_class(label_name)}"}
- else %i.icon-tag
Any = label_name
%b.caret .dropdown.inline.prepend-left-10
%ul.dropdown-menu %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%li %i.icon-user
= link_to project_filter_path(label_name: nil) do %span.light assignee:
Any - if @assignee.present?
- issue_label_names.each do |label_name| %strong= @assignee.name
%li - elsif params[:assignee_id] == "0"
= link_to project_filter_path(label_name: label_name) do Unassigned
%span{class: "label #{label_css_class(label_name)}"} - else
%i.icon-tag Any
= label_name %b.caret
.dropdown.inline.prepend-left-10 %ul.dropdown-menu
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} %li
%i.icon-user = link_to project_filter_path(assignee_id: nil) do
%span.light assignee: Any
- if @assignee.present? = link_to project_filter_path(assignee_id: 0) do
%strong= @assignee.name Unassigned
- elsif params[:assignee_id] == "0" - @assignees.sort_by(&:name).each do |user|
Unassigned %li
- else = link_to project_filter_path(assignee_id: user.id) do
Any = image_tag avatar_icon(user.email), class: "avatar s16", alt: ''
%b.caret = user.name
%ul.dropdown-menu
%li
= link_to project_filter_path(assignee_id: nil) do
Any
= link_to project_filter_path(assignee_id: 0) do
Unassigned
- @assignees.sort_by(&:name).each do |user|
%li
= link_to project_filter_path(assignee_id: user.id) do
= image_tag avatar_icon(user.email), class: "avatar s16", alt: ''
= user.name
.dropdown.inline.prepend-left-10 .dropdown.inline.prepend-left-10
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%i.icon-time %i.icon-time
%span.light milestone: %span.light milestone:
- if @milestone.present? - if @milestone.present?
%strong= @milestone.title %strong= @milestone.title
- elsif params[:milestone_id] == "0" - elsif params[:milestone_id] == "0"
None (backlog) None (backlog)
- else - else
Any Any
%b.caret %b.caret
%ul.dropdown-menu %ul.dropdown-menu
%li %li
= link_to project_filter_path(milestone_id: nil) do = link_to project_filter_path(milestone_id: nil) do
Any Any
= link_to project_filter_path(milestone_id: 0) do = link_to project_filter_path(milestone_id: 0) do
None (backlog) None (backlog)
- project_active_milestones.each do |milestone| - project_active_milestones.each do |milestone|
%li %li
= link_to project_filter_path(milestone_id: milestone.id) do = link_to project_filter_path(milestone_id: milestone.id) do
%strong= milestone.title %strong= milestone.title
%small.light= milestone.expires_at %small.light= milestone.expires_at
.pull-right .pull-right
= render 'shared/sort_dropdown' = render 'shared/sort_dropdown'
.clearfix
.issues_bulk_update.hide
= form_tag bulk_update_project_issues_path(@project), method: :post do
= select_tag('update[status]', options_for_select(['Open', 'Closed']), prompt: "Status")
= project_users_select_tag('update[assignee_id]', placeholder: 'Assignee')
= select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
= hidden_field_tag 'update[issues_ids]', []
= hidden_field_tag :status, params[:status]
= button_tag "Update issues", class: "btn update_selected_issues btn-save"
.ui-box
%ul.well-list.issues-list %ul.well-list.issues-list
= render @issues = render @issues
- if @issues.blank? - if @issues.blank?
......
...@@ -10,59 +10,57 @@ ...@@ -10,59 +10,57 @@
.col-md-3 .col-md-3
= render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project) = render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project)
.col-md-9 .col-md-9
.ui-box .mr-filters.append-bottom-10
.title .dropdown.inline
.mr-filters %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%span Filter by %i.icon-user
.dropdown.inline.prepend-left-10 %span.light assignee:
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} - if @assignee.present?
%i.icon-user %strong= @assignee.name
%span.light assignee: - elsif params[:assignee_id] == "0"
- if @assignee.present? Unassigned
%strong= @assignee.name - else
- elsif params[:assignee_id] == "0" Any
Unassigned %b.caret
- else %ul.dropdown-menu
Any %li
%b.caret = link_to project_filter_path(assignee_id: nil) do
%ul.dropdown-menu Any
%li = link_to project_filter_path(assignee_id: 0) do
= link_to project_filter_path(assignee_id: nil) do Unassigned
Any - @assignees.sort_by(&:name).each do |user|
= link_to project_filter_path(assignee_id: 0) do %li
Unassigned = link_to project_filter_path(assignee_id: user.id) do
- @assignees.sort_by(&:name).each do |user| = image_tag avatar_icon(user.email), class: "avatar s16", alt: ''
%li = user.name
= link_to project_filter_path(assignee_id: user.id) do
= image_tag avatar_icon(user.email), class: "avatar s16", alt: ''
= user.name
.dropdown.inline.prepend-left-10 .dropdown.inline.prepend-left-10
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%i.icon-time %i.icon-time
%span.light milestone: %span.light milestone:
- if @milestone.present? - if @milestone.present?
%strong= @milestone.title %strong= @milestone.title
- elsif params[:milestone_id] == "0" - elsif params[:milestone_id] == "0"
None (backlog) None (backlog)
- else - else
Any Any
%b.caret %b.caret
%ul.dropdown-menu %ul.dropdown-menu
%li %li
= link_to project_filter_path(milestone_id: nil) do = link_to project_filter_path(milestone_id: nil) do
Any Any
= link_to project_filter_path(milestone_id: 0) do = link_to project_filter_path(milestone_id: 0) do
None (backlog) None (backlog)
- project_active_milestones.each do |milestone| - project_active_milestones.each do |milestone|
%li %li
= link_to project_filter_path(milestone_id: milestone.id) do = link_to project_filter_path(milestone_id: milestone.id) do
%strong= milestone.title %strong= milestone.title
%small.light= milestone.expires_at %small.light= milestone.expires_at
.pull-right .pull-right
= render 'shared/sort_dropdown' = render 'shared/sort_dropdown'
.ui-box
%ul.well-list.mr-list %ul.well-list.mr-list
= render @merge_requests = render @merge_requests
- if @merge_requests.blank? - if @merge_requests.blank?
......
.dropdown.inline.prepend-left-10 .dropdown.inline.prepend-left-10
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%span.light sort: %span.light sort:
- if @sort.present? - if @sort.present?
= @sort = @sort
......
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