Improve side filters and make them look similar

This commit is contained in:
Dmitriy Zaporozhets 2014-01-14 13:51:59 +02:00
parent 5a52c9b0a6
commit 8b513fbc50
9 changed files with 78 additions and 70 deletions

View file

@ -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;
}

View file

@ -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;
}
/*

View file

@ -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

View file

@ -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|

View file

@ -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

View file

@ -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)}

View file

@ -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

View file

@ -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

View file

@ -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