Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
c878356c4e3a
Commit
5e843a17
authored
Sep 26, 2013
by
Dmitriy Zaporozhets
Browse files
Explain on dashboard that limit amount of projects displayed
parent
1f1bc9bfe152
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/controllers/dashboard_controller.rb
View file @
c878356c
...
...
@@ -5,10 +5,14 @@ class DashboardController < ApplicationController
before_filter
:event_filter
,
only: :show
def
show
# Fetch only 30 projects.
# If user needs more - point to Dashboard#projects page
@projects_limit
=
30
@groups
=
current_user
.
authorized_groups
.
sort_by
(
&
:human_name
)
@has_authorized_projects
=
@projects
.
count
>
0
@projects_count
=
@projects
.
count
@projects
=
@projects
.
limit
(
20
)
@projects
=
@projects
.
limit
(
@projects_limit
)
@events
=
Event
.
in_projects
(
current_user
.
authorized_projects
.
pluck
(
:id
))
@events
=
@event_filter
.
apply_filter
(
@events
)
...
...
app/views/dashboard/_project.html.haml
0 → 100644
View file @
c878356c
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
%span
.namespace-name
-
if
project
.
namespace
=
project
.
namespace
.
human_name
\/
%span
.project-name.filter-title
=
truncate
(
project
.
name
,
length:
25
)
%span
.arrow
%i
.icon-angle-right
%span
.last-activity
%span
Last activity:
%span
.date
=
project_last_activity
(
project
)
app/views/dashboard/_projects.html.haml
View file @
c878356c
...
...
@@ -10,21 +10,16 @@
%ul
.well-list.dash-list
-
projects
.
each
do
|
project
|
%li
.project-row
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
%span
.namespace-name
-
if
project
.
namespace
=
project
.
namespace
.
human_name
\/
%span
.project-name.filter-title
=
truncate
(
project
.
name
,
length:
25
)
%span
.arrow
%i
.icon-angle-right
%span
.last-activity
%span
Last activity:
%span
.date
=
project_last_activity
(
project
)
=
render
"project"
,
project:
project
-
if
projects
.
blank?
%li
%h3
.nothing_here_message
There are no projects here.
-
if
@projects_count
>
20
-
if
@projects_count
>
@projects_limit
%li
.bottom
%strong
=
link_to
"show all projects"
,
projects_dashboard_path
%span
.light
#{
@projects_limit
}
of
#{
pluralize
(
@projects_count
,
'project'
)
}
displayed.
.pull-right.append-right-10
=
link_to
projects_dashboard_path
do
Show all
%i
.icon-angle-right
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment