Changeset 5241


Ignore:
Timestamp:
Mar 22, 2010, 1:39:04 AM (14 years ago)
Author:
plg
Message:

feature 1505: improvement, ability to browse the empty gallery. The "no photo
yet" feature can be deactivated at session level.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/common.inc.php

    r5240 r5241  
    170170  and !(defined('IN_ADMIN') and IN_ADMIN)   // no message inside administration
    171171  and script_basename() != 'identification' // keep the ability to login
     172  and !isset($_SESSION['no_photo_yet'])     // temporary hide
    172173  )
    173174{
     
    180181  if (0 == $nb_photos)
    181182  {
    182     $template->set_filenames(array('no_photo_yet'=>'no_photo_yet.tpl'));
    183    
    184     if (is_admin())
     183    if (isset($_GET['no_photo_yet']))
    185184    {
    186       if (isset($_GET['no_photo_yet']))
     185      if ('browse' == $_GET['no_photo_yet'])
     186      {
     187        $_SESSION['no_photo_yet'] = 'browse';
     188        redirect(make_index_url());
     189        exit();
     190      }
     191
     192      if ('deactivate' == $_GET['no_photo_yet'])
    187193      {
    188194        conf_update_param('no_photo_yet', 'false');
     
    190196        exit();
    191197      }
    192      
     198    }
     199   
     200    $template->set_filenames(array('no_photo_yet'=>'no_photo_yet.tpl'));
     201   
     202    if (is_admin())
     203    {     
    193204      $url = $conf['no_photo_yet_url'];
    194205      if (substr($url, 0, 4) != 'http')
     
    216227          'step' => 1,
    217228          'U_LOGIN' => 'identification.php',
     229          'deactivate_url' => get_root_url().'?no_photo_yet=browse',
    218230          )
    219231        );
  • trunk/themes/default/template/no_photo_yet.tpl

    r5240 r5241  
    33<head>
    44<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     5<link rel="stylesheet" type="text/css" href="themes/default/theme.css">
    56<link rel="stylesheet" type="text/css" href="themes/Sylvia/theme.css">
    67<title>Piwigo, {'Welcome'|@translate}</title>
     
    1415
    1516P {text-align:center;}
    16 TD {color:#888;}
     17TD {color:#888; letter-spacing:1px;}
    1718
    1819#global {
     
    6768
    6869    font-style:normal;
     70    font-size:1.0em;
    6971}
     72
     73.submit {font-size:1.0em; letter-spacing:2px; font-weight:normal;}
    7074
    7175#deactivate A {
     
    97101
    98102<p><input class="submit" type="submit" name="login" value="{'Login'|@translate}"></p>
     103
     104<div id="deactivate"><a href="{$deactivate_url}">{'... or browse your empty gallery'|@translate}</a></div>
    99105</form>
    100106
     
    103109<p id="noPhotoWelcome">{$intro}</p>
    104110<div class="bigButton"><a href="{$next_step_url}">{'I want to add photos'|@translate}</a></div>
    105 <div id="deactivate"><a href="{$deactivate_url}">{'I will find my way by myself, please deactivate this message'|@translate}</a></div>
     111<div id="deactivate"><a href="{$deactivate_url}">{'... or please deactivate this message, I will find my way by myself'|@translate}</a></div>
    106112{/if}
    107113
Note: See TracChangeset for help on using the changeset viewer.