Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
RDMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
researchdata
RDMS
Merge requests
!361
Display buttons to easily access groups
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Display buttons to easily access groups
feature/472_crc_1280_button
into
develop
Overview
0
Commits
4
Pipelines
4
Changes
7
Merged
Anusha Ranganathan
requested to merge
feature/472_crc_1280_button
into
develop
2 months ago
Overview
0
Commits
4
Pipelines
4
Changes
7
Expand
fixes
https://gitlab.ruhr-uni-bochum.de/FDM/rdm-system/antleaf-projectmanagement/-/issues/472
0
0
Merge request reports
Compare
develop
version 3
05bdc14d
2 months ago
version 2
9f53fc68
2 months ago
version 1
9ccef595
2 months ago
develop (base)
and
latest version
latest version
f8805413
4 commits,
2 months ago
version 3
05bdc14d
3 commits,
2 months ago
version 2
9f53fc68
2 commits,
2 months ago
version 1
9ccef595
1 commit,
2 months ago
7 files
+
170
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
hyrax/app/controllers/hyrax/dashboard_controller.rb
0 → 100644
+
40
−
0
Options
# frozen_string_literal: true
module
Hyrax
class
DashboardController
<
ApplicationController
include
Blacklight
::
Base
include
Hyrax
::
Breadcrumbs
include
HyraxHelper
with_themed_layout
'dashboard'
before_action
:authenticate_user!
before_action
:build_breadcrumbs
,
only:
[
:show
]
before_action
:set_date_range
##
# @!attribute [rw] sidebar_partials
# @return [Hash]
#
# @example Add a custom partial to the tasks sidebar block
# Hyrax::DashboardController.sidebar_partials[:tasks] << "hyrax/dashboard/sidebar/custom_task"
class_attribute
:sidebar_partials
self
.
sidebar_partials
=
{
activity:
[],
configuration:
[],
repository_content:
[],
tasks:
[]
}
def
show
@collections_to_display
=
list_collections_to_display
if
can?
:read
,
:admin_dashboard
@presenter
=
Hyrax
::
Admin
::
DashboardPresenter
.
new
@admin_set_rows
=
Hyrax
::
AdminSetService
.
new
(
self
).
search_results_with_work_count
(
:read
)
render
'show_admin'
else
@presenter
=
Dashboard
::
UserPresenter
.
new
(
current_user
,
view_context
,
params
[
:since
])
render
'show_user'
end
end
private
def
set_date_range
@start_date
=
params
[
:start_date
]
||
Time
.
zone
.
today
-
1
.
month
@end_date
=
params
[
:end_date
]
||
Time
.
zone
.
today
+
1
.
day
end
end
end
\ No newline at end of file
Loading