tiki-browse_image.tpl 7.52 KB
Newer Older
1
{* $Id$ *}{if $popup}<!DOCTYPE html>
2 3
<html>
<head>
4 5 6
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel="StyleSheet" href="styles/{$prefs.style}" type="text/css">
	<script type="text/javascript" src="lib/imagegals/imagegallib.js"></script>
7
</head>
8
<body class="tiki_browse_image_popup">
9 10
<div id="{$rootid}browse_image">
{else}
11

12
	{title}{tr}Browsing Image:{/tr}{$name}{/title}
13
<div id="{$rootid}browse_image">
14
	<div class="t_navbar">
15
		{button href="tiki-browse_gallery.php?galleryId=$galleryId&amp;offset=$offset" class="btn btn-default" _icon_name="previous" _text="{tr}Return to Gallery{/tr}"}
16
		{if $tiki_p_admin_galleries eq 'y' or ($user and $user eq $owner)}
17
			{button href="tiki-edit_image.php?galleryId=$galleryId&amp;edit=$imageId&amp;sort_mode=$sort_mode" class="btn btn-default" _icon_name="edit" _text="{tr}Edit Image{/tr}"}
18 19
		{/if}
	</div>
20
{/if}
21

22
{capture name=buttons}
23

24
{***** when not sliding buttons *****}
25
	<div align="center" class="noslideshow">
26

27
{* --- first image --- *}
28 29 30
		<a class="tips" title=":{tr}First{/tr}" href="{$url_base}{$firstId}{$same_scale}" {if $imageId eq $firstId} style="display: none;"{/if}>
			{icon name='backward_step'}
		</a>
31 32

{* --- previous image --- *}
33 34 35
		<a class="tips" title=":{tr}Previous{/tr}" href="{$url_base}{$previmg}{$same_scale}" style="padding-right:6px;{if !$previmg} display: none;{/if}">
			{icon name='backward'}
		</a>
36 37

{* --- previous scale --- *}
38
		{if $scaleinfo.prevscale}
39
			<a class="tips" title=":{tr}Smaller{/tr}" href="{$url_base}{$imageId}&amp;scalesize={$scaleinfo.prevscale}">
40 41
				{icon name='view'}
			</a>
42
		{/if}
43 44

{* --- original size --- *}
45
		{if $resultscale}
46 47 48
			<a class="tips" title=":{tr}Original size{/tr}" href="{$url_base}{$imageId}&amp;scalesize=0">
				{icon name='image'}
			</a>
49
		{/if}
50 51

{* --- next scale --- *}
52
		{if $scaleinfo.nextscale}
53 54 55
			<a class="tips" title=":{tr}Bigger{/tr}" href="{$url_base}{$imageId}&amp;scalesize={$scaleinfo.nextscale}">
				{icon name='view'}
			</a>
56
		{/if}
57

58
{* --- popup launch --- *}
59
		{if !$popup}
60 61 62
			<a {jspopup height="$winy" width="$winx" href="$url_base$imageId&amp;popup=1&amp;scalesize=$defaultscale"} class="tips" title=":{tr}Popup{/tr}" >
				{icon name='popup'}
			</a>
63
		{/if}
64 65

{* --- next image --- *}
66 67 68
		<a class="tips" title=":{tr}Next{/tr}" href="{$url_base}{$nextimg}{$same_scale}" style="padding-left:6px;{if !$nextimg} display: none;{/if}">
			{icon name='forward'}
		</a>
69 70

{* --- launch slideshow --- *}
71
		{if $listImgId}
72 73 74
			<a class="tips" title=":{tr}Slideshow forward{/tr}" href="javascript:thepix.toggle('start')">
				{icon name='next'}
			</a>
75
		{/if}
76 77

{* --- last image --- *}
78 79 80
		<a class="tips" title=":{tr}Last{/tr}" href="{$url_base}{$lastId}{$same_scale}" class="gallink"{if $imageId eq $lastId} style="display: none;"{/if}>
			{icon name='forward_step' alt="{tr}Last{/tr}"}
		</a>
81
	</div>
82

83
{***** when sliding buttons *****}
84
	<div class="slideshow" style="display: none;" align="center">
85 86

{* --- stop --- *}
87 88 89
		<a class="tips" title=":{tr}Stop{/tr}" href="javascript:thepix.toggle('stop')">
			{icon name='stop'}
		</a>
90
{* --- toggle cyclic --- *}
91
		<a class="tips" title=":{tr}Repeat{/tr}" href="javascript:thepix.toggle('toTheEnd')">
92
			{icon name='repeat'}
93
		</a>
94
{* --- toggle back/forward --- *}
95 96 97
		<a class="tips" title=":{tr}Direction{/tr}" href="javascript:thepix.toggle('backward')">
			{icon name='move'}
		</a>
98
	</div>
99 100
{/capture}
{$smarty.capture.buttons}
101

102
<div class="showimage">
103 104 105 106 107 108 109
	{if $scaleinfo.clickscale >= 0}
		<a href="{$url_base}{$imageId}&amp;scalesize={$scaleinfo.clickscale}" title="{tr}Click to zoom{/tr}">
	{/if}
	<img src="show_image.php?id={$imageId}&amp;scalesize={$resultscale}&amp;nocount=y" alt="{tr}Image{/tr}" id="thepix">
	{if $scaleinfo.clickscale >= 0}
		</a>
	{/if}
110
</div>
111

112
{if !$popup}
113
	{$smarty.capture.buttons}
114
{/if}
115

116
{if $popup eq ""}
117
	<br><br>
118
	<div class="table-responsive">
119
		<table class="table noslideshow">
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
			<tr><td class="odd">{tr}Image Name:{/tr}</td><td class="odd">{$name}</td></tr>
			<tr><td class="even">{tr}Created:{/tr}</td><td class="even">{$created|tiki_long_datetime}</td></tr>
			<tr><td class="odd">{tr}Image size:{/tr}</td><td class="odd">{$xsize}x{$ysize}</td></tr>
			<tr><td class="even">{tr}Image Scale:{/tr}</td><td class="even">{if $resultscale}{$xsize_scaled}x{$ysize_scaled}{else}{tr}Original Size{/tr}{/if}</td></tr>
			<tr><td class="odd">{tr}Hits:{/tr}</td><td class="odd">{$hits}</td></tr>
			<tr><td class="even">{tr}Description:{/tr}</td><td class="even">{$description}</td></tr>
			<tr><td class="odd">{tr}Author:{/tr}</td><td class="odd">{$image_user|userlink}</td></tr>
			{if $tiki_p_admin_galleries eq 'y' or ($user and $user eq $owner)}
			<tr>
				<td class="even">
					{tr}Move image:{/tr}
				</td>
				<td class="odd">
					<form action="tiki-browse_image.php" method="post">
						<input type="hidden" name="scalesize" value="{$scalesize|escape}">
						<input type="hidden" name="sort_mode" value="{$sort_mode|escape}">
						<input type="hidden" name="imageId" value="{$imageId|escape}">
						<input type="hidden" name="galleryId" value="{$galleryId|escape}">
						<input type="text" name="newname" value="{$name}">
						<select name="newgalleryId">
							{section name=idx loop=$galleries}
								<option value="{$galleries[idx].id|escape}" {if $galleries[idx].id eq $galleryId}selected="selected"{/if}>{$galleries[idx].name}</option>
							{/section}
						</select>
						<input type="submit" class="btn btn-default btn-sm" name="move_image" value="{tr}Move{/tr}">
					</form>
				</td>
			</tr>
			{/if}
		</table>
	</div>
151
	<br><br>
152
	<div class="table-responsive">
153
		<table class="table noslideshow" style="font-size:small">
154 155 156 157 158 159 160 161 162
			<tr>
				<td class="even" style="border-bottom:0px" colspan="2">
					{tr}Include the image in a tiki page using the following syntax:{/tr}
				</td>
			</tr>
			<tr>
				<td width="6px" style="border:0px">
				</td>
				<td style="border:0px">
163
					<code>
164 165 166 167 168 169 170
						{if $resultscale == $defaultscale}
							{literal}{{/literal}img id={$imageId}{literal}}{/literal}
						{elseif !$resultscale}
							{literal}{{/literal}img id={$imageId}&amp;scalesize=0){literal}}{/literal}
						{else}
							{literal}{{/literal}img id={$imageId}&amp;scaled&amp;scalesize={$resultscale}{literal}}{/literal}
						{/if}
171
					</code>
172 173 174 175 176 177 178 179 180 181
				</td>
			</tr>
			<tr>
				<td class="even" style="border-bottom:0px" colspan="2">
					{tr}To include the image in an HTML page:{/tr}
				</td>
			</tr>
			<tr>
				<td width="10px" style="border:0px"> </td>
				<td style="border:0px">
182
					<code>
183 184 185 186 187 188 189
						{if $resultscale == $defaultscale}
							&lt;img src="{$url_show}?id={$imageId}" /&gt;
						{elseif !$resultscale}
							&lt;img src="{$url_show}?id={$imageId}&amp;scalesize=0" /&gt;
						{else}
							&lt;img src="{$url_show}?id={$imageId}&amp;scalesize={$resultscale}" /&gt;
						{/if}
190
					</code>
191 192 193 194 195 196 197 198 199 200
				</td>
			</tr>
			<tr>
				<td class="even" style="border-bottom:0px" colspan="2">
					{tr}To link to this page from another tiki page:{/tr}
				</td>
			</tr>
			<tr>
				<td width="6px" style="border:0px"> </td>
				<td style="border:0px">
201
					<code>{literal}[{/literal}tiki-browse_image.php?imageId={$imageId}{literal}]{/literal}</code>
202 203 204 205
				</td>
			</tr>
		</table>
	</div>
206
{/if}
lrargerich's avatar
lrargerich committed
207

208 209 210
</div> {* id="{$rootid}browse_image" *}

{if $listImgId}
211 212 213 214 215 216 217 218 219 220 221 222
	<script type='text/javascript'>
		<!--
		var tmp = window.location.search.match(/delay=(\d+)/);
		tmp = tmp ? parseInt(tmp[1]) : 3000;
		var thepix = new Diaporama('thepix', [{$listImgId}], {ldelim}
			startId: {$imageId},
			root: '{$rootid}browse_image',
			resetUrl: 1,
			delay: tmp
			{rdelim});
		//-->
	</script>
223 224 225
{/if}

{if $popup}
226
	</body></html>
227
{/if}