1{* $Id$ *}
2
3{title}{tr}Browsing Gallery:{/tr} {$name}{/title}
4<div class="t_navbar mb-4">
5	<div class="btn-group float-sm-right">
6		{if ! $js}<ul class="cssmenu_horiz"><li>{/if}
7		<a class="btn btn-link" data-toggle="dropdown" data-hover="dropdown" href="#">
8			{icon name='menu-extra'}
9		</a>
10		<div class="dropdown-menu dropdown-menu-right">
11			<h6 class="dropdown-title">
12				{tr}Gallery actions{/tr}
13			</h6>
14			<div class="dropdown-divider"></div>
15			{if $user and $prefs.feature_user_watches eq 'y'}
16				{if $user_watching_gal eq 'n'}
17					<a class="dropdown-item" href="tiki-browse_gallery.php?galleryId={$galleryId}&amp;watch_event=image_gallery_changed&amp;watch_object={$galleryId}&amp;watch_action=add">
18						{icon name='watch'} {tr}Monitor{/tr}
19					</a>
20				{else}
21					<a class="dropdown-item" href="tiki-browse_gallery.php?galleryId={$galleryId}&amp;watch_event=image_gallery_changed&amp;watch_object={$galleryId}&amp;watch_action=remove">
22						{icon name='stop-watching'} {tr}Stop monitoring{/tr}
23					</a>
24				{/if}
25			{/if}
26			{if $prefs.feature_group_watches eq 'y' and ( $tiki_p_admin_users eq 'y' or $tiki_p_admin eq 'y' )}
27				<a class="dropdown-item" href="tiki-object_watches.php?objectId={$galleryId|escape:"url"}&amp;watch_event=image_gallery_changed&amp;objectType=image+gallery&amp;objectName={$name|escape:"url"}&amp;objectHref={'tiki-browse_gallery.php?galleryId='|cat:$galleryId|escape:"url"}">
28					{icon name='group'} {tr}Group Monitor{/tr}
29				</a>
30			{/if}
31		</div>
32		{if ! $js}</li></ul>{/if}
33	</div>
34	{if $tiki_p_list_image_galleries eq 'y'}
35		{button href="tiki-galleries.php" class="btn btn-link" _type="text" _icon_name='list' _text="{tr}List Galleries{/tr}"}
36	{/if}
37	{if $system eq 'n'}
38		{if $tiki_p_admin_galleries eq 'y' or ($user and $user eq $owner)}
39			{button href="tiki-galleries.php?edit_mode=1&amp;galleryId=$galleryId" class="btn btn-link" _type="text" _icon_name='edit' _text="{tr}Edit Gallery{/tr}"}
40		{/if}
41
42		{if $tiki_p_upload_images eq 'y'}
43			{if $tiki_p_admin_galleries eq 'y' or ($user and $user eq $owner) or $public eq 'y'}
44				{button href="tiki-upload_image.php?galleryId=$galleryId" class="btn btn-link" _type="text" _icon_name='upload' _text="{tr}Upload Image{/tr}"}
45			{/if}
46		{/if}
47
48		{if $prefs.feature_gal_batch eq "y" and $tiki_p_batch_upload_image_dir eq 'y'}
49			{if $tiki_p_admin_galleries eq 'y' or ($user and $user eq $owner) or $public eq 'y'}
50				{button href="tiki-batch_upload.php?galleryId=$galleryId" class="btn btn-link" _type="text" _icon_name='file-archive' _text="{tr}Directory Batch{/tr}"}
51			{/if}
52		{/if}
53
54		{if $tiki_p_assign_perm_image_gallery eq 'y'}
55			{assign var=thisname value=$name|escape:"url"}
56			{permission_link mode=text type="image gallery" permType="image galleries" addclass="btn btn-link" _type="text" id=$galleryId title=$thisname}
57		{/if}
58	{/if}
59
60	{if $tiki_p_admin_galleries eq 'y'}
61		{button href="tiki-list_gallery.php?galleryId=$galleryId" class="btn btn-link" _type="text" _icon_name='list' _text="{tr}List Gallery{/tr}"}
62		{button href="tiki-show_all_images.php?id=$galleryId" class="btn btn-link" _type="text" _icon_name='image' _text="{tr}All Images{/tr}"}
63	{/if}
64
65	{if $prefs.feed_image_gallery eq 'y'}
66		{button href="tiki-image_gallery_rss.php?galleryId=$galleryId" class="btn btn-link" _type="text" _icon_name='rss' _text="{tr}RSS{/tr}"}
67	{/if}
68	{if $system eq 'n'}
69		{if $tiki_p_admin_galleries eq 'y' or ($user and $user eq $owner)}
70			{button href="tiki-browse_gallery.php?galleryId=$galleryId&amp;rebuild=$galleryId" class="btn btn-primary" _icon_name='cog' _text="{tr}Rebuild Thumbnails{/tr}"}
71		{/if}
72	{/if}
73</div>
74
75{if $user and $prefs.feature_user_watches eq 'y' and $category_watched eq 'y'}
76<div class="categbar">
77	{tr}Watched by categories:{/tr}
78	{section name=i loop=$watching_categories}
79		<a href="tiki-browse_categories.php?parentId={$watching_categories[i].categId}">{$watching_categories[i].name|escape}</a>&nbsp;
80	{/section}
81</div>
82{/if}
83
84{if $advice}
85	<div class="highlight simplebox">{tr}{$advice}{/tr}</div>
86{/if}
87
88{if strlen($description) > 0}
89	<div class="description form-text">
90		{$description|escape}
91	</div>
92{/if}
93
94<div class="mb-4">
95<span class="sorttitle">{tr}Sort Images by{/tr}</span>
96[ <span class="sortoption"><a class="gallink" href="{$galleryId|sefurl:gallery:with_next}offset={$offset}&amp;sort_mode={if $sort_mode eq 'name_desc'}name_asc{else}name_desc{/if}">{tr}Name{/tr}</a></span>
97| <span class="sortoption"><a class="gallink" href="{$galleryId|sefurl:gallery:with_next}offset={$offset}&amp;sort_mode={if $sort_mode eq 'created_desc'}created_asc{else}created_desc{/if}">{tr}Date{/tr}</a></span>
98| <span class="sortoption"><a class="gallink" href="{$galleryId|sefurl:gallery:with_next}offset={$offset}&amp;sort_mode={if $sort_mode eq 'hits_desc'}hits_asc{else}hits_desc{/if}">{tr}Hits{/tr}</a></span>
99| <span class="sortoption"><a class="gallink" href="{$galleryId|sefurl:gallery:with_next}offset={$offset}&amp;sort_mode={if $sort_mode eq 'user_desc'}user_asc{else}user_desc{/if}">{tr}User{/tr}</a></span>
100| <span class="sortoption"><a class="gallink" href="{$galleryId|sefurl:gallery:with_next}offset={$offset}&amp;sort_mode={if $sort_mode eq 'filesize_desc'}filesize_asc{else}filesize_desc{/if}">{tr}Size{/tr}</a></span> ]
101</div>
102
103<div class="thumbnails">
104	<div class="row">
105
106			{if $num_objects > 0}
107				{foreach from=$subgals key=key item=item}
108					<div class="col-xs-6 col-md-3" {*{if (($key / $rowImages) % 2)}"col-xs-6 col-md-3 oddthumb"{else}"col-xs-6 col-md-3 eventhumb"{/if}*}>
109						<div class="thumbnail text-center">
110						<a href="{$item.galleryId|sefurl:gallery}"><img alt="{tr}subgallery{/tr} {$item.name}" class="" src="show_image.php?id={$item.imageId}&amp;thumb=1"></a>
111						<br>
112						<div class="caption">
113							{tr}Subgallery:{/tr}
114							{if $showname=='y' || $showfilename=='y'}{$item.name}<br>{/if}
115							{if $showimageid=='y'}{tr}ID:{/tr} {$item.galleryId}<br>{/if}
116							{if $showcategories=='y'}
117								{tr}Categories:{/tr}
118									<ul>
119									{section name=categ loop=$item.categories}
120										<li>{$item.categories[categ]}</li>
121									{/section}
122									</ul><br>
123							{/if}
124							{if $showdescription=='y'}{$item.description}<br>{/if}
125							{if $showcreated=='y'}{tr}Created:{/tr} {$item.created|tiki_short_date}<br>{/if}
126							{if $showuser=='y'}{tr}User:{/tr} {$item.user|userlink}<br>{/if}
127							{if $showxysize=='y' || $showfilesize=='y'}({$item.images} Images){/if}
128							{if $showhits=='y'}[{$item.hits} {if $item.hits == 1}{tr}Hit{/tr}{else}{tr}Hits{/tr}{/if}]<br>{/if}
129						</div>
130
131					</div></div>
132				{*	{if $key%$rowImages eq $rowImages2}
133						<div></div>
134					{/if}*}
135
136				{/foreach}
137				{foreach from=$images key=key item=item}
138		<div class="col-xs-6 col-md-3"{* {if ((($key +$num_subgals) / $rowImages) % 2)}oddthumb"{else}eventhumb"{/if}*}>
139			<div class="thumbnail text-center">
140
141						{if $prefs.feature_shadowbox eq 'y'}
142							<a href="show_image.php?id={$item.imageId}&amp;scalesize={$defaultscale}" data-box="lightbox[gallery];type=img" title="{if $item.description neq ''}{$item.description}{elseif $item.name neq ''}{$item.name}{else}{$item.filename}{/if}" {if $prefs.gal_image_mouseover neq 'n'}{popup fullhtml="1" text=$over_info.$key}{/if} class="linkmenu tips">
143								<img class="athumb" src="show_image.php?id={$item.imageId}&amp;thumb=1">
144							</a>
145						{else}
146							<a href="tiki-browse_image.php?galleryId={$galleryId}&amp;sort_mode={$sort_mode}&amp;imageId={$item.imageId}&amp;scalesize={$defaultscale}" {if $prefs.gal_image_mouseover neq 'n'}{popup fullhtml="1" text=$over_info.$key}{/if} class="linkmenu tips">
147								<img class="athumb" src="show_image.php?id={$item.imageId}&amp;thumb=1">
148							</a>
149						{/if}
150
151						<div class="caption">
152							{if $prefs.gal_image_mouseover neq 'only'}
153								{if $showname=='y'}{$item.name}<br>{/if}
154								{if $showfilename=='y'}{tr}Filename:{/tr} {$item.filename}<br>{/if}
155								{if $showimageid=='y'}{tr}ID:{/tr} {$item.imageId}<br>{/if}
156								{if $showcategories=='y'}
157									{tr}Categories:{/tr}
158									<ul class='categories'>
159										{section name=categ loop=$item.categories}
160											<li>{$item.categories[categ]}</li>
161										{/section}
162									</ul><br>
163								{/if}
164								{if $showdescription=='y'}{$item.description}<br>{/if}
165								{if $showcreated=='y'}{tr}Created:{/tr} {$item.created|tiki_short_date}<br>{/if}
166								{if $showuser=='y'}{tr}User:{/tr} {$item.user|userlink}<br>{/if}
167								{if $showxysize=='y'}({$item.xsize}x{$item.ysize}){/if}
168								{if $showfilesize=='y'}({$item.filesize} Bytes){/if}
169								{if $showhits=='y'}[{$item.hits} {if $item.hits == 1}{tr}Hit{/tr}{else}{tr}Hits{/tr}{/if}]{/if}
170							{else}
171								{if $showname=='y' and $item.name neq ''}{$item.name}{else}{$item.filename}{/if}
172							{/if}
173							<br>
174							{actions}
175								{strip}
176									<action>
177										<a {jspopup href="tiki-browse_image.php?galleryId=$galleryId&amp;sort_mode=$sort_mode&amp;imageId="|cat:$item.imageId|cat:"&amp;scalesize=$defaultscale&amp;popup=1"} class="gallink">
178											{icon name='view' _menu_text='y' _menu_icon='y' alt="{tr}Popup{/tr}"}
179										</a>
180									</action>
181									<action>
182										<a class="gallink tips" href="tiki-browse_image.php?galleryId={$galleryId}&amp;sort_mode={$sort_mode}&amp;imageId={$item.imageId}&amp;scalesize={$defaultscale}" {if $prefs.gal_image_mouseover neq 'n'}{popup fullhtml="1" text=$over_info.$key}{/if}>
183											{icon name='list' _menu_text='y' _menu_icon='y' alt="{tr}Details{/tr}"}
184										</a>
185									</action>
186									{if $tiki_p_admin_galleries eq 'y' or ($user and $user eq $owner)}
187										{if $nextx!=0}
188											<action>
189												<a class="gallink" href="tiki-browse_image.php?galleryId={$galleryId}&amp;sort_mode={$sort_mode}&amp;imageId={$item.imageId}&amp;scalesize=0">
190													{icon name='image' _menu_text='y' _menu_icon='y' alt="{tr}Original size{/tr}"}
191												</a>
192											</action>
193										{/if}
194										{if $imagerotate}
195											<action>
196												<a class="gallink" href="{$galleryId|sefurl:gallery:with_next}&amp;rotateright={$item.imageId}" title="{tr}rotate right{/tr}">
197													{icon name='repeat' _menu_text='y' _menu_icon='y' alt="{tr}Rotate{/tr}"}
198												</a>
199											</action>
200										{/if}
201										<action>
202											<a class="gallink" href="tiki-edit_image.php?galleryId={$galleryId}&amp;edit={$item.imageId}">
203												{icon name='edit' _menu_text='y' _menu_icon='y' alt="{tr}Edit{/tr}"}
204											</a>
205										</action>
206										<action>
207											<a class="gallink" href="{$galleryId|sefurl:gallery:with_next}&amp;remove={$item.imageId}">
208												{icon name='remove' _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"}
209											</a>
210										</action>
211									{/if}
212								{/strip}
213							{/actions}
214							<br>
215						</div>
216					</div>
217				</div>
218					{if ($key + $num_subgals) % $rowImages eq $rowImages2}
219						</div><div>
220					{/if}
221				{/foreach}
222			{else}
223				{norecords _colspan=6}
224			{/if}
225		</div>
226</div>
227
228{pagination_links cant=$cant step=$maxImages offset=$offset}{/pagination_links}
229
230{include file='find.tpl'}
231
232{if $prefs.feature_image_galleries_comments == 'y'
233	&& (($tiki_p_read_comments == 'y'
234	&& $comments_cant != 0)
235	|| $tiki_p_post_comments == 'y'
236	|| $tiki_p_edit_comments == 'y')}
237	<div id="page-bar" class="btn-group">
238		<span class="button btn-primary"><a id="comment-toggle" href="{service controller=comment action=list type="image gallery" objectId=$galleryId}#comment-container">{tr}Comments{/tr}</a></span>
239		{jq}
240			$('#comment-toggle').comment_toggle();
241		{/jq}
242	</div>
243	<div id="comment-container"></div>
244{/if}
245
246<div class="alert alert-info">
247
248				{tr}You can view this gallery's configured image (first, random, etc.) in your browser using:{/tr}<br><br>
249
250
251				<a class="gallink" href="{$base_url}show_image.php?galleryId={$galleryId}">
252					{$base_url}show_image.php?galleryId={$galleryId}
253				</a><br><br>
254
255				{tr}You can include the gallery's image in an HTML page using:{/tr}<br><br>
256
257				<code>&lt;img src="{$base_url}show_image.php?galleryId={$galleryId}" /&gt;</code><br><br>
258
259				{tr}You can include the image in a tiki page using:{/tr}<br><br>
260
261
262					{if $resultscale == $defaultscale or !$resultscale}
263						{literal}<code>{{/literal}img src=show_image.php?galleryId={$galleryId} {literal}}</code>{/literal}<br>
264					{else}
265						{literal}<code>{{/literal}img src={$base_url}show_image.php?galleryId={$galleryId}{literal}}</code>{/literal}
266					{/if}
267
268</div>
269