Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
Sharer toolbar module
Commits
5b2f81bc
Commit
5b2f81bc
authored
Apr 15, 2015
by
Philippe Mouchel
Browse files
Title and new markup in sharer toolbar
[refs #66075]
parent
fd0ccb96
Changes
3
Hide whitespace changes
Inline
Side-by-side
sharer-toolbar.tpl.php
View file @
5b2f81bc
...
...
@@ -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>
sharer_toolbar.module
View file @
5b2f81bc
...
...
@@ -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
;
}
}
translations/fr.po
View file @
5b2f81bc
...
...
@@ -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"
Write
Preview
Supports
Markdown
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