summaryrefslogtreecommitdiff
path: root/templates/upload_fisheye.tpl
blob: 3b94fb0352c7478f33c5fa474577008186720633 (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
{strip}
<div class="admin fisheye">
	<div class="header">
		<h1>{biticon ipackage="icons" iname="go-up" iexplain="^"} {tr}Upload Photos{/tr}</h1>
	</div>

	<div class="body">
		{form enctype="multipart/form-data" onsubmit=$onSubmit id=$id target=$target action=$action}
			<div id="uploadblock">
				{jstabs}
					{jstab title="Upload Files"}
						{formfeedback note=$quotaMessage}

						<p class="warning">{biticon ipackage="icons" iname="dialog-warning" iexplain=Warning iforce=icon} {tr}The maximum file size you can upload is {$uploadMax} Megabytes{/tr}</p>
						{formfeedback error=$errors}

						{formhelp note="Here you can upload files. You can upload single files, or you can upload archived files (.zip's, .tar's, etc. NOTE: .sitx on Mac OS X generally does not work) Archived uploads will automatically be decompressed, and a gallery will created for every gallery in it. If you have nested folders, the hierarchy will be maintained for you with nested galleries." force=true}
						{if $gBrowserInfo.platform=='mac'}
							{formhelp note="Mac Users: The newer .sitx format is not supported currently because the makers of the StuffIt application have not released new versions of their software for servers. Please use DropZip or similar for best results." force=true}
						{/if}

						<input type="hidden" name="gallery_id" value="{$galleryId|escape}"/>
						<input type="hidden" name="save_image" value="save" />
						<input type="hidden" name="image_id" value="{$imageId}"/>
						<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />

						<p>
						{if $gLibertySystem->hasService('upload')}
							{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_upload_form_tpl"}
						{elseif $gBitSystem->isFeatureActive( 'fisheye_extended_upload_slots' )}
							<h2>{tr}Upload Images{/tr}</h2>
							{include file="bitpackage:kernel/upload_slot_inc.tpl" hash_key=imagedata}
						{else}
							
							<div class="row">
								{formlabel label="Select File(s)"}
								{forminput}
									<input type="file" name="file0" id="fileupload" />
									{formhelp note="To upload more than one file, click on choose repeatedly."}
								{/forminput}
							</div>

							<div class="row">
								{formlabel label="Selected File(s)" for=""}
								{forminput}
									<script type="text/javascript" src="{$smarty.const.UTIL_PKG_URL}javascript/libs/multifile.js"></script>
									<div id="fileslist"></div>
									<div class="clear"></div>
									{formhelp note="These files will be uploaded when you hit the upload button below."}
									<script type="text/javascript">/* <![CDATA[ Multi file upload */
										var multi_selector = new MultiSelector( document.getElementById( 'fileslist' ), 10 );
										multi_selector.addElement( document.getElementById( 'fileupload' ) );
									/* ]]> */</script>
								{/forminput}
							</div>
						{/if}
						</p>
					{/jstab}

					{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_tab_tpl"}

					{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_upload_tab_tpl"}
				{/jstabs}

				{if $gBitUser->hasPermission( 'p_fisheye_upload_nonimages' )}
					<div class="row">
						{formlabel label="Process Archive(s)" for="process_archive"}
						{forminput}
							<input type="checkbox" id="process_archive" name="process_archive" value="true" checked="checked" />
							{formhelp note="If you don't want to have archived files processed and extracted, please uncheck the above box."}
						{/forminput}
					</div>
				{else}
					<input type="hidden" name="process_archive" value="true" />
				{/if}

				{if function_exists('exif_read_data')}
					<div class="row">
						{formlabel label="Auto-Rotate Images" for="rotate_image"}
						{forminput}
							<input type="checkbox" id="rotate_image" name="rotate_image" value="auto" checked="checked" />
							{formhelp note="If your camera was turned sideways when the image was taken, this will attempt to orient the image correctly."}
						{/forminput}
					</div>
				{/if}

				<div class="row">
					{formlabel label="Use Filenames" for="use_filenames"}
					{forminput}
						<input type="checkbox" id="use_filenames" name="use_filenames" value="true"/>
						{formhelp note="If you would like to name your images based upon their filenames rather than their EXIF data."}
					{/forminput}
				</div>
				<div class="row">
					{if !$gBitUser->hasPermission( 'p_fisheye_create' )}
						{formfeedback warning="Please make sure you select a gallery to load your images into, otherwise your images will be discarded"}
					{/if}
					{formlabel label="Add File(s) to these Galleries"}
					{forminput}
						{foreach from=$galleryList key=galId item=gal}
							<input type="checkbox" name="gallery_additions[]" value="{$galId}"
								{if  $gContent->mGalleryId == $galId}
									checked="checked"
								{else}
									{section name=gx loop=$gContent->mInfo.parent_galleries}
										{if ($gContent->mInfo.parent_galleries[gx].gallery_id == $galId)}
											checked="checked"
										{/if}
									{/section}
								{/if}
							/>
							<a href="{$smarty.const.FISHEYE_PKG_URL}view.php?gallery_id={$gal.gallery_id}">{$gal.title|escape}</a>
							<br />
						{foreachelse}
							<p class="norecords">
								{tr}No Galleries Found{/tr}.<br />
								{tr}The following gallery will automatically be created for you{/tr}: <strong>{displayname hash=$gBitUser->mInfo nolink=1}'s Gallery</strong>
							</p>
						{/foreach}
					{/forminput}
				</div>

				<div class="row">
					{include file="bitpackage:fisheye/resize_image_select.tpl"}
				</div>
			</div>

			{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_mini_tpl"}

			{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_upload_mini_tpl"}

			<div class="row submit">
				<noscript><p class="highlight">{tr}Please don't press the save button more than once!<br />Depending on what you are uploading and the system, this can take a few minutes.{/tr}</p></noscript>
				<input type="submit" id="submitbutton" value="{tr}Upload File(s){/tr}" {if $submitClick}onclick="{$submitClick}"{/if}/>
			</div>
		{/form}
	</div> <!-- end .body -->
</div> <!-- end .fisheye -->
{/strip}

{if $gLibertySystem->hasService('upload')}
	{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_upload_js_tpl"}
{else}
	{assign var=onSubmit value="javascript:disableSubmit('submitbutton');"}
	{assign var=id value=fishid}
{/if}