Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b6ffa568
Commit
b6ffa568
authored
Mar 07, 2014
by
webchick
Browse files
Issue
#2093477
by Tor Arne Thune: Terse text for setting theme as default on Appearance page.
parent
91837e93
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/modules/system/lib/Drupal/system/Controller/SystemController.php
View file @
b6ffa568
...
...
@@ -259,7 +259,7 @@ public function themesPage() {
);
}
$theme
->
operations
[]
=
array
(
'title'
=>
$this
->
t
(
'Set default'
),
'title'
=>
$this
->
t
(
'Set
as
default'
),
'route_name'
=>
'system.theme_set_default'
,
'query'
=>
$query
,
'attributes'
=>
array
(
'title'
=>
$this
->
t
(
'Set !theme as default theme'
,
array
(
'!theme'
=>
$theme
->
info
[
'name'
]))),
...
...
@@ -275,7 +275,7 @@ public function themesPage() {
'attributes'
=>
array
(
'title'
=>
$this
->
t
(
'Enable !theme theme'
,
array
(
'!theme'
=>
$theme
->
info
[
'name'
]))),
);
$theme
->
operations
[]
=
array
(
'title'
=>
$this
->
t
(
'Enable and set default'
),
'title'
=>
$this
->
t
(
'Enable and set
as
default'
),
'route_name'
=>
'system.theme_set_default'
,
'query'
=>
$query
,
'attributes'
=>
array
(
'title'
=>
$this
->
t
(
'Enable !theme as default theme'
,
array
(
'!theme'
=>
$theme
->
info
[
'name'
]))),
...
...
core/modules/system/lib/Drupal/system/Tests/System/ThemeTest.php
View file @
b6ffa568
...
...
@@ -235,7 +235,7 @@ function testSwitchDefaultTheme() {
// Enable Bartik and set it as the default theme.
theme_enable
(
array
(
'bartik'
));
$this
->
drupalGet
(
'admin/appearance'
);
$this
->
clickLink
(
t
(
'Set default'
));
$this
->
clickLink
(
t
(
'Set
as
default'
));
$this
->
assertEqual
(
\
Drupal
::
config
(
'system.theme'
)
->
get
(
'default'
),
'bartik'
);
drupal_flush_all_caches
();
...
...
@@ -245,7 +245,7 @@ function testSwitchDefaultTheme() {
$this
->
assertText
(
'Bartik('
.
t
(
'active tab'
)
.
')'
,
'Default local task on blocks admin page is the default theme.'
);
// Switch back to Stark and test again to test that the menu cache is cleared.
$this
->
drupalGet
(
'admin/appearance'
);
$this
->
clickLink
(
t
(
'Set default'
),
0
);
$this
->
clickLink
(
t
(
'Set
as
default'
),
0
);
$this
->
drupalGet
(
'admin/structure/block'
);
$this
->
assertText
(
'Stark('
.
t
(
'active tab'
)
.
')'
,
'Default local task on blocks admin page has changed.'
);
}
...
...
core/modules/system/system.routing.yml
View file @
b6ffa568
...
...
@@ -319,7 +319,7 @@ system.themes_page:
system.theme_set_default
:
path
:
'
/admin/appearance/default'
defaults
:
_title
:
'
Set
default
theme'
_title
:
'
Set
as
default
theme'
_content
:
'
\Drupal\system\Controller\SystemController::themeSetDefault'
requirements
:
_permission
:
'
administer
themes'
...
...
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