summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-14 13:47:15 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-14 13:47:15 +0000
commit85a6fe4ba71536841e09f90208dbf454262583b9 (patch)
treefa144e10b1a2d7f6593b8938c4db306fcae73471
parent5a52c9b0a69936d612be84704d7616bf8306c2af (diff)
parent8b513fbc50e2e35be0c5fda35a980b064a3c7523 (diff)
downloadgitlab-ce-85a6fe4ba71536841e09f90208dbf454262583b9.tar.gz
Merge branch 'improve/side_filters' of /home/git/repositories/gitlab/gitlabhq
-rw-r--r--app/assets/stylesheets/generic/common.scss10
-rw-r--r--app/assets/stylesheets/gl_bootstrap.scss10
-rw-r--r--app/views/dashboard/_projects_filter.html.haml55
-rw-r--r--app/views/dashboard/projects.html.haml57
-rw-r--r--app/views/projects/_settings_nav.html.haml2
-rw-r--r--app/views/shared/_filter.html.haml7
-rw-r--r--app/views/shared/_project_filter.html.haml3
-rw-r--r--features/steps/dashboard/dashboard_issues.rb2
-rw-r--r--features/steps/dashboard/dashboard_merge_requests.rb2
9 files changed, 78 insertions, 70 deletions
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/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss
index a67a37bc21a..7f45d64fb7c 100644
--- a/app/assets/stylesheets/gl_bootstrap.scss
+++ b/app/assets/stylesheets/gl_bootstrap.scss
@@ -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;
+}
/*
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/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/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/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