Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
5e843a17
Commit
5e843a17
authored
Sep 26, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain on dashboard that limit amount of projects displayed
parent
a85c58c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
15 deletions
+26
-15
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+5
-1
app/views/dashboard/_project.html.haml
app/views/dashboard/_project.html.haml
+12
-0
app/views/dashboard/_projects.html.haml
app/views/dashboard/_projects.html.haml
+9
-14
No files found.
app/controllers/dashboard_controller.rb
View file @
5e843a17
...
@@ -5,10 +5,14 @@ class DashboardController < ApplicationController
...
@@ -5,10 +5,14 @@ class DashboardController < ApplicationController
before_filter
:event_filter
,
only: :show
before_filter
:event_filter
,
only: :show
def
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
)
@groups
=
current_user
.
authorized_groups
.
sort_by
(
&
:human_name
)
@has_authorized_projects
=
@projects
.
count
>
0
@has_authorized_projects
=
@projects
.
count
>
0
@projects_count
=
@projects
.
count
@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
.
in_projects
(
current_user
.
authorized_projects
.
pluck
(
:id
))
@events
=
@event_filter
.
apply_filter
(
@events
)
@events
=
@event_filter
.
apply_filter
(
@events
)
...
...
app/views/dashboard/_project.html.haml
0 → 100644
View file @
5e843a17
=
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 @
5e843a17
...
@@ -10,21 +10,16 @@
...
@@ -10,21 +10,16 @@
%ul
.well-list.dash-list
%ul
.well-list.dash-list
-
projects
.
each
do
|
project
|
-
projects
.
each
do
|
project
|
%li
.project-row
%li
.project-row
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
=
render
"project"
,
project:
project
%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
)
-
if
projects
.
blank?
-
if
projects
.
blank?
%li
%li
%h3
.nothing_here_message
There are no projects here.
%h3
.nothing_here_message
There are no projects here.
-
if
@projects_count
>
20
-
if
@projects_count
>
@projects_limit
%li
.bottom
%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