summaryrefslogtreecommitdiff
path: root/templates/image_order.tpl
blob: 264cbfc5707a426397f6ad54f39be94772643789 (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
<div class="admin fisheye">
	<div class="header">
		<h1>{tr}Gallery Images{/tr}: <a href="{$smarty.const.FISHEYE_PKG_URL}view.php?gallery_id={$gContent->mGalleryId}">{$gContent->mInfo.title}</a></h1>
	</div>

	<div class="body">
		<p class="formhelp">{tr}Here you can re-arrange the order of the images in this gallery and quickly change their titles. The image position does not have to be in an exact sequence. In fact, we recommend you count by tens so you can easily insert or re-order images at a later date. If you need to add a detailed description to an image, click the <strong>Edit Details</strong> link next to the desired image.<br />Using the <strong>Gallery Image</strong> radio button you can specify what image is used to identify this particular gallery.{/tr}</p>

		<a name="imgedit"> </a>
		<div id="imgedit"></div>

		{form id="batch_order" legend="Gallery Images"}
{strip}
			<input type="hidden" name="gallery_id" value="{$gContent->mGalleryId}"/>

			{formfeedback hash=$formfeedback}

			<table class="data">
				<tr>
					<th scope="col" style="width:200px;">{tr}Thumbnail{/tr}</th>
					<th scope="col">{tr}Title and Position{/tr}</th>
					<th scope="col">{tr}Miscellaneous{/tr}</th>
				</tr>

				{counter start=0 print=false assign=imageCount}
				{foreach from=$gContent->mItems item=galItem key=itemContentId}
					{if $imageCount % $gContent->mInfo.images_per_page == 0}
					<tr class="{cycle values='even,odd' assign='pageClass'}">
						<th colspan="3" class="pagebreak">
							{tr}Gallery Page{/tr} {math equation="imgCount / imagesPerPage + 1"
								imgCount=$imageCount
								imagesPerPage=$gContent->mInfo.images_per_page}
						</th>
					</tr>
					{/if}
					<tr class="{$pageClass}">
						{counter print=false}
						<td class="{$galItem->mType.content_type_guid}">
							<a href="{$galItem->getDisplayUrl()|escape}"><img class="thumb" src="{$gContent->mItems.$itemContentId->getThumbnailUrl()|replace:"&":"&amp;"}{if $batchEdit.$contentId ne ''}?{math equation="1 + rand(1,9999)"}{/if}" alt="{$galItem->mInfo.title}" /></a>
						</td>

						<td>
							<div class="row">
								{if $galItem->mInfo.user_id == $gBitUser->mUserId || $gBitUser->isAdmin()}
									<div class="floaticon">
										<a href="#imgedit" onclick="javascript:ajax_updater( 'imgedit', '{$smarty.const.FISHEYE_PKG_URL}edit_image.php', 'ajax=true&amp;content_id={$galItem->mInfo.content_id}&amp;gallery_id={$gContent->mGalleryId}&amp;from={$smarty.const.FISHEYE_PKG_URL}image_order.php' );">{biticon iname="edit" ipackage="liberty" iexplain="Edit Details"}</a>
										<noscript><div><a href="{$smarty.const.FISHEYE_PKG_URL}edit_image.php?content_id={$galItem->mInfo.content_id}">{biticon ipackage=liberty iname="edit" iexplain="Edit Image"}</a></div></noscript>
									</div>
								{/if}
								<input type="text" name="image_title[{$galItem->mContentId}]" value="{$galItem->getTitle()}" /><br />
								<strong>{tr}Uploaded{/tr}</strong>: {$galItem->mInfo.created|bit_short_datetime}<br />
								<strong>{tr}File name{/tr}</strong>: {$galItem->mInfo.image_file.filename} <br />
								<strong>{tr}Description{/tr}</strong>: {$galItem->mInfo.data|default:"[ {tr}none{/tr} ]"} <br />
							</div>
						</td>

						<td style="text-align:right;width:12em;">
							<label>{tr}Gallery Image{/tr}: <input type="radio" name="gallery_preview_content_id" value="{$galItem->mContentId}" {if $gContent->getField('preview_content_id') == $galItem->mContentId}checked="checked"{/if}/></label><br />
							<label>{if $galItem->getField('is_favorite')}{biticon iname="favorite" ipackage="users" iexplain=""}{/if}{tr}Favorite Image{/tr}: <input type="checkbox" name="is_favorite[]" value="{$galItem->mContentId}" {if $galItem->getField('is_favorite')}checked="checked"{/if}/></label><br />
							<label>{tr}Batch Select{/tr}: <input type="checkbox" name="batch[]" value="{$galItem->mContentId}" /></label><br />
							<label>{tr}Position{/tr}</label>: <input type="text" size="5" maxlength="15" name="imagePosition[{$galItem->mContentId}]" id="imagePosition-{$galItem->mContentId}" value="{$galItem->mInfo.position}"/>
						</td>
					</tr>
				{/foreach}
				<tr>
					<td colspan="4" align="right">
						{tr}Use Random Gallery Image{/tr} <input type="radio" name="gallery_preview_content_id" id="gallery_preview_content_id" value="" {if $gContent->mInfo.preview_content_id == ""}checked="checked"{/if} /><br/>
{/strip}
<script type="text/javascript">//<![CDATA[
	document.write("<label for=\"switcher\">{tr}Batch select all images{/tr}</label> ");
	document.write("<input name=\"switcher\" id=\"switcher\" type=\"checkbox\" onclick=\"switchCheckboxes(this.form.id,'batch[]','switcher')\" />");
//]]></script>
{strip}

					</td>
				</tr>
			</table>

			{legend legend=""}
				<div class="row">
					{formlabel label="" for="gallery_preview_content_id"}
					{forminput}
					{/forminput}
				</div>

				<div class="row">
					{formlabel label="Batch commands" for=""}
					{forminput}
						<select name="batch_command">
								<option value=""></option>
								<option value="delete">{tr}Delete{/tr}</option>
								<option value="remove">{tr}Remove{/tr} ({tr}Don't delete if in other galleries{/tr})</option>
								<option value="thumbnail">{tr}Regenerate Thumbnails{/tr}</option>
								<optgroup label="{tr}Rotate{/tr}">
									<option value="rotate:90">&gt;&gt; {tr}Rotate Clockwise{/tr}</option>
									<option value="rotate:-90">&lt;&lt; {tr}Rotate Counter Clockwise{/tr}</option>
								</optgroup>
								{if $gBitSystem->isPackageActive( 'gatekeeper' ) }
									<optgroup label="{tr}Set Security to{/tr}">
										<option value="security:">~~ {tr}Publically Visible{/tr} ~~</option>
										{foreach from=$securities key=secId item=sec}
											<option value="security:{$secId}">{tr}Set Security to{/tr} "{$sec.security_description}"</option>
										{/foreach}
									</optgroup>
								{/if}
								<optgroup label="{tr}Copy to Gallery{/tr}">
									{foreach from=$galleryList item=gal key=galleryId}
										{if $gContent->mInfo.content_id ne $gal.content_id}
											<option value="gallerycopy:{$gal.content_id}">{$gal.title|truncate:50}</option>
										{/if}
									{/foreach}
								</optgroup>
								<optgroup label="{tr}Move to Gallery{/tr}">
									{foreach from=$galleryList item=gal key=galleryId}
										{if $gContent->mInfo.content_id ne $gal.content_id}
											<option value="gallerymove:{$gal.content_id}">{$gal.title|truncate:50}</option>
										{/if}
									{/foreach}
								</optgroup>
						</select>

						{formhelp note="With selected images do the following"}
					{/forminput}
				</div>

				<div class="row">
					{formlabel label="Re-order Gallery by" for="reorder_gallery"}
					{forminput}
						<select name="reorder_gallery" id="reorder_gallery">
							<option value=""></option>
							<option value="upload_date">{tr}Date Uploaded{/tr}</option>
							<option value="caption">{tr}Image Title{/tr}</option>
							<option value="file_name">{tr}File Name{/tr}</option>
							<option value="random">{tr}Random{/tr}</option>
						</select>
						{formhelp note="This will reset the position for every image in this gallery."}
					{/forminput}
				</div>
			{/legend}

			<div class="row submit">
				<input type="submit" name="cancel" value="{tr}Back{/tr}"/> <input type="submit" name="updateImageOrder" value="{tr}Save Changes{/tr}"/>
			</div>
{/strip}
		{/form}
	</div><!-- end .body -->
</div><!-- end .fisheye -->