Commit b3208841 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

List groups on Dashboard#projects page

parent 07f156f5
......@@ -56,23 +56,6 @@
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 {
overflow: visible;
......
......@@ -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 @@
background: #F1F1F1;
color: $style_color;
font-weight: bold;
text-shadow: 0 1px 1px #fff;
}
&.nav-stacked-menu {
......
......@@ -33,9 +33,13 @@ class DashboardController < ApplicationController
current_user.owned_projects
else
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)
@groups = current_user.authorized_groups
@projects = @projects.tagged_with(params[:label]) if params[:label].present?
@projects = @projects.page(params[:page]).per(30)
......
......@@ -26,14 +26,30 @@
%span.pull-right
= 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?
%p.light Filter by label:
%ul.bordered-list
- @labels.each do |label|
%li{ class: (label.name == params[:label]) ? 'active' : 'light' }
= link_to projects_dashboard_path(scope: params[:scope], label: label.name) do
%i.icon-tag
= label.name
%fieldset
%legend Labels
%ul.bordered-list
- @labels.each do |label|
%li{ class: (label.name == params[:label]) ? 'active' : 'light' }
= link_to projects_dashboard_path(scope: params[:scope], label: label.name) do
%i.icon-tag
= label.name
.span9
%ul.bordered-list.my-projects.top-list
......
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