summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-29 22:59:41 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-29 22:59:41 +0300
commit79bea312055751bcd92421927f5ff51b22362d63 (patch)
tree43c6180a72c060027beb3e279bf1776087d116ac
parent71db10b9f22a42fdd772ff2908813733d6fb613b (diff)
downloadgitlab-ce-79bea312055751bcd92421927f5ff51b22362d63.tar.gz
More informative Dashboard#projects page
-rw-r--r--app/assets/stylesheets/sections/projects.scss17
-rw-r--r--app/views/dashboard/projects.html.haml66
2 files changed, 59 insertions, 24 deletions
diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss
index 52ef30ba8ba..505c8d960f4 100644
--- a/app/assets/stylesheets/sections/projects.scss
+++ b/app/assets/stylesheets/sections/projects.scss
@@ -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;
diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml
index b66117fc3c5..78ba479c5af 100644
--- a/app/views/dashboard/projects.html.haml
+++ b/app/views/dashboard/projects.html.haml
@@ -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