Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
222
Merge Requests
222
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
a9b27b51
Commit
a9b27b51
authored
Apr 06, 2015
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2465425
by jibran, pjonckiere, idebr: Vocabulary listing missing add taxonomy term link
parent
3e58aba8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
core/modules/taxonomy/src/Tests/VocabularyUiTest.php
core/modules/taxonomy/src/Tests/VocabularyUiTest.php
+2
-0
core/modules/taxonomy/src/VocabularyListBuilder.php
core/modules/taxonomy/src/VocabularyListBuilder.php
+2
-1
No files found.
core/modules/taxonomy/src/Tests/VocabularyUiTest.php
View file @
a9b27b51
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\taxonomy\Tests
;
use
Drupal\Component\Utility\Unicode
;
use
Drupal\Core\Url
;
use
Drupal\taxonomy\Entity\Vocabulary
;
/**
...
...
@@ -50,6 +51,7 @@ function testVocabularyInterface() {
// Edit the vocabulary.
$this
->
drupalGet
(
'admin/structure/taxonomy'
);
$this
->
assertText
(
$edit
[
'name'
],
'Vocabulary found in the vocabulary overview listing.'
);
$this
->
assertLinkByHref
(
Url
::
fromRoute
(
'entity.taxonomy_term.add_form'
,
[
'taxonomy_vocabulary'
=>
$edit
[
'vid'
]])
->
toString
());
$this
->
clickLink
(
t
(
'Edit vocabulary'
));
$edit
=
array
();
$edit
[
'name'
]
=
$this
->
randomMachineName
();
...
...
core/modules/taxonomy/src/VocabularyListBuilder.php
View file @
a9b27b51
...
...
@@ -10,6 +10,7 @@
use
Drupal\Core\Config\Entity\DraggableListBuilder
;
use
Drupal\Core\Entity\EntityInterface
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\Core\Url
;
/**
* Defines a class to build a listing of taxonomy vocabulary entities.
...
...
@@ -48,7 +49,7 @@ public function getDefaultOperations(EntityInterface $entity) {
$operations
[
'add'
]
=
array
(
'title'
=>
t
(
'Add terms'
),
'weight'
=>
10
,
'url'
=>
$entity
->
urlInfo
(
'add-form'
),
'url'
=>
Url
::
fromRoute
(
'entity.taxonomy_term.add_form'
,
[
'taxonomy_vocabulary'
=>
$entity
->
id
()]
),
);
unset
(
$operations
[
'delete'
]);
...
...
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