diff --git a/index.php b/index.php
index ff38ac32..3cc0120a 100644
--- a/index.php
+++ b/index.php
@@ -119,6 +119,18 @@ function getHelperButtonFormat($value, $name){
return '';
}
+function getHelperButtonsFormat($formats){
+ $buttons = '';
+ foreach( $formats as $name => $infos )
+ {
+ if ( isset($infos['name']) )
+ {
+ $buttons .= getHelperButtonFormat($name, $infos['name']) . PHP_EOL;
+ }
+ }
+ return $buttons;
+}
+
function displayBridgeCard($bridgeReference, $bridgeInformations, $formats, $isActive = true)
{
$name = isset($bridgeInformations['homepage']) ? ''.$bridgeInformations['name'].'' : $bridgeInformations['name'];
@@ -146,15 +158,11 @@ CARD;
$card .= '' . PHP_EOL;
}
+ $card .= '
';
+
if ($isActive)
{
- foreach( $formats as $name => $infos )
- {
- if ( isset($infos['name']) )
- {
- $card .= getHelperButtonFormat($name, $infos['name']) . PHP_EOL;
- }
- }
+ $card .= getHelperButtonsFormat($formats);
}
else
{
@@ -170,12 +178,14 @@ CARD;
$card .= '