diff --git a/core/includes/menu.inc b/core/includes/menu.inc index d28316b..bbc5138 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -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 = '
  • '; - 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 .= "
  • \n"; + $output .= l($link['title'], $link['href'], $link['localized_options']); + $output .= ""; return $output; } diff --git a/core/modules/system/system.theme.css b/core/modules/system/system.theme.css index 61303d2..90710ca 100644 --- a/core/modules/system/system.theme.css +++ b/core/modules/system/system.theme.css @@ -332,6 +332,34 @@ ul.tabs { } /** + * 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 { + background-color: #f5f5f5; + display: inline-block; + padding: 0.3em 0.5em; + text-decoration: none; +} +a.button.add:before { + content: '+'; + font-size: 120%; + font-weight: 900; + padding-right: 0.3em; /* LTR */ +} + +/** * Styles for system messages. */ div.messages { diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css index 20f9136..dfa22d8 100644 --- a/core/themes/bartik/css/style.css +++ b/core/themes/bartik/css/style.css @@ -1034,19 +1034,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 ----------------- */ diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css index 65abcc7..684db98 100644 --- a/core/themes/seven/style.css +++ b/core/themes/seven/style.css @@ -720,20 +720,9 @@ 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 */ -} ul.action-links a { + margin: 0; padding-left: 15px; /* LTR */ - background: transparent url(images/add.png) no-repeat 0 center; - line-height: 30px; } /**