Commit b3208841 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

List groups on Dashboard#projects page

parent 07f156f5
...@@ -56,23 +56,6 @@ ...@@ -56,23 +56,6 @@
line-height: 24px; line-height: 24px;
} }
/** FORMS **/
input[type='search'].search-text-input {
background-image: url("icon-search.png");
background-repeat: no-repeat;
background-position: 10px;
padding-left: 25px;
@include border-radius(4px);
border: 1px solid #ccc;
}
input[type='text'].danger {
background: #F2DEDE!important;
border-color: #D66;
text-shadow: 0 1px 1px #fff
}
fieldset legend { font-size: 15px; }
.tab-content { .tab-content {
overflow: visible; overflow: visible;
......
...@@ -31,3 +31,22 @@ input { ...@@ -31,3 +31,22 @@ input {
} }
} }
input[type='search'].search-text-input {
background-image: url("icon-search.png");
background-repeat: no-repeat;
background-position: 10px;
padding-left: 25px;
@include border-radius(4px);
border: 1px solid #ccc;
}
input[type='text'].danger {
background: #F2DEDE!important;
border-color: #D66;
text-shadow: 0 1px 1px #fff
}
fieldset legend {
font-size: 16px;
margin-bottom: 10px;
}
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
background: #F1F1F1; background: #F1F1F1;
color: $style_color; color: $style_color;
font-weight: bold; font-weight: bold;
text-shadow: 0 1px 1px #fff;
} }
&.nav-stacked-menu { &.nav-stacked-menu {
......
...@@ -33,9 +33,13 @@ class DashboardController < ApplicationController ...@@ -33,9 +33,13 @@ class DashboardController < ApplicationController
current_user.owned_projects current_user.owned_projects
else else
current_user.authorized_projects current_user.authorized_projects
end.sorted_by_activity end
@projects = @projects.where(namespace_id: Group.find_by_name(params[:group])) if params[:group].present?
@projects = @projects.includes(:namespace).sorted_by_activity
@labels = current_user.authorized_projects.tags_on(:labels) @labels = current_user.authorized_projects.tags_on(:labels)
@groups = current_user.authorized_groups
@projects = @projects.tagged_with(params[:label]) if params[:label].present? @projects = @projects.tagged_with(params[:label]) if params[:label].present?
@projects = @projects.page(params[:page]).per(30) @projects = @projects.page(params[:page]).per(30)
......
...@@ -26,8 +26,24 @@ ...@@ -26,8 +26,24 @@
%span.pull-right %span.pull-right
= current_user.owned_projects.count = current_user.owned_projects.count
- 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_path(group: group.name) do
%i.icon-folder-close-alt
= group.name
%small.pull-right
= group.projects.count
- if @labels.present? - if @labels.present?
%p.light Filter by label: %fieldset
%legend Labels
%ul.bordered-list %ul.bordered-list
- @labels.each do |label| - @labels.each do |label|
%li{ class: (label.name == params[:label]) ? 'active' : 'light' } %li{ class: (label.name == params[:label]) ? 'active' : 'light' }
......
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