the image inline method now defaults the cfg parameter
[bse.git] / site / templates / admin / article_img.tmpl
CommitLineData
a3e0dbc8 1<:wrap admin/base.tmpl title=>"Image Wizard", js => "admin_edit.js" :>
daee3409 2<h1><:ifEq [article id] "-1":>Global<:or:><: articleType :><:eif:> Image Wizard</h1>
35c0719f
TC
3<:ifMessage:>
4<p><b><:message:> </b></p>
5<:or:><:eif:>
daee3409
TC
6<p>| <a href="/cgi-bin/admin/menu.pl">Admin menu</a> |
7<:switch:>
8<:case Match [article generator] "Product":><a href="/cgi-bin/admin/add.pl?id=<:article id:>">Edit
9 product</a> | <a href="/cgi-bin/admin/shopadmin.pl">Manage catalogs</a>
10<:case Eq [article id] [cfg articles shop]:><a href="/cgi-bin/admin/add.pl?id=<:article id:>">Edit shop</a>
11<:case Eq [article id] "-1":><a href="/cgi-bin/admin/add.pl?id=<:article id:>">Edit sections</a>
12<:case default:><a href="/cgi-bin/admin/add.pl?id=<:article id:>"><:ifMatch
13 [article generator] "Catalog":>Edit catalog<:or:>Edit article<:eif:></a>
14<:endswitch:>
ab2cd916
TC
15|
16<:if Thumbs:><a href="<:script:>?id=<:article id:>&amp;_t=img&amp;f_showfull=1">Full size images</a> |<:or Thumbs:><:ifCanThumbs:><a href="<:script:>?id=<:article id:>&amp;_t=img">With Thumbnails</a> |<:or:><:eif:><:eif Thumbs:>
17</p>
18<:if UserCan edit_images_add:article:>
35c0719f 19<h2>Add new image</h2>
f5d30ab9 20
de30d08a 21<form method="post" action="<:script:>" enctype="multipart/form-data" name="add">
f5d30ab9 22
d09682dd
TC
23<input type="hidden" name="level" value="<: level :>" />
24<input type="hidden" name="id" value="<: article id :>" />
25<input type="hidden" name="parentid" value="<: article parentid :>" />
26<input type="hidden" name="imgtype" value="<: articleType :>" />
cc9019d1 27<input type="hidden" name="_t" value="img" />
aa6896b6 28<:csrfp admin_add_image hidden:>
8a3b8db8 29 <table>
f5d30ab9 30 <tr>
8a3b8db8
TC
31 <th>Image file to add:</th>
32 <td>
d09682dd 33 <input type="file" name="image" />
f5d30ab9 34 </td>
8a3b8db8 35 <td class="help"><:help image file:> <:error_img image:></td>
f5d30ab9
TC
36 </tr>
37 <tr>
8a3b8db8
TC
38 <th>Alt text for image:</th>
39 <td>
d09682dd 40 <input type="text" name="altIn" value="<:old altIn:>" />
f5d30ab9 41 </td>
8a3b8db8 42 <td class="help"><:help image alt:> <:error_img altIn:></td>
f5d30ab9 43 </tr>
5c5c6eb6 44 <tr>
8a3b8db8
TC
45 <th>URL for image:</th>
46 <td>
d09682dd 47 <input type="text" name="url" value="<:old url:>" />
5c5c6eb6 48 </td>
8a3b8db8 49 <td class="help"><:help image url:> <:error_img url:></td>
5c5c6eb6 50 </tr>
4772671f 51 <tr>
8a3b8db8
TC
52 <th>Identifier for image:</th>
53 <td>
d09682dd 54 <input type="text" name="name" value="<:old name:>" />
4772671f 55 </td>
8a3b8db8 56 <td class="help"><:help image name:> <:error_img name:></td>
4772671f 57 </tr>
a3e0dbc8
TC
58 <tr>
59 <th>Tags</th>
60 <td>
61 <input type="hidden" name="_save_tags" value="1" />
62 <div id="tags">
63 <:- .set tags = [ cgi.param("tags") ] :>
64 <:- .if tags.size == 0 :>
65 <:% tags.push("") :>
66 <:- .end if :>
67 <:.for tag in tags :>
68 <div class="tag"><input type="text" name="tags" value="<:= tag :>" /><:.call "error_img_n", "field":"tags", "index":loop.index :></div>
69 <:.end for:>
70 </div>
71 </td>
72 <td class="help"><:help edit tags:></td>
73 </tr>
e63c3728 74 <tr>
8a3b8db8
TC
75 <th>Storage:</th>
76 <td>
e63c3728
TC
77<select name="storage">
78<option value="">(Auto)</option>
79<:iterator begin image_stores:>
80<option value="<:image_store name:>"><:image_store description:></option>
81<:iterator end image_stores:>
82</select>
83 </td>
8a3b8db8 84 <td class="help"><:help image storage:> <:error_img storage:></td>
e63c3728 85 </tr>
f5d30ab9 86 <tr>
8a3b8db8 87 <td colspan="3" class="buttons">
d09682dd 88 <input type="submit" name="addimg" value="Add Image" />
f5d30ab9
TC
89 </td>
90 </tr>
91 </table>
99ef7979 92</form>
abf5bbc6 93<:or UserCan:><:eif UserCan:>
99ef7979 94
de30d08a 95<form method="post" action="<:script:>" enctype="multipart/form-data" name="manage">
d09682dd
TC
96<input type="hidden" name="level" value="<: level :>" />
97<input type="hidden" name="id" value="<: article id :>" />
98<input type="hidden" name="parentid" value="<: article parentid :>" />
99<input type="hidden" name="imgtype" value="<: articleType :>" />
cc9019d1 100<input type="hidden" name="_t" value="img" />
aa6896b6 101<:csrfp admin_save_images hidden:>
35c0719f 102 <h2>Manage images</h2>
f5d30ab9 103
8a3b8db8 104 <table class="editform images">
1e60d3c4 105 <:if Images:><:if Eq [article id] "-1":><:or Eq:><:if Cfg basic auto_images 1:><tr>
8a3b8db8 106 <th colspan="5">First Image Position</th>
35c0719f 107 </tr>
759c295d 108 <tr>
8a3b8db8 109 <td colspan="5">
1e60d3c4
TC
110<input type="radio" name="imagePos" value="tl" <: ifEq [article imagePos] "tl":>checked<:eif:> />Top Left &nbsp;
111<input type="radio" name="imagePos" value="tr" <: ifEq [article imagePos] "tr":>checked<:eif:> />Top Right &nbsp;
112<input type="radio" name="imagePos" value="bl" <: ifEq [article imagePos] "bl":>checked<:eif:> />Bottom Left &nbsp;
113<input type="radio" name="imagePos" value="br" <: ifEq [article imagePos] "br":>checked<:eif:> />Bottom Right
114<input type="radio" name="imagePos" value="xx" <: ifEq [article imagePos] "xx":>checked<:eif:> />Don't automatically insert images
115
116<:help image position:>
08123550 117
ca9aa2bf 118 </td>
1e60d3c4 119 </tr><:eif Cfg:><:eif Eq:>
ab2cd916 120<:if Thumbs:>
8a3b8db8 121 <tr>
ab2cd916
TC
122 <th>Image</th>
123 <th colspan="2"> &nbsp;</th>
8a3b8db8
TC
124 <th class="col_modify"> Modify</th>
125 <th class="col_move"> Move</th>
ab2cd916
TC
126 </tr>
127<:iterator begin images:>
128 <tr>
8a3b8db8 129 <td rowspan="5" class="col_thumbnail"><a href="#" onclick="window.open('<:image src:>', 'fullimage', 'width=<:arithmetic [image width]+20:>,height=<:arithmetic [image height] + 30:>,location=no,status=no,menubar=no,scrollbars=yes'); return false;"><:thumbimage editor:></a></td>
ab2cd916 130 <th>Alt text:</th>
8a3b8db8 131 <td class="col_field">
b95fc3a0 132 <:ifUserCan edit_images_save:article:><input type="text" name="alt<:image id:>" value="<: oldi [concatenate alt [image id] ] 0 image alt :>" size="32" /><:or:><: image alt :><:eif:>
ab2cd916 133 </td>
8a3b8db8 134 <td class="col_modify" rowspan="5">
aa6896b6 135 <:ifUserCan edit_images_delete:article:><b><a href="<:script:>?id=<:article id:>&amp;removeimg_<: image id :>=1&amp;_t=img&amp;_csrfp=<:csrfp admin_remove_image:>" onClick="return window.confirm('Are you sure you want to delete this Image')">Delete</a></b><:or:><:eif:>
8a3b8db8
TC
136<:ifUserCan edit_images_save:article:><a href="<:script:>?a_edit_image=1&amp;id=<:article id:>&amp;image_id=<: image id :>">Edit</a><:or:><:eif:></td>
137 <td class="col_move" rowspan="5"><:imgmove:></td>
ab2cd916
TC
138 </tr>
139 <tr>
140 <th>URL:</th>
8a3b8db8 141 <td class="col_field">
b95fc3a0 142 <:ifUserCan edit_images_save:article:><input type="text" name="url<:image id:>" value="<: oldi [concatenate url [image id] ] 0 image url :>" size="32" /><:or:><: image url :><:eif:>
ab2cd916
TC
143 </td>
144 </tr>
145 <tr>
146 <th>Identifier:</th>
8a3b8db8 147 <td class="col_field">
b95fc3a0
TC
148 <:ifUserCan edit_images_save:article:><input type="text" name="name<:image id:>" value="<: oldi [concatenate name [image id] ] 0 image name :>" size="32" /> <:error_img [concatenate "name" [image id] ]:><:or:><: image name :><:eif:>
149 </td>
150 </tr>
151 <tr>
152 <th>Image file:</th>
8a3b8db8 153 <td class="col_field">
b95fc3a0 154 <:ifUserCan edit_images_save:article:><input type="file" name="image<:image id:>" size="32" /> <:error_img [concatenate "image" [image id] ]:><:or:><: image displayName :><:eif:>
ab2cd916
TC
155 </td>
156 </tr>
e63c3728
TC
157 <tr>
158 <th>Stored:</th>
8a3b8db8 159 <td class="col_field">
e63c3728
TC
160 <:ifUserCan edit_images_save:article:><select name="storage<:image id:>">
161<option value="">(Auto)</option>
162<:iterator begin image_stores:>
163<option value="<:image_store name:>" <:ifEq [oldi [concatenate storage [image id] ] 0 image storage] [image_store name]:>selected="selected"<:or:><:eif:>><:image_store description:></option>
164<:iterator end image_stores:>
165</select><:error_img [concatenate "storage" [image id] ]:><:or:><: image storage :><:eif:>
166 </td>
167 </tr>
ab2cd916
TC
168<:iterator end images:>
169<:or Thumbs:>
8a3b8db8 170 <tr>
4772671f 171 <th colspan="5">Image</th>
27feb834 172 </tr>
ca9aa2bf 173 <: iterator begin images :>
8a3b8db8
TC
174 <tr>
175 <td class="col_image" colspan="5"><:image:></td>
35c0719f 176 </tr>
8a3b8db8 177 <tr>
08123550 178 <th> Alt Text</th>
8a3b8db8 179 <th class="col_url"> URL</th>
4772671f 180 <th> Identifier</th>
8a3b8db8
TC
181 <th class="col_modify"> Modify</th>
182 <th class="col_move"> Move</th>
35c0719f 183 </tr>
8a3b8db8
TC
184 <tr>
185 <td>
b95fc3a0 186 <:ifUserCan edit_images_save:article:><input type="text" name="alt<:image id:>" value="<: oldi [concatenate alt [image id] ] 0 image alt :>" size="32" /><:or:><: image alt :><:eif:>
27feb834 187 </td>
8a3b8db8 188 <td class="col_url">
b95fc3a0 189 <:ifUserCan edit_images_save:article:><input type="text" name="url<:image id:>" value="<: oldi [concatenate url [image id] ] 0 image url :>" size="32" /><:or:><: image url :><:eif:>
27feb834 190 </td>
8a3b8db8 191 <td class="col_identifier">
b95fc3a0 192 <:ifUserCan edit_images_save:article:><input type="text" name="name<:image id:>" value="<: oldi [concatenate name [image id] ] 0 image name :>" size="32" /> <:error_img [concatenate "name" [image id] ]:><:or:><: image name :><:eif:>
4772671f 193 </td>
8a3b8db8 194 <td class="col_modify">
aa6896b6 195 <:ifUserCan edit_images_delete:article:><b><a href="<:script:>?id=<:article id:>&amp;removeimg_<: image id :>=1&amp;_t=img&amp;_csrfp=<:csrfp admin_remove_image:>" onClick="return window.confirm('Are you sure you want to delete this Image')">Delete</a></b><:or:><:eif:></td>
8a3b8db8 196 <td class="col_move"><:imgmove:></td>
27feb834 197 </tr>
ca9aa2bf 198 <: iterator separator images :>
8a3b8db8 199 <tr>
4772671f 200 <td colspan="5">&nbsp;</td>
27feb834 201 </tr>
ca9aa2bf 202 <: iterator end images :>
ab2cd916 203<:eif Thumbs:>
1df3b258 204<:ifUserCan edit_images_save:article:>
27feb834 205 <tr>
8a3b8db8 206 <td colspan="5" class="buttons">
d09682dd 207 <input type="submit" name="process" value="Save changes" />
27feb834 208 </td>
abf5bbc6
TC
209 </tr>
210<:or:><:eif:>
daee3409
TC
211 <:or Images:><tr><td colspan="5" align="center" bgcolor="#FFFFFF"><:if Eq [article id] "-1":>There are no global images<:or Eq:>No images
212 are attached to this article<:eif Eq:></td>
759c295d 213 </tr><:eif Images:>
27feb834 214 </table>
f5d30ab9
TC
215
216 <p>
d09682dd 217 <input type="submit" name="back" value=" &lt;&lt; Back " />
35c0719f 218 </p>
f5d30ab9
TC
219
220</form>