Commit 5b2f81bc authored by Philippe Mouchel's avatar Philippe Mouchel
Browse files

Title and new markup in sharer toolbar

[refs #66075]
parent fd0ccb96
......@@ -6,12 +6,15 @@
*/
?>
<ul id="sharer-toolbar">
<?php foreach ($sharers as $sid => $sharer) : ?>
<li class="shareLink__<?php print $sid; ?>">
<a href="<?php print $sharer['url'];?>" title="<?php print t($sharer['label']);?>">
<i class="<?php print $sharer['icon_class'];?>"></i><?php print t($sharer['label']);?>
</a>
</li>
<?php endforeach; ?>
</ul>
<div id="sharer-toolbar-container">
<div id="sharer-toolbar"><?php print $title; ?></div>
<ul id="sharer-toolbar">
<?php foreach ($sharers as $sid => $sharer) : ?>
<li class="shareLink__<?php print $sid; ?>">
<a href="<?php print $sharer['url']; ?>" title="<?php print t($sharer['label']); ?>">
<i class="<?php print $sharer['icon_class']; ?>"></i><?php print t($sharer['label']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
......@@ -149,7 +149,13 @@ function sharer_toolbar_process_node(&$variables) {
drupal_add_js(drupal_get_path('module', 'sharer_toolbar') . '/js/sharer-opener.js');
// Render HTML for sharer toolbar
$variables['sharer_toolbar'] = theme('sharer_toolbar', array(
'sharers' => $active_sharers,
));
if (!empty($active_sharers)) {
$variables['sharer_toolbar'] = theme('sharer_toolbar', array(
'title' => variable_get('sharer_toolbar_title', t('Share')),
'sharers' => $active_sharers,
));
}
else {
$variables['sharer_toolbar'] = NULL;
}
}
......@@ -26,3 +26,21 @@ msgstr "La configuration de la barre de partage a été sauvegardée."
msgid "Icon class"
msgstr "Classe de l'icône"
msgid "Share"
msgstr "Partager"
msgid "Share on Facebook"
msgstr "Partager sur Facebook"
msgid "Share on Twitter"
msgstr "Partager sur Twitter"
msgid "Share on Share on Google +"
msgstr "Partager sur Google +"
msgid "Share on LinkedIn"
msgstr "Partager sur LinkedIn"
msgid "Share by email"
msgstr "Partager par email"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment