]>
Commit | Line | Data |
---|---|---|
1 | <:wrap admin/base.tmpl title=>"Image Wizard" :> | |
2 | <h1><:ifEq [article id] "-1":>Global<:or:><: articleType :><:eif:> Image Wizard</h1> | |
3 | <:ifMessage:> | |
4 | <p><b><:message:> </b></p> | |
5 | <:or:><:eif:> | |
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:> | |
15 | | | |
16 | <:if Thumbs:><a href="<:script:>?id=<:article id:>&_t=img&f_showfull=1">Full size images</a> |<:or Thumbs:><:ifCanThumbs:><a href="<:script:>?id=<:article id:>&_t=img">With Thumbnails</a> |<:or:><:eif:><:eif Thumbs:> | |
17 | </p> | |
18 | <:if UserCan edit_images_add:article:> | |
19 | <h2>Add new image</h2> | |
20 | ||
21 | <form method="post" action="<:script:>" enctype="multipart/form-data" name="add"> | |
22 | ||
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 :>" /> | |
27 | <input type="hidden" name="_t" value="img" /> | |
28 | <:csrfp admin_add_image hidden:> | |
29 | <table> | |
30 | <tr> | |
31 | <th>Image file to add:</th> | |
32 | <td> | |
33 | <input type="file" name="image" /> | |
34 | </td> | |
35 | <td class="help"><:help image file:> <:error_img image:></td> | |
36 | </tr> | |
37 | <tr> | |
38 | <th>Alt text for image:</th> | |
39 | <td> | |
40 | <input type="text" name="altIn" value="<:old altIn:>" /> | |
41 | </td> | |
42 | <td class="help"><:help image alt:> <:error_img altIn:></td> | |
43 | </tr> | |
44 | <tr> | |
45 | <th>URL for image:</th> | |
46 | <td> | |
47 | <input type="text" name="url" value="<:old url:>" /> | |
48 | </td> | |
49 | <td class="help"><:help image url:> <:error_img url:></td> | |
50 | </tr> | |
51 | <tr> | |
52 | <th>Identifier for image:</th> | |
53 | <td> | |
54 | <input type="text" name="name" value="<:old name:>" /> | |
55 | </td> | |
56 | <td class="help"><:help image name:> <:error_img name:></td> | |
57 | </tr> | |
58 | <tr> | |
59 | <th>Storage:</th> | |
60 | <td> | |
61 | <select name="storage"> | |
62 | <option value="">(Auto)</option> | |
63 | <:iterator begin image_stores:> | |
64 | <option value="<:image_store name:>"><:image_store description:></option> | |
65 | <:iterator end image_stores:> | |
66 | </select> | |
67 | </td> | |
68 | <td class="help"><:help image storage:> <:error_img storage:></td> | |
69 | </tr> | |
70 | <tr> | |
71 | <td colspan="3" class="buttons"> | |
72 | <input type="submit" name="addimg" value="Add Image" /> | |
73 | </td> | |
74 | </tr> | |
75 | </table> | |
76 | </form> | |
77 | <:or UserCan:><:eif UserCan:> | |
78 | ||
79 | <form method="post" action="<:script:>" enctype="multipart/form-data" name="manage"> | |
80 | <input type="hidden" name="level" value="<: level :>" /> | |
81 | <input type="hidden" name="id" value="<: article id :>" /> | |
82 | <input type="hidden" name="parentid" value="<: article parentid :>" /> | |
83 | <input type="hidden" name="imgtype" value="<: articleType :>" /> | |
84 | <input type="hidden" name="_t" value="img" /> | |
85 | <:csrfp admin_save_images hidden:> | |
86 | <h2>Manage images</h2> | |
87 | ||
88 | <table class="editform images"> | |
89 | <:if Images:><:if Eq [article id] "-1":><:or Eq:><:if Cfg basic auto_images 1:><tr> | |
90 | <th colspan="5">First Image Position</th> | |
91 | </tr> | |
92 | <tr> | |
93 | <td colspan="5"> | |
94 | <input type="radio" name="imagePos" value="tl" <: ifEq [article imagePos] "tl":>checked<:eif:> />Top Left | |
95 | <input type="radio" name="imagePos" value="tr" <: ifEq [article imagePos] "tr":>checked<:eif:> />Top Right | |
96 | <input type="radio" name="imagePos" value="bl" <: ifEq [article imagePos] "bl":>checked<:eif:> />Bottom Left | |
97 | <input type="radio" name="imagePos" value="br" <: ifEq [article imagePos] "br":>checked<:eif:> />Bottom Right | |
98 | <input type="radio" name="imagePos" value="xx" <: ifEq [article imagePos] "xx":>checked<:eif:> />Don't automatically insert images | |
99 | ||
100 | <:help image position:> | |
101 | ||
102 | </td> | |
103 | </tr><:eif Cfg:><:eif Eq:> | |
104 | <:if Thumbs:> | |
105 | <tr> | |
106 | <th>Image</th> | |
107 | <th colspan="2"> </th> | |
108 | <th class="col_modify"> Modify</th> | |
109 | <th class="col_move"> Move</th> | |
110 | </tr> | |
111 | <:iterator begin images:> | |
112 | <tr> | |
113 | <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> | |
114 | <th>Alt text:</th> | |
115 | <td class="col_field"> | |
116 | <: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:> | |
117 | </td> | |
118 | <td class="col_modify" rowspan="5"> | |
119 | <:ifUserCan edit_images_delete:article:><b><a href="<:script:>?id=<:article id:>&removeimg_<: image id :>=1&_t=img&_csrfp=<:csrfp admin_remove_image:>" onClick="return window.confirm('Are you sure you want to delete this Image')">Delete</a></b><:or:><:eif:> | |
120 | <:ifUserCan edit_images_save:article:><a href="<:script:>?a_edit_image=1&id=<:article id:>&image_id=<: image id :>">Edit</a><:or:><:eif:></td> | |
121 | <td class="col_move" rowspan="5"><:imgmove:></td> | |
122 | </tr> | |
123 | <tr> | |
124 | <th>URL:</th> | |
125 | <td class="col_field"> | |
126 | <: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:> | |
127 | </td> | |
128 | </tr> | |
129 | <tr> | |
130 | <th>Identifier:</th> | |
131 | <td class="col_field"> | |
132 | <: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:> | |
133 | </td> | |
134 | </tr> | |
135 | <tr> | |
136 | <th>Image file:</th> | |
137 | <td class="col_field"> | |
138 | <:ifUserCan edit_images_save:article:><input type="file" name="image<:image id:>" size="32" /> <:error_img [concatenate "image" [image id] ]:><:or:><: image displayName :><:eif:> | |
139 | </td> | |
140 | </tr> | |
141 | <tr> | |
142 | <th>Stored:</th> | |
143 | <td class="col_field"> | |
144 | <:ifUserCan edit_images_save:article:><select name="storage<:image id:>"> | |
145 | <option value="">(Auto)</option> | |
146 | <:iterator begin image_stores:> | |
147 | <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> | |
148 | <:iterator end image_stores:> | |
149 | </select><:error_img [concatenate "storage" [image id] ]:><:or:><: image storage :><:eif:> | |
150 | </td> | |
151 | </tr> | |
152 | <:iterator end images:> | |
153 | <:or Thumbs:> | |
154 | <tr> | |
155 | <th colspan="5">Image</th> | |
156 | </tr> | |
157 | <: iterator begin images :> | |
158 | <tr> | |
159 | <td class="col_image" colspan="5"><:image:></td> | |
160 | </tr> | |
161 | <tr> | |
162 | <th> Alt Text</th> | |
163 | <th class="col_url"> URL</th> | |
164 | <th> Identifier</th> | |
165 | <th class="col_modify"> Modify</th> | |
166 | <th class="col_move"> Move</th> | |
167 | </tr> | |
168 | <tr> | |
169 | <td> | |
170 | <: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:> | |
171 | </td> | |
172 | <td class="col_url"> | |
173 | <: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:> | |
174 | </td> | |
175 | <td class="col_identifier"> | |
176 | <: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:> | |
177 | </td> | |
178 | <td class="col_modify"> | |
179 | <:ifUserCan edit_images_delete:article:><b><a href="<:script:>?id=<:article id:>&removeimg_<: image id :>=1&_t=img&_csrfp=<:csrfp admin_remove_image:>" onClick="return window.confirm('Are you sure you want to delete this Image')">Delete</a></b><:or:><:eif:></td> | |
180 | <td class="col_move"><:imgmove:></td> | |
181 | </tr> | |
182 | <: iterator separator images :> | |
183 | <tr> | |
184 | <td colspan="5"> </td> | |
185 | </tr> | |
186 | <: iterator end images :> | |
187 | <:eif Thumbs:> | |
188 | <:ifUserCan edit_images_save:article:> | |
189 | <tr> | |
190 | <td colspan="5" class="buttons"> | |
191 | <input type="submit" name="process" value="Save changes" /> | |
192 | </td> | |
193 | </tr> | |
194 | <:or:><:eif:> | |
195 | <:or Images:><tr><td colspan="5" align="center" bgcolor="#FFFFFF"><:if Eq [article id] "-1":>There are no global images<:or Eq:>No images | |
196 | are attached to this article<:eif Eq:></td> | |
197 | </tr><:eif Images:> | |
198 | </table> | |
199 | ||
200 | <p> | |
201 | <input type="submit" name="back" value=" << Back " /> | |
202 | </p> | |
203 | ||
204 | </form> |