Group filtering on dashboard
This commit is contained in:
parent
d6363e9359
commit
f9eda9b33a
6 changed files with 83 additions and 26 deletions
15
app/views/dashboard/_groups.html.haml
Normal file
15
app/views/dashboard/_groups.html.haml
Normal file
|
@ -0,0 +1,15 @@
|
|||
.projects_box
|
||||
%h5
|
||||
Groups
|
||||
%small
|
||||
(#{groups.count})
|
||||
%ul.unstyled
|
||||
- groups.each do |group|
|
||||
%li.wll
|
||||
= link_to dashboard_path(group: group), class: dom_class(group) do
|
||||
%strong.group_name= truncate(group.name, length: 25)
|
||||
%span.arrow
|
||||
→
|
||||
%span.last_activity
|
||||
%strong Projects:
|
||||
%span= group.projects.count
|
21
app/views/dashboard/_projects.html.haml
Normal file
21
app/views/dashboard/_projects.html.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
.projects_box
|
||||
%h5
|
||||
Projects
|
||||
%small
|
||||
(#{projects.total_count})
|
||||
- if current_user.can_create_project?
|
||||
%span.right
|
||||
= link_to new_project_path, class: "btn very_small info" do
|
||||
%i.icon-plus
|
||||
New Project
|
||||
%ul.unstyled
|
||||
- projects.each do |project|
|
||||
%li.wll
|
||||
= link_to project_path(project), class: dom_class(project) do
|
||||
%strong.project_name= truncate(project.name, length: 25)
|
||||
%span.arrow
|
||||
→
|
||||
%span.last_activity
|
||||
%strong Last activity:
|
||||
%span= project_last_activity(project)
|
||||
.bottom= paginate projects, theme: "gitlab"
|
|
@ -9,28 +9,9 @@
|
|||
.loading.hide
|
||||
.side
|
||||
= render "events/event_last_push", event: @last_push
|
||||
.projects_box
|
||||
%h5
|
||||
Projects
|
||||
%small
|
||||
(#{@projects.total_count})
|
||||
- if current_user.can_create_project?
|
||||
%span.right
|
||||
= link_to new_project_path, class: "btn very_small info" do
|
||||
%i.icon-plus
|
||||
New Project
|
||||
%ul.unstyled
|
||||
- @projects.each do |project|
|
||||
%li.wll
|
||||
= link_to project_path(project), class: dom_class(project) do
|
||||
%strong.project_name= truncate(project.name, length: 25)
|
||||
%span.arrow
|
||||
→
|
||||
%span.last_activity
|
||||
%strong Last activity:
|
||||
%span= project_last_activity(project)
|
||||
.bottom= paginate @projects, theme: "gitlab"
|
||||
|
||||
- unless @group
|
||||
= render "groups", groups: @groups
|
||||
= render "projects", projects: @projects
|
||||
%div
|
||||
%span.rss-icon
|
||||
= link_to dashboard_path(:atom, { private_token: current_user.private_token }) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue