Changeset 13782


Ignore:
Timestamp:
Mar 28, 2012, 11:00:24 AM (9 years ago)
Author:
plg
Message:

feature 2600: less info displayed by default

On picture.php, if there is no data, hide author/tags/date creation/dimensions/filesize

By default on picture.php, do not show file/filesize/dimensions

By default on index.php, hide the "filter" icon in the menubar, hide the "flat" icon (the concept is complex to understand)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/install/config.sql

    r13242 r13782  
    3232INSERT INTO piwigo_config (param,value,comment) VALUES ('extents_for_templates','a:0:{}','Actived template-extension(s)');
    3333INSERT INTO piwigo_config (param,value,comment) VALUES ('blk_menubar','','Menubar options');
    34 INSERT INTO piwigo_config (param,value,comment) VALUES ('menubar_filter_icon','true','Display filter icon');
     34INSERT INTO piwigo_config (param,value,comment) VALUES ('menubar_filter_icon','false','Display filter icon');
    3535INSERT INTO piwigo_config (param,value,comment) VALUES ('index_sort_order_input','true','Display image order selection list');
    36 INSERT INTO piwigo_config (param,value,comment) VALUES ('index_flat_icon','true','Display flat icon');
     36INSERT INTO piwigo_config (param,value,comment) VALUES ('index_flat_icon','false','Display flat icon');
    3737INSERT INTO piwigo_config (param,value,comment) VALUES ('index_posted_date_icon','true','Display calendar by posted date');
    3838INSERT INTO piwigo_config (param,value,comment) VALUES ('index_created_date_icon','true','Display calendar by creation date icon');
     
    4949  VALUES (
    5050    'picture_informations',
    51     'a:11:{s:6:"author";b:1;s:10:"created_on";b:1;s:9:"posted_on";b:1;s:10:"dimensions";b:1;s:4:"file";b:1;s:8:"filesize";b:1;s:4:"tags";b:1;s:10:"categories";b:1;s:6:"visits";b:1;s:12:"rating_score";b:1;s:13:"privacy_level";b:1;}',
     51    'a:11:{s:6:"author";b:1;s:10:"created_on";b:1;s:9:"posted_on";b:1;s:10:"dimensions";b:0;s:4:"file";b:0;s:8:"filesize";b:0;s:4:"tags";b:1;s:10:"categories";b:1;s:6:"visits";b:1;s:12:"rating_score";b:1;s:13:"privacy_level";b:1;}',
    5252    'Information displayed on picture page'
    5353  );
  • trunk/themes/default/template/picture.tpl

    r13777 r13782  
    162162<dl id="standard" class="imageInfoTable infoTable">
    163163{strip}
    164         {if $display_info.author}
     164        {if $display_info.author and isset($INFO_AUTHOR)}
    165165        <div id="Author" class="imageInfo">
    166166                <dt>{'Author'|@translate}</dt>
    167                 <dd>{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</dd>
    168         </div>
    169         {/if}
    170         {if $display_info.created_on}
     167                <dd>{$INFO_AUTHOR}</dd>
     168        </div>
     169        {/if}
     170        {if $display_info.created_on and isset($INFO_CREATION_DATE)}
    171171        <div id="datecreate" class="imageInfo">
    172172                <dt>{'Created on'|@translate}</dt>
    173                 <dd>{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</dd>
     173                <dd>{$INFO_CREATION_DATE}</dd>
    174174        </div>
    175175        {/if}
     
    180180        </div>
    181181        {/if}
    182         {if $display_info.dimensions}
     182        {if $display_info.dimensions and isset($INFO_DIMENSIONS)}
    183183        <div id="Dimensions" class="imageInfo">
    184184                <dt>{'Dimensions'|@translate}</dt>
    185                 <dd>{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</dd>
     185                <dd>{$INFO_DIMENSIONS}</dd>
    186186        </div>
    187187        {/if}
     
    192192        </div>
    193193        {/if}
    194         {if $display_info.filesize}
     194        {if $display_info.filesize and isset($INFO_FILESIZE)}
    195195        <div id="Filesize" class="imageInfo">
    196196                <dt>{'Filesize'|@translate}</dt>
    197                 <dd>{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</dd>
    198         </div>
    199         {/if}
    200         {if $display_info.tags }
     197                <dd>{$INFO_FILESIZE}</dd>
     198        </div>
     199        {/if}
     200        {if $display_info.tags and isset($related_tags)}
    201201        <div id="Tags" class="imageInfo">
    202202                <dt>{'Tags'|@translate}</dt>
    203203                <dd>
    204                         {if isset($related_tags)}
    205                                 {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach}
    206                         {else}&nbsp;
    207                         {/if}
    208                 </dd>
    209         </div>
    210         {/if}
    211         {if $display_info.categories}
     204                {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach}
     205                </dd>
     206        </div>
     207        {/if}
     208        {if $display_info.categories and isset($related_categories)}
    212209        <div id="Categories"  class="imageInfo">
    213210                <dt>{'Albums'|@translate}</dt>
    214211                <dd>
    215                         {if isset($related_categories)}
    216212                        <ul>
    217213                                {foreach from=$related_categories item=cat}
     
    219215                                {/foreach}
    220216                        </ul>
    221                         {/if}
    222217                </dd>
    223218        </div>
Note: See TracChangeset for help on using the changeset viewer.