diff --git a/admin/configuration.php b/admin/configuration.php
index cfb753f3a..95ba049d4 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -43,6 +43,8 @@ $main_checkboxes = array(
'log',
'history_admin',
'history_guest',
+ 'show_mobile_app_banner_in_gallery',
+ 'show_mobile_app_banner_in_admin',
);
$sizes_checkboxes = array(
diff --git a/admin/themes/default/images/piwigo_app_banner.jpg b/admin/themes/default/images/piwigo_app_banner.jpg
new file mode 100644
index 000000000..b5ad4f336
Binary files /dev/null and b/admin/themes/default/images/piwigo_app_banner.jpg differ
diff --git a/admin/themes/default/template/configuration_main.tpl b/admin/themes/default/template/configuration_main.tpl
index a7f536c34..3d9dfcaa8 100644
--- a/admin/themes/default/template/configuration_main.tpl
+++ b/admin/themes/default/template/configuration_main.tpl
@@ -19,6 +19,13 @@
});
})(target);
};
+
+ jQuery('.tiptip-with-img').tipTip({
+ maxWidth: "300px",
+ delay: 0,
+ fadeIn: 200,
+ fadeOut: 200
+ });
}());
{if !isset($ORDER_BY_IS_CUSTOM)}
@@ -183,6 +190,24 @@ jQuery("input[name='mail_theme']").change(function() {
+
+ {'Promote mobile app on mobile devices'|translate}
+
+
+
+
+
+
+
+
@@ -204,6 +229,7 @@ jQuery("input[name='mail_theme']").change(function() {
{/foreach}
+
diff --git a/admin/themes/default/template/header.tpl b/admin/themes/default/template/header.tpl
index 775b84548..dd365bdfd 100644
--- a/admin/themes/default/template/header.tpl
+++ b/admin/themes/default/template/header.tpl
@@ -5,6 +5,9 @@
+{if $SHOW_MOBILE_APP_BANNER}
+
+{/if}
{$GALLERY_TITLE} :: {$PAGE_TITLE}
diff --git a/include/page_header.php b/include/page_header.php
index d007a5961..f39ee9b20 100644
--- a/include/page_header.php
+++ b/include/page_header.php
@@ -13,6 +13,12 @@ $template->set_filenames(array('header'=>'header.tpl'));
trigger_notify('loc_begin_page_header');
+$show_mobile_app_banner = conf_get_param('show_mobile_app_banner_in_gallery', false);
+if (defined('IN_ADMIN') and IN_ADMIN)
+{
+ $show_mobile_app_banner = conf_get_param('show_mobile_app_banner_in_admin', true);
+}
+
$template->assign(
array(
'GALLERY_TITLE' =>
@@ -39,6 +45,8 @@ $template->assign(
'U_HOME' => get_gallery_home_url(),
'LEVEL_SEPARATOR' => $conf['level_separator'],
+
+ 'SHOW_MOBILE_APP_BANNER' => $show_mobile_app_banner,
));
diff --git a/install/db/157-database.php b/install/db/157-database.php
new file mode 100644
index 000000000..7773c85cd
--- /dev/null
+++ b/install/db/157-database.php
@@ -0,0 +1,21 @@
+
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index f5c3d18e8..75ef71b78 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -1011,3 +1011,7 @@ $lang['Posted %s'] = 'Posted %s';
$lang['File type: %s'] = 'File type: %s';
$lang['or'] = 'or';
$lang['Open in gallery'] = "Open in gallery";
+$lang['Promote mobile app on mobile devices'] = 'Promote mobile app on mobile devices';
+$lang['in gallery'] = 'in gallery';
+$lang['in administration'] = 'in administration';
+$lang['Displays a banner to install or open the official Piwigo app'] = 'Displays a banner to install or open the official Piwigo app';
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index acc39223c..1fe5c7085 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -1016,3 +1016,7 @@ $lang['Some checksums are missing.'] = 'Il manque des sommes de contrôle';
$lang['Display category date'] = 'Afficher la date de la catégorie';
$lang['Deletion in progress'] = 'Suppression en cours';
$lang['Open in gallery'] = "Ouvrir dans la galerie";
+$lang['Promote mobile app on mobile devices'] = 'Promouvoir l\'application mobile sur les smartphones et tablettes';
+$lang['in gallery'] = 'dans la galerie';
+$lang['in administration'] = 'dans l\'administration';
+$lang['Displays a banner to install or open the official Piwigo app'] = 'Affiche une bannière pour installer et/ou ouvrir l\'application mobile officielle Piwigo';
diff --git a/themes/default/template/header.tpl b/themes/default/template/header.tpl
index 03084aa87..5092b3814 100644
--- a/themes/default/template/header.tpl
+++ b/themes/default/template/header.tpl
@@ -1,6 +1,9 @@
+{if $SHOW_MOBILE_APP_BANNER}
+
+{/if}