Commit 79bea312 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

More informative Dashboard#projects page

parent 71db10b9
......@@ -94,6 +94,23 @@ ul.nav.nav-projects-tabs {
}
}
.my-projects {
li {
.project-title {
font-size: 14px;
}
.project-info {
margin-bottom: 10px;
}
.access-icon i {
color: #AAA;
}
}
}
.public-clone {
background: #333;
color: #f5f5f5;
......
......@@ -2,13 +2,25 @@
.span3
%ul.nav.nav-pills.nav-stacked
= nav_tab :scope, nil do
= link_to "All", projects_dashboard_path
= link_to projects_dashboard_path do
All
%span.pull-right
= current_user.authorized_projects.count
= nav_tab :scope, 'personal' do
= link_to "Personal", projects_dashboard_path(scope: 'personal')
= link_to projects_dashboard_path(scope: 'personal') do
Personal
%span.pull-right
= current_user.personal_projects.count
= nav_tab :scope, 'joined' do
= link_to "Joined", projects_dashboard_path(scope: 'joined')
= link_to projects_dashboard_path(scope: 'joined') do
Joined
%span.pull-right
= current_user.authorized_projects.joined(current_user).count
= nav_tab :scope, 'owned' do
= link_to "Owned", projects_dashboard_path(scope: 'owned')
= link_to projects_dashboard_path(scope: 'owned') do
Owned
%span.pull-right
= current_user.owned_projects.count
- if @labels.present?
%p.light Filter by label:
......@@ -19,29 +31,35 @@
%i.icon-tag
= label.name
.span9
.ui-box
.title
Projects (#{@projects.total_count})
.pull-right.light
%small Last activity
%ul.well-list
- @projects.each do |project|
%li
- if project.public
= public_icon
- else
= private_icon
%ul.bordered-list.my-projects
- @projects.each do |project|
%li
%h4.project-title
%span.access-icon
- if project.public
= public_icon
- else
= private_icon
= link_to project_path(project), class: dom_class(project) do
%strong
= project.name_with_namespace
- if project.description.present?
%span.light
= truncate project.description, length: 80
= project.name_with_namespace
.pull-right.light
%small #{project_last_activity(project)}
- if project.forked_from_project
%small.pull-right
%i.icon-code-fork
Forked from:
= link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project)
.project-info
.pull-right
- project.labels.each do |label|
%span.label.label-info
%i.icon-tag
= label.name
- if project.description.present?
%p= truncate project.description, length: 100
.last-activity
%span.light Last activity:
%span.date= project_last_activity(project)
- if @projects.blank?
%li
......
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