Commit 8b513fbc authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve side filters and make them look similar

parent 5a52c9b0
...@@ -475,13 +475,13 @@ table { ...@@ -475,13 +475,13 @@ table {
} }
} }
.btn-sign-in {
margin-top: 7px;
text-shadow: none;
}
.side-filters { .side-filters {
fieldset { fieldset {
margin-bottom: 15px; margin-bottom: 15px;
} }
} }
.btn-sign-in {
margin-top: 7px;
text-shadow: none;
}
...@@ -140,7 +140,15 @@ $pagination-active-bg: $bg_style_color; ...@@ -140,7 +140,15 @@ $pagination-active-bg: $bg_style_color;
} }
} }
.nav-tabs > li > a, .nav-pills > li > a { color: #666; } .nav-tabs > li > a,
.nav-pills > li > a {
color: #666;
}
.nav-small > li > a {
padding: 3px 5px;
font-size: 12px;
}
/* /*
......
%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
...@@ -26,62 +26,7 @@ ...@@ -26,62 +26,7 @@
%hr %hr
.row .row
.col-md-3.hidden-sm.hidden-xs.side-filters .col-md-3.hidden-sm.hidden-xs.side-filters
%fieldset = render "projects_filter"
%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
.col-md-9 .col-md-9
%ul.bordered-list.my-projects.top-list %ul.bordered-list.my-projects.top-list
- @projects.each do |project| - @projects.each do |project|
......
%ul.nav.nav-pills.nav-stacked.nav-stacked-menu.append-bottom-20 %ul.nav.nav-pills.nav-stacked.nav-stacked-menu.append-bottom-20
= 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
Edit Project Edit 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
Members Members
= 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
......
...@@ -10,10 +10,11 @@ ...@@ -10,10 +10,11 @@
Created by me Created by me
%li{class: ("active" if params[:scope] == 'all')} %li{class: ("active" if params[:scope] == 'all')}
= link_to filter_path(entity, scope: 'all') do = link_to filter_path(entity, scope: 'all') do
All Everyone's
%fieldset.status-filter %fieldset.status-filter
%ul.nav.nav-pills.nav-stacked %legend State
%ul.nav.nav-pills
%li{class: ("active" if params[:status].blank?)} %li{class: ("active" if params[:status].blank?)}
= link_to filter_path(entity, status: nil) do = link_to filter_path(entity, status: nil) do
Open Open
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
%fieldset %fieldset
%legend Projects %legend Projects
%ul.nav.nav-pills.nav-pills-small.nav-stacked %ul.nav.nav-pills.nav-stacked.nav-small
- @projects.each do |project| - @projects.each do |project|
- unless entities_per_project(project, entity).zero? - unless entities_per_project(project, entity).zero?
%li{class: ("active" if params[:project_id] == project.id.to_s)} %li{class: ("active" if params[:project_id] == project.id.to_s)}
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
Created by me Created by me
%fieldset %fieldset
%ul.nav.nav-pills.nav-stacked %legend State
%ul.nav.nav-pills
%li{class: ("active" if params[:state].blank?)} %li{class: ("active" if params[:state].blank?)}
= link_to project_filter_path(state: nil) do = link_to project_filter_path(state: nil) do
Open Open
......
...@@ -40,7 +40,7 @@ class DashboardIssues < Spinach::FeatureSteps ...@@ -40,7 +40,7 @@ class DashboardIssues < Spinach::FeatureSteps
step 'I click "All" link' do step 'I click "All" link' do
within ".scope-filter" do within ".scope-filter" do
click_link 'All' click_link "Everyone's"
end end
end end
......
...@@ -40,7 +40,7 @@ class DashboardMergeRequests < Spinach::FeatureSteps ...@@ -40,7 +40,7 @@ class DashboardMergeRequests < Spinach::FeatureSteps
step 'I click "All" link' do step 'I click "All" link' do
within ".scope-filter" do within ".scope-filter" do
click_link 'All' click_link "Everyone's"
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