{* * $Revision: 16014 $ * If you want to customize this file, do not edit it directly since future upgrades * may overwrite it. Instead, copy it into a new directory called "local" and edit that * version. Gallery will look for that file first and use it if it exists. *}

{$theme.item.title|markup|default:" "}

{if !empty($theme.navigator)}
{g->block type="core.Navigator" navigator=$theme.navigator reverseOrder=true}
{/if} {if !count($theme.children)}

{g->text text="This album is empty."} {if isset($theme.permissions.core_addDataItem)} {g->text text="Add a photo!"} {/if}

{else}
{if $theme.imageCount > 0}
{g->text text="Loading Album..."}

{g->text text=

{/if} {assign var="childrenInColumnCount" value=0} {assign var="subalbumCount" value=0}
{foreach from=$theme.children item=child} {if !$child.canContainChildren && $child.entityType != 'GalleryLinkItem'} {if ($childrenInColumnCount == $theme.params.columns)} {* Move to a new row *} {assign var="childrenInColumnCount" value=0} {/if} {assign var=childrenInColumnCount value="`$childrenInColumnCount+1`"} {else} {assign var=subalbumCount value="`$subalbumCount+1`"} {/if} {/foreach} {* flush the rest of the row with empty cells *} {section name="flush" start=$childrenInColumnCount loop=$theme.params.columns} {/section}
{if isset($theme.params.itemFrame) && isset($child.thumbnail)} {g->container type="imageframe.ImageFrame" frame=$theme.params.itemFrame} {g->image id="%ID%" item=$child image=$child.thumbnail class="%CLASS% giThumbnail size:=`$child.size`= summary:=`$child.summary`= description:=`$child.description`="} {/g->container} {elseif isset($child.thumbnail)} {g->image item=$child image=$child.thumbnail class="r giThumbnail size:=`$child.size`= summary:=`$child.summary`= description:=`$child.description`="} {else} {g->text text="no thumbnail"} {/if}  
{* Loop around for the albums this time *} {assign var="childrenInColumnCount" value=0} {if $subalbumCount > 0}

{g->text text="Subalbums"}

{foreach from=$theme.children item=child} {if $child.canContainChildren || $child.entityType == 'GalleryLinkItem'} {if ($childrenInColumnCount == 2)} {* Move to a new row *} {assign var="childrenInColumnCount" value=0} {/if} {assign var=childrenInColumnCount value="`$childrenInColumnCount+1`"} {/if} {/foreach} {* flush the rest of the row with empty cells *} {section name="flush" start=$childrenInColumnCount loop=2} {/section}
{if isset($child.thumbnail)} {g->image item=$child image=$child.thumbnail class="giThumbnail"} {$child.title|entitytruncate:25} {else} {g->text text= {$child.title|entitytruncate:25} {/if} {g->block type="core.ItemInfo" item=$child showDate=false showOwner=$theme.params.showAlbumOwner showSize=true showViewCount=true showSummaries=true class="giInfo"}  
{/if} {/if} {if !empty($theme.navigator)}
{g->block type="core.Navigator" navigator=$theme.navigator}
{/if} {* Store these results in a JavaScript-accessible set of arrays so the slideshow can get at them *} {* Show any other album blocks (comments, etc) *} {foreach from=$theme.params.albumBlocks item=block} {g->block type=$block.0 params=$block.1} {/foreach} {g->block type="core.GuestPreview" class="gbBlock"} {* Our emergency edit link, if the user removes all blocks containing edit links *} {g->block type="core.EmergencyEditItemLink" class="gbBlock" checkBlocks="album"}