Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
782c3096
Commit
782c3096
authored
Nov 19, 2012
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1167350
by sun, ry5n, iflista: Action links were ignored .
parent
53656a33
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
36 deletions
+89
-36
core/includes/menu.inc
core/includes/menu.inc
+8
-10
core/modules/block/lib/Drupal/block/Tests/BlockTest.php
core/modules/block/lib/Drupal/block/Tests/BlockTest.php
+4
-2
core/modules/system/system.theme-rtl.css
core/modules/system/system.theme-rtl.css
+14
-0
core/modules/system/system.theme.css
core/modules/system/system.theme.css
+28
-0
core/themes/bartik/css/style.css
core/themes/bartik/css/style.css
+1
-11
core/themes/seven/style.css
core/themes/seven/style.css
+34
-13
No files found.
core/includes/menu.inc
View file @
782c3096
...
...
@@ -1654,18 +1654,16 @@ function theme_menu_local_task($variables) {
*/
function
theme_menu_local_action
(
$variables
)
{
$link
=
$variables
[
'element'
][
'#link'
];
$link
+=
array
(
'href'
=>
''
,
'localized_options'
=>
array
(),
);
$link
[
'localized_options'
][
'attributes'
][
'class'
][]
=
'button'
;
$link
[
'localized_options'
][
'attributes'
][
'class'
][]
=
'add'
;
$output
=
'<li>'
;
if
(
isset
(
$link
[
'href'
]))
{
$output
.
=
l
(
$link
[
'title'
],
$link
[
'href'
],
isset
(
$link
[
'localized_options'
])
?
$link
[
'localized_options'
]
:
array
());
}
elseif
(
!
empty
(
$link
[
'localized_options'
][
'html'
]))
{
$output
.
=
$link
[
'title'
];
}
else
{
$output
.
=
check_plain
(
$link
[
'title'
]);
}
$output
.
=
"</li>
\n
"
;
$output
.
=
l
(
$link
[
'title'
],
$link
[
'href'
],
$link
[
'localized_options'
]);
$output
.
=
"</li>"
;
return
$output
;
}
...
...
core/modules/block/lib/Drupal/block/Tests/BlockTest.php
View file @
782c3096
...
...
@@ -71,9 +71,11 @@ function testCustomBlock() {
// Confirm that the add block link appears on block overview pages.
$this
->
drupalGet
(
'admin/structure/block'
);
$this
->
assertRaw
(
l
(
'Add block'
,
'admin/structure/block/add'
),
'Add block link is present on block overview page for default theme.'
);
$this
->
assertLink
(
t
(
'Add block'
));
$this
->
assertLinkByHref
(
'admin/structure/block/add'
);
$this
->
drupalGet
(
'admin/structure/block/list/seven'
);
$this
->
assertRaw
(
l
(
'Add block'
,
'admin/structure/block/list/seven/add'
),
'Add block link is present on block overview page for non-default theme.'
);
$this
->
assertLink
(
t
(
'Add block'
));
$this
->
assertLinkByHref
(
'admin/structure/block/list/seven/add'
);
// Confirm that hidden regions are not shown as options for block placement
// when adding a new block.
...
...
core/modules/system/system.theme-rtl.css
View file @
782c3096
...
...
@@ -75,6 +75,20 @@ ul.menu {
margin-right
:
0
;
}
/**
* RTL Styles for link buttons and action links.
*/
.action-links
li
:first-child
{
margin-left
:
auto
;
margin-right
:
0
;
}
a
.button.add
:before
{
margin-left
:
0
;
margin-right
:
-0.1em
;
padding-left
:
0.2em
;
padding-right
:
0
;
}
/**
* RTL Styles for system messages.
*/
...
...
core/modules/system/system.theme.css
View file @
782c3096
...
...
@@ -334,6 +334,34 @@ ul.tabs {
background-color
:
#f5f5f5
;
}
/**
* Styles for link buttons and action links.
*/
.action-links
{
list-style
:
none
;
padding
:
0
;
margin
:
1em
0
;
}
.action-links
li
{
display
:
inline-block
;
margin
:
0
0.3em
;
}
.action-links
li
:first-child
{
margin-left
:
0
;
/* LTR */
}
a
.button
{
display
:
inline-block
;
line-height
:
160%
;
padding
:
0.2em
0.5em
0.3em
;
text-decoration
:
none
;
}
a
.button.add
:before
{
content
:
'+'
;
font-weight
:
900
;
margin-left
:
-0.1em
;
/* LTR */
padding-right
:
0.2em
;
/* LTR */
}
/**
* Styles for system messages.
*/
...
...
core/themes/bartik/css/style.css
View file @
782c3096
...
...
@@ -1030,19 +1030,9 @@ div.tabs {
border-bottom
:
none
;
border-radius
:
5px
;
}
ul
.action-links
{
list-style
:
none
;
margin
:
5px
;
padding
:
0.5em
1em
;
}
ul
.action-links
li
{
display
:
inline-block
;
margin-left
:
10px
;
}
ul
.action-links
li
a
{
padding-left
:
15px
;
background
:
url(../images/add.png)
no-repeat
left
center
;
margin
:
0
10px
0
0
;
margin
:
0
;
}
/* ---------------- Messages ----------------- */
...
...
core/themes/seven/style.css
View file @
782c3096
...
...
@@ -709,20 +709,41 @@ select.form-select:focus {
.js
input
.throbbing
{
background-position
:
100%
-16px
;
}
ul
.action-links
{
margin
:
1em
0
;
padding
:
0
20px
0
20px
;
/* LTR */
list-style-type
:
none
;
overflow
:
hidden
;
}
ul
.action-links
li
{
float
:
left
;
/* LTR */
margin
:
0
1em
0
0
;
/* LTR */
a
.button.add
{
background
:
#1078d8
;
background-image
:
-webkit-linear-gradient
(
top
,
#419ff1
,
#1076d5
);
background-image
:
-moz-linear-gradient
(
top
,
#419ff1
,
#1076d5
);
background-image
:
-o-linear-gradient
(
top
,
#419ff1
,
#1076d5
);
background-image
:
linear-gradient
(
to
bottom
,
#419ff1
,
#1076d5
);
border
:
1px
solid
#0048c8
;
border-radius
:
.4em
;
-webkit-box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
.4
);
box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
.4
);
color
:
#fff
;
font-size
:
1em
;
line-height
:
normal
;
margin
:
0
;
padding
:
4px
1em
;
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0.5
);
}
a
.button.add
:focus
,
a
.button.add
:hover
{
background-color
:
#419cf1
;
background-image
:
-webkit-linear-gradient
(
top
,
#59abf3
,
#2a90ef
);
background-image
:
-moz-linear-gradient
(
top
,
#59abf3
,
#2a90ef
);
background-image
:
-o-linear-gradient
(
top
,
#59abf3
,
#2a90ef
);
background-image
:
linear-gradient
(
to
bottom
,
#59abf3
,
#2a90ef
);
color
:
#fff
;
}
ul
.action-links
a
{
padding-left
:
15px
;
/* LTR */
background
:
transparent
url(images/add.png)
no-repeat
0
center
;
line-height
:
30px
;
a
.button.add
:active
{
background-color
:
#0e69be
;
background-image
:
-webkit-linear-gradient
(
top
,
#0e69be
,
#2a93ef
);
background-image
:
-moz-linear-gradient
(
top
,
#0e69be
,
#2a93ef
);
background-image
:
-o-linear-gradient
(
top
,
#0e69be
,
#2a93ef
);
background-image
:
-ms-linear-gradient
(
top
,
#0e69be
,
#2a93ef
);
background-image
:
linear-gradient
(
to
bottom
,
#0e69be
,
#2a93ef
);
-webkit-box-shadow
:
inset
0
1px
2px
rgba
(
0
,
0
,
0
,
.25
);
box-shadow
:
inset
0
1px
2px
rgba
(
0
,
0
,
0
,
.25
);
}
/**
...
...
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