aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/common.inc.php41
-rw-r--r--themes/default/template/no_photo_yet.tpl53
2 files changed, 87 insertions, 7 deletions
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())
+ {
+ 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
{
- $url = get_root_url().$url;
+
+ $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 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="themes/Sylvia/theme.css">
<title>Piwigo, {'Welcome'|@translate}</title>
{literal}
<style type="text/css">
@@ -11,6 +12,9 @@ padding: 0;
background-color:#111;
}
+P {text-align:center;}
+TD {color:#888;}
+
#global {
position:absolute;
left: 50%;
@@ -28,7 +32,7 @@ border:2px solid #FF3363;
#noPhotoWelcome {font-size:25px; color:#888;text-align:center; letter-spacing:1px; margin-top:30px;}
.bigButton {}
-.bigButton {text-align:center; margin-top:130px;}
+.bigButton {text-align:center; margin-top:120px;}
.bigButton a {
background-color:#333;
@@ -47,6 +51,26 @@ border:2px solid #FF3363;
background-color:#444;
outline:none;
color:#ff3333;
+ border:none;
+}
+
+#connectionBox {
+ margin:0 auto;
+ margin-top:70px;
+}
+
+#deactivate {
+ position:absolute;
+ bottom:10px;
+ text-align:center;
+ width:100%;
+
+ font-style:normal;
+}
+
+#deactivate A {
+ text-decoration:none;
+ border:none;
}
</style>
{/literal}
@@ -55,8 +79,33 @@ border:2px solid #FF3363;
<body>
<div id="global">
+
+{if $step == 1}
<p id="noPhotoWelcome">{'Welcome to your Piwigo photo gallery!'|@translate}</p>
-<div class="bigButton"><a href="{$next_step_url}">{'Add Photos'|@translate}</a></div>
+
+<form method="post" action="{$U_LOGIN}" id="quickconnect">
+<table id="connectionBox">
+ <tr>
+ <td>{'Username'|@translate}</td>
+ <td><input type="text" name="username"></td>
+ </tr>
+ <tr>
+ <td>{'Password'|@translate}</td>
+ <td><input type="text" name="password"></td>
+ </tr>
+</table>
+
+<p><input class="submit" type="submit" name="login" value="{'Login'|@translate}"></p>
+</form>
+
+
+{else}
+<p id="noPhotoWelcome">{$intro}</p>
+<div class="bigButton"><a href="{$next_step_url}">{'I want to add photos'|@translate}</a></div>
+<div id="deactivate"><a href="{$deactivate_url}">{'I will find my way by myself, please deactivate this message'|@translate}</a></div>
+{/if}
+
+
</div>
</body>