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
228fdcbc
Commit
228fdcbc
authored
Feb 24, 2014
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2193609
by andypost: No page title on manage display & form for non-default view mode.
parent
f6161fad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
+27
-9
core/modules/field_ui/lib/Drupal/field_ui/Routing/RouteSubscriber.php
.../field_ui/lib/Drupal/field_ui/Routing/RouteSubscriber.php
+2
-1
core/modules/field_ui/lib/Drupal/field_ui/Tests/FieldUIRouteTest.php
...s/field_ui/lib/Drupal/field_ui/Tests/FieldUIRouteTest.php
+25
-8
No files found.
core/modules/field_ui/lib/Drupal/field_ui/Routing/RouteSubscriber.php
View file @
228fdcbc
...
...
@@ -101,6 +101,7 @@ protected function alterRoutes(RouteCollection $collection, $provider) {
"
$path
/form-display/
{
form_mode_name
}
"
,
array
(
'_form'
=>
'\Drupal\field_ui\FormDisplayOverview'
,
'_title'
=>
'Manage form display'
,
)
+
$defaults
,
array
(
'_field_ui_form_mode_access'
=>
'administer '
.
$entity_type_id
.
' form display'
)
);
...
...
@@ -120,7 +121,7 @@ protected function alterRoutes(RouteCollection $collection, $provider) {
"
$path
/display/
{
view_mode_name
}
"
,
array
(
'_form'
=>
'\Drupal\field_ui\DisplayOverview'
,
'
view_mode_name'
=>
NULL
,
'
_title'
=>
'Manage display'
,
)
+
$defaults
,
array
(
'_field_ui_view_mode_access'
=>
'administer '
.
$entity_type_id
.
' display'
)
);
...
...
core/modules/field_ui/lib/Drupal/field_ui/Tests/FieldUIRouteTest.php
View file @
228fdcbc
...
...
@@ -17,7 +17,7 @@ class FieldUIRouteTest extends WebTestBase {
/**
* Modules to enable.
*/
public
static
$modules
=
array
(
'field_ui_test'
,
'node'
);
public
static
$modules
=
array
(
'field_ui_test'
);
/**
* {@inheritdoc}
...
...
@@ -36,8 +36,6 @@ public static function getInfo() {
public
function
setUp
()
{
parent
::
setUp
();
$this
->
drupalCreateContentType
(
array
(
'type'
=>
'article'
,
'name'
=>
'Article'
));
$this
->
drupalLogin
(
$this
->
root_user
);
}
...
...
@@ -50,17 +48,36 @@ public function testFieldUIRoutes() {
// @see \Drupal\field_ui\FieldOverview::getRegions()
//$this->assertText('No fields are present yet.');
$this
->
drupalGet
(
'admin/
structure/types/manage/article
/fields'
);
$this
->
drupalGet
(
'admin/
config/people/accounts
/fields'
);
$this
->
assertTitle
(
'Manage fields | Drupal'
);
$this
->
assertLocalTasks
();
$this
->
drupalGet
(
'admin/structure/types/manage/article'
);
// Test manage display tabs and titles.
$this
->
drupalGet
(
'admin/config/people/accounts/display/compact'
);
$this
->
assertResponse
(
403
);
$this
->
drupalGet
(
'admin/config/people/accounts/display'
);
$this
->
assertTitle
(
'Manage display | Drupal'
);
$this
->
assertLocalTasks
();
$this
->
drupalGet
(
'admin/structure/types/manage/article/form-display'
);
$edit
=
array
(
'display_modes_custom[compact]'
=>
TRUE
);
$this
->
drupalPostForm
(
NULL
,
$edit
,
t
(
'Save'
));
$this
->
drupalGet
(
'admin/config/people/accounts/display/compact'
);
$this
->
assertTitle
(
'Manage display | Drupal'
);
$this
->
assertLocalTasks
();
// Test manage form display tabs and titles.
$this
->
drupalGet
(
'admin/config/people/accounts/form-display/register'
);
$this
->
assertResponse
(
403
);
$this
->
drupalGet
(
'admin/config/people/accounts/form-display'
);
$this
->
assertTitle
(
'Manage form display | Drupal'
);
$this
->
assertLocalTasks
();
$this
->
drupalGet
(
'admin/structure/types/manage/article/display'
);
$edit
=
array
(
'display_modes_custom[register]'
=>
TRUE
);
$this
->
drupalPostForm
(
NULL
,
$edit
,
t
(
'Save'
));
$this
->
drupalGet
(
'admin/config/people/accounts/form-display/register'
);
$this
->
assertTitle
(
'Manage form display | Drupal'
);
$this
->
assertLocalTasks
();
}
...
...
@@ -68,7 +85,7 @@ public function testFieldUIRoutes() {
* Asserts that local tasks exists.
*/
public
function
assertLocalTasks
()
{
$this
->
assertLink
(
'
Edit
'
);
$this
->
assertLink
(
'
Settings
'
);
$this
->
assertLink
(
'Manage fields'
);
$this
->
assertLink
(
'Manage display'
);
$this
->
assertLink
(
'Manage form display'
);
...
...
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