Changeset 5293 for trunk/admin


Ignore:
Timestamp:
Mar 23, 2010, 10:19:55 PM (14 years ago)
Author:
patdenice
Message:

Feature 1533: Change "General" by "Options" in Configuration menu.
Change "Default Display" tab by "Guest Settings" tab.
Add display tab in Configuration/Option menu.

Allow to activate/deactivate a lot of display features:

On main page:
# Display only recently posted images
# Sort order
# Display all elements in all sub-categories
# Display a calendar by posted date
# Display a calendar by creation date
# Slideshow

On photo page:
# Show file metadata
# slideshow
# Add this image to your favorites
# Navigation Bar
# Navigation Thumbnails

Location:
trunk/admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r5196 r5293  
    7676  );
    7777
     78$display_checkboxes = array(
     79    'menubar_filter_icon',
     80    'index_sort_order_input',
     81    'index_flat_icon',
     82    'index_posted_date_icon',
     83    'index_created_date_icon',
     84    'index_slideshow_icon',
     85    'picture_metadata_icon',
     86    'picture_slideshow_icon',
     87    'picture_favorite_icon',
     88    'picture_navigation_icons',
     89    'picture_navigation_thumb',
     90  );
     91
    7892//------------------------------ verification and registration of modifications
    7993if (isset($_POST['submit']) and !is_adviser())
     
    130144    {
    131145      // Never go here
     146      break;
     147    }
     148    case 'display' :
     149    {
     150      foreach( $display_checkboxes as $checkbox)
     151      {
     152        $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
     153      }
    132154      break;
    133155    }
     
    175197// TabSheet initialization
    176198$tabsheet->add('main', l10n('Main'), $conf_link.'main');
     199$tabsheet->add('display', l10n('Display'), $conf_link.'display');
    177200$tabsheet->add('history', l10n('History'), $conf_link.'history');
    178201$tabsheet->add('comments', l10n('Comments'), $conf_link.'comments');
    179202$tabsheet->add('upload', l10n('Upload'), $conf_link.'upload');
    180 $tabsheet->add('default', l10n('Default display'), $conf_link.'default');
     203$tabsheet->add('default', l10n('Guest Settings'), $conf_link.'default');
    181204// TabSheet selection
    182205$tabsheet->select($page['section']);
     
    299322    break;
    300323  }
     324  case 'display' :
     325  {
     326    foreach ($display_checkboxes as $checkbox)
     327    {
     328      $template->append(
     329          'display',
     330          array(
     331            $checkbox => $conf[$checkbox]
     332            ),
     333          true
     334        );
     335    }
     336    break;
     337  }
    301338}
    302339
  • trunk/admin/themes/default/default-layout.css

    r5284 r5293  
    127127FIELDSET#historyConf SPAN.property,
    128128FIELDSET#commentsConf SPAN.property,
    129 FIELDSET#uploadConf SPAN.property {
     129FIELDSET#uploadConf SPAN.property,
     130FIELDSET#indexDisplayConf SPAN.property,
     131FIELDSET#pictureDisplayConf SPAN.property {
    130132        float: right;
    131133        text-align: left;
     
    134136FIELDSET#historyConf INPUT,
    135137FIELDSET#commentsConf INPUT,
    136 FIELDSET#uploadConf INPUT {
     138FIELDSET#uploadConf INPUT,
     139FIELDSET#indexDisplayConf INPUT,
     140FIELDSET#pictureDisplayConf INPUT {
    137141        float: none;
    138142}
     
    146150
    147151FIELDSET#mainConfCheck SPAN.property,
    148 FIELDSET#historyConf SPAN.property {
     152FIELDSET#historyConf SPAN.property,
     153FIELDSET#indexDisplayConf SPAN.property,
     154FIELDSET#pictureDisplayConf SPAN.property {
    149155        width: 90%;
    150156}
    151157FIELDSET#mainConfCheck INPUT,
    152158FIELDSET#historyConf INPUT,
    153 FIELDSET#commentsConf INPUT {
     159FIELDSET#commentsConf INPUT,
     160FIELDSET#indexDisplayConf INPUT,
     161FIELDSET#pictureDisplayConf INPUT {
    154162        margin-left: 5%;
    155163}
  • trunk/admin/themes/default/template/admin.tpl

    r5284 r5293  
    8282    <dd>
    8383      <ul>
    84         <li><a href="{$U_CONFIG_GENERAL}">{'General'|@translate}</a></li>
    85         <li><a href="{$U_CONFIG_DISPLAY}">{'Default display'|@translate}</a></li>
     84        <li><a href="{$U_CONFIG_GENERAL}">{'Options'|@translate}</a></li>
    8685        <li><a href="{$U_CONFIG_MENUBAR}">{'Menu'|@translate}</a></li>
    8786        <li><a href="{$U_CONFIG_EXTENTS}">{'Templates'|@translate}</a></li>
  • trunk/admin/themes/default/template/configuration.tpl

    r5284 r5293  
    201201{if isset($default)}
    202202{$PROFILE_CONTENT}
     203{/if}
     204
     205{if isset($display)}
     206<fieldset id="indexDisplayConf">
     207  <legend>{'Main Page'|@translate}</legend>
     208  <ul>
     209    <li>
     210      <label>
     211        <span class="property">{'display only recently posted images'|@translate|@ucfirst}</span>
     212        <input type="checkbox" name="menubar_filter_icon" {if ($display.menubar_filter_icon)}checked="checked"{/if}>
     213      </label>
     214    </li>
     215
     216    <li>
     217      <label>
     218        <span class="property">{'Sort order'|@translate}</span>
     219        <input type="checkbox" name="index_sort_order_input" {if ($display.index_sort_order_input)}checked="checked"{/if}>
     220      </label>
     221    </li>
     222
     223    <li>
     224      <label>
     225        <span class="property">{'display all elements in all sub-categories'|@translate|@ucfirst}</span>
     226        <input type="checkbox" name="index_flat_icon" {if ($display.index_flat_icon)}checked="checked"{/if}>
     227      </label>
     228    </li>
     229
     230    <li>
     231      <label>
     232        <span class="property">{'display a calendar by posted date'|@translate|@ucfirst}</span>
     233        <input type="checkbox" name="index_posted_date_icon" {if ($display.index_posted_date_icon)}checked="checked"{/if}>
     234      </label>
     235    </li>
     236
     237    <li>
     238      <label>
     239        <span class="property">{'display a calendar by creation date'|@translate|@ucfirst}</span>
     240        <input type="checkbox" name="index_created_date_icon" {if ($display.index_created_date_icon)}checked="checked"{/if}>
     241      </label>
     242    </li>
     243
     244    <li>
     245      <label>
     246        <span class="property">{'slideshow'|@translate|@ucfirst}</span>
     247        <input type="checkbox" name="index_slideshow_icon" {if ($display.index_slideshow_icon)}checked="checked"{/if}>
     248      </label>
     249    </li>
     250  </ul>
     251</fieldset>
     252
     253<fieldset id="pictureDisplayConf">
     254  <legend>{'Photo Page'|@translate}</legend>
     255  <ul>
     256    <li>
     257      <label>
     258        <span class="property">{'Show file metadata'|@translate}</span>
     259        <input type="checkbox" name="picture_metadata_icon" {if ($display.picture_metadata_icon)}checked="checked"{/if}>
     260      </label>
     261    </li>
     262
     263    <li>
     264      <label>
     265        <span class="property">{'slideshow'|@translate}</span>
     266        <input type="checkbox" name="picture_slideshow_icon" {if ($display.picture_slideshow_icon)}checked="checked"{/if}>
     267      </label>
     268    </li>
     269
     270    <li>
     271      <label>
     272        <span class="property">{'add this image to your favorites'|@translate|@ucfirst}</span>
     273        <input type="checkbox" name="picture_favorite_icon" {if ($display.picture_favorite_icon)}checked="checked"{/if}>
     274      </label>
     275    </li>
     276
     277    <li>
     278      <label>
     279        <span class="property">{'Navigation Bar'|@translate|@ucfirst}</span>
     280        <input type="checkbox" name="picture_navigation_icons" {if ($display.picture_navigation_icons)}checked="checked"{/if}>
     281      </label>
     282    </li>
     283
     284    <li>
     285      <label>
     286        <span class="property">{'Navigation Thumbnails'|@translate|@ucfirst}</span>
     287        <input type="checkbox" name="picture_navigation_thumb" {if ($display.picture_navigation_thumb)}checked="checked"{/if}>
     288      </label>
     289    </li>
     290  </ul>
     291</fieldset>
    203292{/if}
    204293
Note: See TracChangeset for help on using the changeset viewer.