Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ai_evaluations
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
project
ai_evaluations
Commits
5fab90c0
Commit
5fab90c0
authored
2 months ago
by
Michal Gow
Committed by
Mark Jones
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3492699
by seogow: Fix evaluations listing to show proper links to individual evaluations
parent
7b1d0794
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!8
Created link from ID, added default operations.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/AIEvaluationListBuilder.php
+24
-1
24 additions, 1 deletion
src/AIEvaluationListBuilder.php
with
24 additions
and
1 deletion
src/AIEvaluationListBuilder.php
+
24
−
1
View file @
5fab90c0
...
...
@@ -28,7 +28,13 @@ final class AIEvaluationListBuilder extends EntityListBuilder {
*/
public
function
buildRow
(
EntityInterface
$entity
):
array
{
/** @var \Drupal\ai_evaluations\AIEvaluationInterface $entity */
$row
[
'id'
]
=
$entity
->
id
();
$row
[
'id'
]
=
[
'data'
=>
[
'#type'
=>
'link'
,
'#title'
=>
$entity
->
id
(),
'#url'
=>
$entity
->
toUrl
(),
],
];
$username_options
=
[
'label'
=>
'hidden'
,
'settings'
=>
[
'link'
=>
$entity
->
get
(
'uid'
)
->
entity
->
isAuthenticated
()],
...
...
@@ -39,4 +45,21 @@ final class AIEvaluationListBuilder extends EntityListBuilder {
return
$row
+
parent
::
buildRow
(
$entity
);
}
/**
* {@inheritdoc}
*/
protected
function
getDefaultOperations
(
EntityInterface
$entity
):
array
{
$operations
=
parent
::
getDefaultOperations
(
$entity
);
if
(
$entity
->
access
(
'view'
))
{
$operations
[
'view'
]
=
[
'title'
=>
$this
->
t
(
'View'
),
'weight'
=>
0
,
'url'
=>
$entity
->
toUrl
(),
];
}
return
$operations
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment