Commit 793db070 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Restyled projects list on dashboard

parent 51558bd5
...@@ -14,6 +14,32 @@ ...@@ -14,6 +14,32 @@
text-shadow: 0 1px 1px #fff; text-shadow: 0 1px 1px #fff;
padding: 2px 10px; padding: 2px 10px;
} }
ul {
li {
padding:0;
a {
display:block;
.project_name {
color:#4fa2bd;
font-size:14px;
line-height:18px;
}
.arrow {
float:right;
padding:10px;
margin:0;
}
.last_activity {
padding-top:5px;
display:block;
span, strong {
font-size:12px;
color:#666;
}
}
}
}
}
@extend .leftbar; @extend .leftbar;
@extend .ui-box; @extend .ui-box;
} }
...@@ -39,7 +65,7 @@ ...@@ -39,7 +65,7 @@
} }
} }
.adv_settings { .adv_settings {
h6 { margin-left:40px; } h6 { margin-left:40px; }
} }
} }
......
...@@ -78,16 +78,16 @@ module ApplicationHelper ...@@ -78,16 +78,16 @@ module ApplicationHelper
end end
def show_last_push_widget?(event) def show_last_push_widget?(event)
event && event &&
event.last_push_to_non_root? && event.last_push_to_non_root? &&
!event.rm_ref? && !event.rm_ref? &&
event.project && event.project &&
event.project.merge_requests_enabled event.project.merge_requests_enabled
end end
def tab_class(tab_key) def tab_class(tab_key)
active = case tab_key active = case tab_key
# Project Area # Project Area
when :wall; wall_tab? when :wall; wall_tab?
when :wiki; controller.controller_name == "wikis" when :wiki; controller.controller_name == "wikis"
...@@ -126,4 +126,13 @@ module ApplicationHelper ...@@ -126,4 +126,13 @@ module ApplicationHelper
def hexdigest(string) def hexdigest(string)
Digest::SHA1.hexdigest string Digest::SHA1.hexdigest string
end end
def project_last_activity project
activity = project.last_activity
if activity && activity.created_at
time_ago_in_words(activity.created_at) + " ago"
else
"Never"
end
end
end end
...@@ -19,13 +19,16 @@ ...@@ -19,13 +19,16 @@
= link_to new_project_path, class: "btn very_small info" do = link_to new_project_path, class: "btn very_small info" do
%i.icon-plus %i.icon-plus
New Project New Project
- @projects.each do |project| %ul.unstyled
= link_to project_path(project), class: dom_class(project) do - @projects.each do |project|
%h4 %li.wll
%span.ico.project = link_to project_path(project), class: dom_class(project) do
= truncate(project.name, length: 25) %strong.project_name= truncate(project.name, length: 25)
%span.right %span.arrow
→ →
%span.last_activity
%strong Last activity:
%span= project_last_activity(project)
.bottom= paginate @projects, theme: "gitlab" .bottom= paginate @projects, theme: "gitlab"
%hr %hr
......
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