Changeset 31343


Ignore:
Timestamp:
Jan 27, 2016, 8:28:47 PM (9 years ago)
Author:
pjgust
Message:

Rewritten DL block with class "imageInfoTable" does not conditionalize the standard fields to respect the admin display options (e.g. Show Creation Date) as does the code in the 'picture.tpl' file. Added code to to conditionalize these standard fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/manage_properties_photos/initpicture.php

    r31342 r31343  
    1717   $repla='<dl id="standard" class="imageInfoTable">{strip}
    1818{foreach from=$add_info_photos item=addinfophotos}
    19     {if $addinfophotos.AIPID == 1 and isset($INFO_AUTHOR)}
     19    {if $addinfophotos.AIPID == 1 and $display_info.author and isset($INFO_AUTHOR)}
    2020        <div id="Author" class="imageInfo">
    2121                <dt>{\'Author\'|@translate}</dt>
    2222                <dd>{$INFO_AUTHOR}</dd>
    2323        </div>
    24     {else if $addinfophotos.AIPID == 2 and isset($INFO_CREATION_DATE)}
     24    {else if $addinfophotos.AIPID == 2 and $display_info.created_on and isset($INFO_CREATION_DATE)}
    2525        <div id="datecreate" class="imageInfo">
    2626                <dt>{\'Created on\'|@translate}</dt>
    2727                <dd>{$INFO_CREATION_DATE}</dd>
    2828        </div>
    29     {else if $addinfophotos.AIPID == 3 and isset($INFO_CREATION_DATE)}
     29    {else if $addinfophotos.AIPID == 3 and $display_info.posted_on and isset($INFO_POSTED_DATE)}
    3030        <div id="datepost" class="imageInfo">
    3131                <dt>{\'Posted on\'|@translate}</dt>
    3232                <dd>{$INFO_POSTED_DATE}</dd>
    3333        </div>
    34     {else if $addinfophotos.AIPID == 4 and isset($INFO_DIMENSIONS)}
     34    {else if $addinfophotos.AIPID == 4 and $display_info.dimensions and isset($INFO_DIMENSIONS)}
    3535        <div id="Dimensions" class="imageInfo">
    3636                <dt>{\'Dimensions\'|@translate}</dt>
    3737                <dd>{$INFO_DIMENSIONS}</dd>
    3838        </div>
    39     {else if $addinfophotos.AIPID == 5}
     39    {else if $addinfophotos.AIPID == 5 and $display_info.file}
    4040        <div id="File" class="imageInfo">
    4141                <dt>{\'File\'|@translate}</dt>
    4242                <dd>{$INFO_FILE}</dd>
    4343        </div>
    44     {else if $addinfophotos.AIPID == 6 and isset($INFO_FILESIZE)}
     44    {else if $addinfophotos.AIPID == 6 and $display_info.filesize and isset($INFO_FILESIZE)}
    4545        <div id="Filesize" class="imageInfo">
    4646                <dt>{\'Filesize\'|@translate}</dt>
    4747                <dd>{$INFO_FILESIZE}</dd>
    4848        </div>
    49     {else if $addinfophotos.AIPID == 7 and isset($related_tags)}
     49    {else if $addinfophotos.AIPID == 7 and $display_info.tags and isset($related_tags)}
    5050        <div id="Tags" class="imageInfo">
    5151        <dt>{\'Tags\'|@translate}</dt>
     
    5454                </dd>
    5555        </div>
    56     {else if $addinfophotos.AIPID == 8 and isset($related_categories)}
     56    {else if $addinfophotos.AIPID == 8 and $display_info.categories and isset($related_categories)}
    5757        <div id="Categories" class="imageInfo">
    5858            <dt>{\'Albums\'|@translate}</dt>
     
    6565            </dd>
    6666        </div>
    67     {else if $addinfophotos.AIPID == 9}
     67    {else if $addinfophotos.AIPID == 9 and $display_info.visits}
    6868        <div id="Visits" class="imageInfo">
    6969                <dt>{\'Visits\'|@translate}</dt>
    7070                <dd>{$INFO_VISITS}</dd>
    7171        </div>
    72     {else if $addinfophotos.AIPID == 10 and isset($rate_summary)}
     72    {else if $addinfophotos.AIPID == 10 and $display_info.rating_score and isset($rate_summary)}
    7373        <div id="Average" class="imageInfo">
    7474                <dt>{\'Rating score\'|@translate}</dt>
Note: See TracChangeset for help on using the changeset viewer.