diff --git a/include/common.inc.php b/include/common.inc.php index f5c0b606c..728bf5bad 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -180,14 +180,45 @@ SELECT if (0 == $nb_photos) { $template->set_filenames(array('no_photo_yet'=>'no_photo_yet.tpl')); - - $url = $conf['no_photo_yet_url']; - if (substr($url, 0, 4) != 'http') + + if (is_admin()) { - $url = get_root_url().$url; + if (isset($_GET['no_photo_yet'])) + { + conf_update_param('no_photo_yet', 'false'); + redirect(make_index_url()); + exit(); + } + + $url = $conf['no_photo_yet_url']; + if (substr($url, 0, 4) != 'http') + { + $url = get_root_url().$url; + } + + $template->assign( + array( + 'step' => 2, + 'intro' => sprintf( + l10n('Hello %s, your Piwigo photo gallery is empty!'), + $user['username'] + ), + 'next_step_url' => $url, + 'deactivate_url' => get_root_url().'?no_photo_yet=deactivate', + ) + ); + } + else + { + + $template->assign( + array( + 'step' => 1, + 'U_LOGIN' => 'identification.php', + ) + ); } - $template->assign(array('next_step_url' => $url)); $template->pparse('no_photo_yet'); exit(); } diff --git a/themes/default/template/no_photo_yet.tpl b/themes/default/template/no_photo_yet.tpl index 1ced9efca..81b0e0c09 100644 --- a/themes/default/template/no_photo_yet.tpl +++ b/themes/default/template/no_photo_yet.tpl @@ -2,6 +2,7 @@ + Piwigo, {'Welcome'|@translate} {literal} {/literal} @@ -55,8 +79,33 @@ border:2px solid #FF3363;
+ +{if $step == 1}

{'Welcome to your Piwigo photo gallery!'|@translate}

-
{'Add Photos'|@translate}
+ +
+ + + + + + + + + +
{'Username'|@translate}
{'Password'|@translate}
+ +

+
+ + +{else} +

{$intro}

+
{'I want to add photos'|@translate}
+
{'I will find my way by myself, please deactivate this message'|@translate}
+{/if} + +