blob: 6928e28913e2e28722111aa53a3533aaf34b4523 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
{strip}
{if $gContent->getLayout() == 'auto_flow'}
{/if}
<div class="thumbnailblock">
{foreach from=$gContent->mItems item=galItem key=itemContentId}
{box class="box `$gContent->mInfo.thumbnail_size`-thmb `$galItem->mInfo.content_type_guid`"}
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini}
{include file=$gLibertySystem->getMimeTemplate('inline',$galItem->mInfo.attachment_plugin_guid) attachment=$galItem->getPreviewHash()}
{if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_titles' )}
<h2>{$galItem->getTitle()|escape}</h2>
{/if}
{if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_descriptions' )}
<p>{$galItem->mInfo.data|escape}</p>
{/if}
{/box}
{foreachelse}
<div class="norecords">This gallery is empty. <a href="{$smarty.const.FISHEYE_PKG_URL}upload.php?gallery_id={$gContent->mGalleryId}">Upload pictures!</a></div>
{/foreach}
</div>
<div class="clear"></div>
{elseif $gContent->getLayout() == 'simple_list'}
{assign var=thumbsize value='small'}
<table class="table data">
<caption>{tr}List of files{/tr} <span class="total">[ {$galInfo.total_records|default:0} ]</span></caption>
<tr>
{if $thumbsize}
<th style="width:1%"></th>
{/if}
<th style="width:60%">
{smartlink ititle=Name isort=title icontrol=$galInfo}
</th>
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_date' ) || $gBitSystem->isFeatureActive( 'fisheye_item_list_creator' )}
<th style="width:10%">
{smartlink ititle=Uploaded isort=created iorder=desc idefault=1 icontrol=$galInfo}
</th>
{/if}
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_size' )}
<th style="width:10%">{tr}Size{/tr} /<br />{tr}Duration{/tr}</th>
{/if}
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_hits' )}
<th style="width:10%">
{smartlink ititle=Downloads isort="lch.hits" icontrol=$galInfo}
</th>
{/if}
<th style="width:20%">{tr}Actions{/tr}</th>
</tr>
{foreach from=$gContent->mItems item=galItem}
<tr class="{cycle values="odd,even"}">
{if $thumbsize}
<td style="text-align:center;">
{if $galItem->mInfo.content_type_guid != 'fisheyegallery' }
{if $gBitSystem->isFeatureActive( 'site_fancy_zoom' )}
{if $gContent->hasUpdatePermission() || $gGallery && $gGallery->getPreference( 'link_original_images' )}
<a href="{$galItem->getDownloadUrl()|escape}">
{else}
<a href="{$galItem->mInfo.thumbnail_url.large}">
{/if}
{/if}
<img src="{$galItem->mInfo.thumbnail_url.$thumbsize}" alt="{$galItem->getTitle()|escape}" title="{$galItem->getTitle()|escape}" class="img-responsive"/>
{if $gBitSystem->isFeatureActive( 'site_fancy_zoom' )}
</a>
{/if}
{else}
<a href="{$galItem->getDisplayUrl()|escape}">
<img class="thumb img-responsive" src="{$galItem->getThumbnailUri()}" alt="{$galItem->getTitle()|escape|default:'image'}" />
</a>
{/if}
</td>
{/if}
<td>
<h3><a href="{$galItem->getDisplayUrl()}">{$galItem->getTitle()|escape}</a></h3>
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_desc' ) && $galItem->mInfo.data}
{$galItem->mInfo.parsed_data}
{/if}
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_attid' )}
<small>{$galItem->mInfo.wiki_plugin_link}</small>
{assign var=br value=1}
{/if}
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_name' )}
{if $br}<br />{/if}
{if $gBitUser->hasPermission( 'p_treasury_view_item' )}
<a href="{$galItem->getDisplayUrl()}">
{/if}
{$galItem->mInfo.filename} <small>({$galItem->mInfo.mime_type})</small>
{if $gBitUser->hasPermission( 'p_treasury_view_item' )}
</a>
{/if}
{/if}
</td>
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_date' ) || $gBitSystem->isFeatureActive( 'fisheye_item_list_creator' )}
<td>
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_date' )}
{$galItem->mInfo.created|bit_short_date}<br />
{/if}
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_creator' )}
{tr}by{/tr}: {displayname hash=$galItem->mInfo}
{/if}
</td>
{/if}
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_size' )}
<td style="text-align:right;">
{if $galItem->mInfo.download_url}
{$galItem->mInfo.file_size|display_bytes}
{/if}
{if $galItem->mInfo.prefs.duration}
{if $galItem->mInfo.download_url} / {/if}{$galItem->mInfo.prefs.duration|display_duration}
{/if}
</td>
{/if}
{if $gBitSystem->isFeatureActive( 'fisheye_item_list_hits' )}
<td style="text-align:right;">
{$galItem->mInfo.hits|default:"{tr}none{/tr}"}
</td>
{/if}
<td class="actionicon">
{if $galItem->mInfo.content_type_guid != 'fisheyegallery' }
{if $gBitUser->hasPermission( 'p_treasury_download_item' ) && $galItem->mInfo.download_url}
<a href="{$galItem->mInfo.download_url}">{biticon ipackage="icons" iname="emblem-downloads" iexplain="Download File"}</a>
{/if}
{if $gBitUser->hasPermission( 'p_treasury_view_item' )}
<a href="{$galItem->getDisplayUrl()}">{booticon iname="fa-folder-open" iexplain="View File"}</a>
{/if}
{if $gContent->isOwner( $galItem->mInfo ) || $gBitUser->isAdmin()}
<a href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$galItem->mInfo.content_id}&action=edit">{booticon iname="fa-pen-to-square" iexplain="Edit File"}</a>
<a href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$galItem->mInfo.content_id}&delete=1">{booticon iname="fa-trash" iexplain="Remove File"}</a>
{/if}
{/if}
</td>
</tr>
{/foreach}
</table>
{else}
<table class="thumbnailblock">
{counter assign="imageCount" start="0" print=false}
{assign var="max" value=100}
{assign var="tdWidth" value="`$max/$cols_per_page`"}
{foreach from=$gContent->mItems item=galItem key=itemContentId}
{if $imageCount % $cols_per_page == 0}
<tr > <!-- Begin Image Row -->
{/if}
<td style="width:{$tdWidth}%; vertical-align:top;"> <!-- Begin Image Cell -->
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini}
{box class="box `$galItem->mInfo.content_type_guid`"}
{if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_titles' )}
<h2>{$galItem->getTitle()|escape}</h2>
{/if}
<a href="{$galItem->getDisplayUrl()|escape}">
<img class="img-responsive thumb" src="{$galItem->getThumbnailUri()}" alt="{$galItem->getTitle()|escape|default:'image'}" />
</a>
{if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_descriptions' )}
<p>{$galItem->mInfo.data|escape}</p>
{/if}
{/box}
</td> <!-- End Image Cell -->
{counter}
{if $imageCount % $cols_per_page == 0}
</tr> <!-- End Image Row -->
{/if}
{foreachelse}
<tr><td class="norecords">This gallery is empty. <a href="{$smarty.const.FISHEYE_PKG_URL}upload.php?gallery_id={$gContent->mGalleryId}">Upload pictures!</a></td></tr>
{/foreach}
{if $imageCount % $cols_per_page != 0}</tr>{/if}
</table>
{/if}
{/strip}
|