allow metadata to be defined for new products
[bse.git] / site / templates / admin / edit_1.tmpl
CommitLineData
0bdcab3b 1
76c6b28e 2<:wrap admin/base.tmpl title=>[cond [ifNew] [cat "New " [articleType]] [cat "Edit " [articleType] ": " [article title]]], js => "admin_edit.js":>
d09682dd 3<h1><:ifNew:>New<:or:>Edit<:eif:> <:articleType:></h1>
6a5227d4
TC
4<:if Message:>
5<div id="message" <:ifError:>class="error"<:or:><:eif:>><:message:></div>
6<:or Message:><:eif Message:>
5f1832bb 7<:include admin/include/article_menu.tmpl:>
f5d30ab9
TC
8
9 <h2><:articleType:> Details</h2>
10
8b0b2f34
TC
11<p>Path: / <a href="<:script:>?id=-1">(Sections)</a> <:iterator begin crumbs:>/ <a href="<:script:>?id=<:crumb id:>"><:crumb title |h:></a> <:iterator end crumbs:>/</p>
12
918735d1 13<:ifNew:><:or:>
abf5bbc6 14<:if Or [iadminuser_count] [iadmingroup_count]:>
de30d08a 15 <form action="/cgi-bin/admin/adminusers.pl" name="access">
12bcb7ac 16 <input type="hidden" name="id" value="<: article id:>" />
58baa27b 17 <table class="editform editformtiny">
abf5bbc6 18 <tr>
58baa27b
TC
19 <th>Manage access: </th>
20 <td>
12bcb7ac 21 <select name="adminid">
08123550 22<:iterator begin adminusers:>
12bcb7ac
TC
23<option value="<:iadminuser id:>">User <:iadminuser logon:>
24</option><:iterator end adminusers:>
08123550 25<:iterator begin admingroups:>
12bcb7ac
TC
26<option value="<:iadmingroup id:>">Group <:iadmingroup name:>
27</option><:iterator end admingroups:>
abf5bbc6 28 </select>
12bcb7ac 29 <input type="submit" name="a_showobjectart" value="Manage" />
abf5bbc6 30 </td>
58baa27b 31 <td class="help"><:help access manage:>
abf5bbc6
TC
32 </td>
33 </tr>
34 </table>
abf5bbc6 35 </form>
61e75480 36<br />
abf5bbc6
TC
37<:or Or:><:eif Or:>
38<:eif:>
de30d08a 39 <form enctype="multipart/form-data" method="post" action="<:script:>" name="edit">
dded3231 40
76c6b28e 41 <input type="hidden" name="lastModified" value="<:article lastModified :>" />
12b42a0b 42 <input type="hidden" name="type" value="Article" />
d09682dd
TC
43 <input type="hidden" name="level" value="<: level :>" />
44 <input type="hidden" name="id" value="<: article id :>" />
aa6896b6 45<:ifNew:><:csrfp admin_add_article hidden:><:or:><:csrfp admin_save_article hidden:><:eif:>
58baa27b 46 <table class="editform">
80e6a095 47 <tr>
58baa27b
TC
48 <th>Parent:</th>
49 <td>
abf5bbc6 50 <:if FieldPerm parentid:><select name="parentid">
d09682dd 51 <option value="">Please select a <:parentType:></option><: list:>
abf5bbc6 52 </select><:or FieldPerm:><:parent title:> (<:parent id:>)<:eif FieldPerm:>
80e6a095 53 </td>
58baa27b 54 <td class="help"><:help edit section:> <:error_img parentid:></td>
80e6a095 55 </tr>
f5d30ab9 56 <tr>
58baa27b
TC
57 <th>Title:</th>
58 <td>
deae2a52 59 <:ifFieldPerm title:><input type="text" name="title" maxlength="<:cfg fields title_size 255:>" size="64" value="<: old title default title :>" />
429e9103 60 <:or:><:default title:><:eif:></td>
58baa27b 61 <td class="help"><:help edit title:> <:error_img title:></td>
f5d30ab9 62 </tr>
aef5bada 63 <:if Cfg "title alias" [concatenate level [article level]]:><tr>
58baa27b
TC
64 <th>Alias:</th>
65 <td>
aef5bada
AO
66 <:if FieldPerm titleAlias:><input type="text" name="titleAlias" maxlength="<:cfg fields alias_size 60:>" size="60" value="<:old titleAlias article titleAlias:>" /><:or FieldPerm:><:article titleAlias:><:eif FieldPerm:>
67 </td>
58baa27b 68 <td class="help"><:help edit titleAlias:> <:error_img titleAlias:></td>
aef5bada 69 </tr><:or Cfg:><:eif Cfg:>
74b21f6d 70 <tr>
58baa27b 71 <th>Summary:
74b21f6d 72 </th>
58baa27b 73 <td>
74b21f6d
TC
74 <:ifFieldPerm summary:><input type="text" name="summary" maxlength="<:cfg fields summary_size 255:>" size="64" value="<: old summary default summary :>" />
75 <:or:><:default summary:><:eif:></td>
58baa27b 76 <td class="help"><:help edit summary:> <:error_img summary:></td>
74b21f6d 77 </tr>
759c295d 78 <:if Cfg image title:><tr>
58baa27b
TC
79 <th>Title image:</th>
80 <td><:ifFieldPerm titleImage:><:titleImages:> (upload this to
abf5bbc6 81 the /images/titles directory)<:or:><:article titleImage:><:eif:></td>
58baa27b 82 <td class="help"><:help edit titleImage:> <:error_img titleImage:></td>
759c295d 83 </tr><:or Cfg:><:eif Cfg:>
f5d30ab9 84 <tr>
58baa27b
TC
85 <th> Body: </th>
86 <td>
61e75480 87 <:if FieldPerm body:><textarea name="body" rows="10" cols="60"><: old body default body :></textarea>
d09682dd 88 <:or FieldPerm:><:bodytext article body:><:eif FieldPerm:>
f5d30ab9 89 </td>
58baa27b 90 <td class="help"><:help body body:> <:error_img body:></td>
f5d30ab9 91 </tr>
0a66f55c 92 <:if Cfgsection [concatenate level [article level] " menus"]:><tr>
58baa27b
TC
93 <th>Menu:</th>
94 <td>
aef5bada 95 <:if FieldPerm menu:><select name="menu" id="menu">
0a66f55c
AO
96 <:iterator begin cfgsection [concatenate level [article level] " menus"] sort=key:><option value="<:cfgentry key:>"<:if Eq [old menu] [cfgentry key]:> selected="selected"<:or Eq:><:eif Eq:>><:cfgentry value:></option><:iterator separator cfgsection:>
97 <:iterator end cfgsection:>
aef5bada 98 </select><:or FieldPerm:><:article menu:><:eif FieldPerm:>
0a66f55c 99 </td>
58baa27b 100 <td class="help"><:help article menu:> <:error_img menu:></td>
0a66f55c 101 </tr><:or Cfgsection:><:eif Cfgsection:>
f5d30ab9 102 <tr>
58baa27b
TC
103 <th>Template:</th>
104 <td><:ifFieldPerm template:> <:templates:><:or:><:article template:><:eif:> </td>
105 <td class="help"><:help edit template:> <:error_img template:></td>
759c295d
TC
106 </tr>
107 <tr>
58baa27b
TC
108 <th>List article:</th>
109 <td> <:if FieldPerm listed:><:list listed:><:or FieldPerm:><:if Article listed:><:ifEq [article listed] "1":>Yes<:or:>In Sections, but not menu<:eif:><:or Article:>No<:eif Article:><:eif FieldPerm:> </td>
110 <td class="help"><:help edit listed:> <:error_img listed:></td>
c76e86ea
TC
111 </tr>
112 <tr>
58baa27b
TC
113 <th>Link alias:</th>
114 <td>
61e75480 115 <:ifFieldPerm linkAlias:><input type="text" name="linkAlias" maxlength="<:cfg fields linkAlias_size 255:>" size="40" value="<: old linkAlias article linkAlias :>" />
c76e86ea 116 <:or:><:default linkAlias:><:eif:></td>
58baa27b 117 <td class="help"><:help edit linkAlias:> <:error_img linkAlias:></td>
759c295d
TC
118 </tr>
119 <tr>
58baa27b
TC
120 <th>Flags:</th>
121 <td><:iterator begin flags:><:if FieldPerm flags:>
d09682dd
TC
122 <input type="checkbox" name="flags" value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:>
123 <:eif:> /><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:>
cc9019d1 124 <:eif FieldPerm:><:flag desc:><:iterator separator flags:><br /><:iterator end flags:></td>
58baa27b 125 <td class="help"><:help edit flags:> <:error_img flags:></td>
9604a90c
TC
126 </tr>
127 <tr>
58baa27b
TC
128 <th>Page title:</th>
129 <td>
12bcb7ac 130 <:ifFieldPerm pageTitle:><input type="text" name="pageTitle" value='<:old pageTitle article pageTitle:>' size="60" maxlength="255" /> (alternate title)<:or:><:article pageTitle:><:eif:>
9604a90c 131 </td>
58baa27b 132 <td class="help"><:help edit pageTitle:> <:error_img pageTitle:></td>
9604a90c
TC
133 </tr>
134 <tr>
58baa27b
TC
135 <th>Meta description:</th>
136 <td>
12bcb7ac
TC
137 <:ifFieldPerm metaDescription:><input type="text" name="metaDescription" value='<:old metaDescription article metaDescription:>' size="60" maxlength="255" /><:or:><:article metaDescription:><:eif:>
138 </td>
58baa27b 139 <td class="help"><:help edit metaDescription:> <:error_img metaDescription:></td>
12bcb7ac
TC
140 </tr>
141 <tr>
58baa27b
TC
142 <th>Meta keywords:</th>
143 <td>
12bcb7ac
TC
144 <:ifFieldPerm metaKeywords:><input type="text" name="metaKeywords" value='<:old metaKeywords article metaKeywords:>' size="60" maxlength="255" /> (comma separated)<:or:><:article metaKeywords:><:eif:>
145 </td>
58baa27b 146 <td class="help"><:help edit metaKeywords:> <:error_img metaKeywords:></td>
12bcb7ac
TC
147 </tr>
148 <tr>
58baa27b
TC
149 <th>Author name:</th>
150 <td>
12bcb7ac 151 <:if FieldPerm author:><input type="text" name="author" value='<:ifCfg editor auto_author:><:old author adminuser name:><:or:><:old author:><:eif:>' size="40" maxlength="255" /><:or FieldPerm:><:article author:><:eif FieldPerm:>
9604a90c 152 </td>
58baa27b 153 <td class="help"><:help edit author:> <:error_img author:></td>
759c295d
TC
154 </tr>
155 <tr>
58baa27b
TC
156 <th>Release date:</th>
157 <td>
deae2a52 158 <:if FieldPerm release:><input type="text" name="release" value="<: old release date "%d/%m/%Y" default release :>" size="10" maxlength="10" />
918735d1 159 (dd/mm/yyyy<: ifNew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td>
58baa27b 160 <td class="help"><:help edit release:> <:error_img release:></td>
f5d30ab9
TC
161 </tr>
162 <tr>
58baa27b
TC
163 <th>Expiry date:</th>
164 <td>
deae2a52 165 <:if FieldPerm expire:><input type="text" name="expire" value="<: old expire date "%d/%m/%Y" default expire :>" size="10" maxlength="10" />
918735d1 166 (dd/mm/yyyy - <: ifNew :>default is never, <: or :><: eif :>blank
abf5bbc6 167 for never expires)<:or FieldPerm:><: date "%d/%m/%Y" article expire :><:eif FieldPerm:></td>
58baa27b 168 <td class="help"><:help edit expire:> <:error_img expire:></td>
f5d30ab9
TC
169 </tr>
170 <tr>
58baa27b
TC
171 <th>Summary length:</th>
172 <td>
deae2a52 173 <:if FieldPerm summaryLength:><input type="text" name="summaryLength" size="10" maxlength="10" value="<: old summaryLength default summaryLength :>" />
918735d1 174 (in characters - <: ifNew :>default inherited from <:parentType:>, <: or :><: eif :>
abf5bbc6 175 zero for no summary)<:or FieldPerm:><: article summaryLength :><:eif FieldPerm:></td>
58baa27b 176 <td class="help"><:help edit summary:> <:error_img summaryLength:></td>
f5d30ab9
TC
177 </tr>
178 <tr>
58baa27b
TC
179 <th>Display threshold:</th>
180 <td>
deae2a52 181 <:ifFieldPerm threshold:><input type="text" name="threshold" size="10" maxlength="10" value="<: old threshold default threshold :>" /><:or:><: article threshold :><:eif:>
f5d30ab9 182 </td>
58baa27b 183 <td class="help"><:help edit threshold:> <:error_img threshold:></td>
f5d30ab9 184 </tr>
76c6b28e 185<:include admin/include/edit_common.tmpl:>
d64413ee 186<:include admin/article_custom.tmpl optional:>
59fca225 187<:include admin/include/article_cfg_custom.tmpl:>
f5d30ab9 188 <tr>
58baa27b
TC
189 <th>Thumbnail image:</th>
190 <td>
429e9103 191 <:ifFieldPerm thumbImage:>
d09682dd 192 <input type="file" name="thumbnail" /><:or:><:eif:>
27feb834 193 <:ifArticle thumbImage:><img src="/images/<:article thumbImage:>">
12bcb7ac 194 <:if FieldPerm thumbImage:><input type="checkbox" name="remove_thumb" />
429e9103 195 Remove<:or FieldPerm:><:eif FieldPerm:><:or:><:eif:></td>
58baa27b 196 <td class="help"><:help edit thumb:> <:error_img
429e9103 197 thumbImage:></td>
f5d30ab9 198 </tr>
27feb834
TC
199 <:if Article id:>
200 <tr>
58baa27b
TC
201 <th><a name="files"></a>Files:</th>
202 <td> <:if Files:>
203 <table class="editform">
27feb834
TC
204 <tr bgcolor="#FFFFFF">
205 <th>Filename</th>
206 <th>Size</th>
207 <th>Type</th>
35c0719f
TC
208 <th>D/l</th>
209 <th>Pay</th>
210 <th>User</th>
211 </tr>
212 <:iterator begin files:>
27feb834
TC
213 <tr bgcolor="#FFFFFF">
214 <td><:file displayName:></td>
35c0719f 215 <td align="center"><:kb file sizeInBytes:></td>
27feb834 216 <td><:file contentType:></td>
12bcb7ac
TC
217 <td align="center"><:ifFile download:>Yes<:or:>No<:eif:></td>
218 <td align="center"><:ifFile forSale:>Yes<:or:>No<:eif:></td>
219 <td align="center"><:ifFile requireUser:>Yes<:or:>No<:eif:></td>
35c0719f
TC
220 </tr>
221 <:iterator end files:>
222 </table>
58baa27b
TC
223 <div><a href="<:script:>?id=<:article id:>&amp;_t=file"><b>Manage Files</b></a>
224 </div>
caa7299c 225 <:or Files:>
58baa27b 226 <div>No files are attached to this article. <a href="<:script:>?id=<:article id:>&amp;_t=file"><b>Manage Files</b></a></div>
abf5bbc6 227 <:eif Files:>
4afdbb1b 228 </td>
58baa27b 229 <td class="help"><:help edit files:> <:error_img
429e9103 230 files:></td>
4afdbb1b 231 </tr>
f5d30ab9 232 <tr>
58baa27b 233 <th>Images:
9fae8be7 234 </th>
0da5d199 235 <td id="images"><:if Images:> <:iterator begin
8a3b8db8 236 images:> <img src="/images/<: image image :>" alt="<:image alt :>" width="<:image width:>" height="<:image height:>" /> <:iterator separator images:>
f5d30ab9 237 <hr noshade size="1">
15fb10f2 238 <: iterator end images :>
8a3b8db8 239 <p align="left"><a href="<:script:>?id=<:article id:>&amp;_t=img">Manage Images</a></p>
abf5bbc6 240 <:or Images:>
8a3b8db8 241 No images are attached to this article. <a href="<:script:>?id=<:article id:>&amp;_t=img">Manage Images</a>
abf5bbc6 242 <:eif Images:>
55753022 243 </td>
58baa27b 244 <td class="help"><:help edit images:> <:error_img
429e9103 245 images:></td>
35c0719f 246 </tr>
ca9aa2bf 247 <:or Article:><:eif Article:>
f5d30ab9 248 </table>
0bdcab3b 249<:.call "admin/include/edit_metadata.tmpl", tr: 0 :>
f5d30ab9 250
918735d1 251 <p><: ifNew :>
12bcb7ac 252 <input type="submit" name="save" value="Add New <: articleType:>" />
abf5bbc6 253 <:or:>
12bcb7ac 254 <:if UserCan edit_save:article:><input type="submit" name="save" value="Update <: articleType:>" /><:or UserCan:><:eif UserCan:>
abf5bbc6 255 <:eif:></p>
f5d30ab9 256 </form>
264b1f60 257<:if Children:> <:ifEq [article id] [cfg articles shop]:>
35c0719f
TC
258<h2>Catalogs</h2>
259<:or:>
260<h2><: childtype :></h2>
261<:eif:><a name="children"></a>
e31d2139
TC
262 <table class="editform">
263 <tr>
9fae8be7
TC
264 <th width="30%">Title</th>
265 <th width="70%">Summary</th>
1d8d4a4a 266 <th>Listed</th>
d09682dd
TC
267 <th nowrap="nowrap">Modify</th>
268 <th nowrap="nowrap">Move</th>
1d8d4a4a 269 </tr>
1df3b258 270<:if UserCan edit_reorder_children:article:>
1d8d4a4a 271 <tr>
be3531b8
TC
272 <td colspan="5" bgcolor="#FFFFFF">Sort by:
273<a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&amp;sort=title&amp;refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">title</a> |
274<a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&amp;sort=date&amp;refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">date</a> |
275<a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&amp;reverse=1&amp;refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">reverse</a> |
276<a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&amp;sort=shuffle&amp;refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">shuffle</a></td>
1d8d4a4a 277 </tr>
abf5bbc6 278<:or UserCan:><:eif UserCan:>
1d8d4a4a 279 <:iterator begin children:>
f5d30ab9 280 <tr bgcolor="#FFFFFF">
9fae8be7
TC
281 <td width="30%"><a href="<:child admin:>"><:child title:></a></td>
282 <td width="70%"><: summary child body :></td>
f5d30ab9 283 <td align="center"><: is child listed :></td>
d09682dd 284 <td nowrap="nowrap"> <a href="/cgi-bin/admin/add.pl?id=<:child id:>">Edit</a>
e31d2139 285 <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&amp;remove=1&amp;_csrfp=<:csrfp admin_remove_article:>" onclick="return window.confirm('Are you sure you want to delete this <:ifEq [article id] 3:>Catalog<:or:><: childtype :><:eif:>')">Delete</a><:or UserCan:><:eif UserCan:></td>
d09682dd 286 <td nowrap="nowrap"><:movechild:></td>
99ef7979
TC
287 </tr>
288 <:iterator separator children:> <:iterator end children:>
289 </table>
264b1f60
TC
290<:or Children:>
291<:eif Children:>
f5d30ab9 292<:if HaveChildType:>
918735d1
TC
293<:if New:>
294<:or New:>
61e75480 295<:if UserCan edit_add_child:article:><form action="/cgi-bin/admin/add.pl" name="addchild">
d09682dd 296<input type="hidden" name="parentid" value="<:article id:>" />
35c0719f 297 <p>
d09682dd 298 <input type="submit" value="Add <:ifEq [article id] [cfg articles shop]:>Catalog<:or:><: childtype :><:eif:>" />
35c0719f 299 </p>
abf5bbc6 300</form><:or UserCan:><:eif UserCan:>
918735d1 301<:eif New:> <:or HaveChildType:> <:eif HaveChildType:>
75ab3898
TC
302
303<h2>Metadata</h2>
304
305<table class="editform">
306 <tr>
307 <th>Last Modified</th>
308 <td><:= bse.date("%H:%M %d/%m/%Y", article.lastModified) -:></td>
309 </tr>
310 <tr>
311 <th>Last Modified By</th>
312 <td><:= article.lastModifiedBy eq "" ? "(unknown)" : article.lastModifiedBy -:></td>
313 </tr>
314 <tr>
315 <th>Link</th>
316 <td><a href="<:= article.link -:>"><:= article.link -:></a></td>
317 </tr>
318 <tr>
319 <th>Generator</th>
320 <td><:= article.generator -:></td>
321 </tr>
322 <tr>
323 <th>Created</th>
324 <td><:= bse.date("%H:%M %d/%m/%Y", article.created) -:></td>
325 </tr>
326 <tr>
327 <th>Created By</th>
328 <td><:= article.createdBy eq "" ? "(unknown)" : article.createdBy -:></td>
329 </tr>
330</table>