added some debugging output to the ifUserCan tag handler
[bse.git] / site / templates / admin / edit_1.tmpl
CommitLineData
d09682dd
TC
1<:wrap admin/xbase.tmpl title=>"Edit [articleType]":>
2<h1><:ifNew:>New<:or:>Edit<:eif:> <:articleType:></h1>
35c0719f
TC
3<:ifMessage:>
4<p><b><:message:></b></p>
918735d1
TC
5<:or:><:eif:>
6<p>| <a href="/cgi-bin/admin/menu.pl">Admin menu</a> | <:ifNew:><:or:><:if Eq
7 [article id] [cfg articles shop]:><a href="<:article admin:>">See shop</a><:or
8 Eq:><a href="<:article admin:>">See article</a><:eif Eq:> | <:eif:><:editParent:>
9 <:if Eq [article id] [cfg articles shop]:><a href="/cgi-bin/admin/shopadmin.pl">Manage
d09682dd 10 catalogs</a> |<:or Eq:><:eif Eq:><:if New:><:or New:> <a href="<:script:>?id=<:article id:>&amp;_t=steps">Manage
c2096d67
TC
11 step children/parents</a> |
12<a href="<:script:>?id=<:article id:>&amp;_t=groups">Manage access</a> |
13<:eif New:></p>
f5d30ab9
TC
14
15 <h2><:articleType:> Details</h2>
16
8b0b2f34
TC
17<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>
18
918735d1 19<:ifNew:><:or:>
abf5bbc6 20<:if Or [iadminuser_count] [iadmingroup_count]:>
de30d08a 21 <form action="/cgi-bin/admin/adminusers.pl" name="access">
d09682dd 22 <input type=hidden name=id value="<: article id:>" />
abf5bbc6
TC
23 <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
24 <tr>
25 <td>
26 <table cellpadding="6" cellspacing="1" border="0" width="100%">
27 <tr>
d09682dd 28 <th nowrap="nowrap">
abf5bbc6
TC
29
30 <font size=2>Manage access:</font>
31 </th>
32 <td bgcolor="#FFFFFF">
33 <select name=adminid>
08123550
TC
34<:iterator begin adminusers:>
35<option value=<:iadminuser id:>>User <:iadminuser logon:>
36<:iterator end adminusers:>
37<:iterator begin admingroups:>
38<option value=<:iadmingroup id:>>Group <:iadmingroup name:>
39<:iterator end admingroups:>
abf5bbc6 40 </select>
d09682dd 41 <input type=submit name="a_showobjectart" value="Manage" />
abf5bbc6
TC
42 </td>
43 <td bgcolor="#FFFFFF"><:help access manage:>
44 </td>
45 </tr>
46 </table>
47 </td>
48 </tr>
49 </table>
50 </form>
51<br>
52<:or Or:><:eif Or:>
53<:eif:>
de30d08a 54 <form enctype="multipart/form-data" method="post" action="<:script:>" name="edit">
dded3231 55
12b42a0b
TC
56 <input type="hidden" name="lastModified" value="<: old lastModified article lastModified :>" />
57 <input type="hidden" name="type" value="Article" />
d09682dd
TC
58 <input type="hidden" name="level" value="<: level :>" />
59 <input type="hidden" name="id" value="<: article id :>" />
35c0719f
TC
60
61 <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" width="100%" class="table">
f5d30ab9
TC
62 <tr>
63 <td>
64
27feb834 65 <table cellpadding="6" border="0" cellspacing="1" width="100%">
80e6a095 66 <tr>
d09682dd 67 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Parent:</th>
27feb834 68 <td bgcolor="#FFFFFF" width="100%">
abf5bbc6 69 <:if FieldPerm parentid:><select name="parentid">
d09682dd 70 <option value="">Please select a <:parentType:></option><: list:>
abf5bbc6 71 </select><:or FieldPerm:><:parent title:> (<:parent id:>)<:eif FieldPerm:>
80e6a095 72 </td>
d09682dd 73 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit section:> <:error_img parentid:></td>
80e6a095 74 </tr>
f5d30ab9 75 <tr>
d09682dd 76 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Title:
9fae8be7 77 </th>
27feb834 78 <td bgcolor="#FFFFFF" width="100%">
deae2a52 79 <:ifFieldPerm title:><input type="text" name="title" maxlength="<:cfg fields title_size 255:>" size="64" value="<: old title default title :>" />
429e9103 80 <:or:><:default title:><:eif:></td>
d09682dd 81 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit title:> <:error_img title:></td>
f5d30ab9 82 </tr>
759c295d 83 <:if Cfg image title:><tr>
d09682dd 84 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Title image:</th>
abf5bbc6
TC
85 <td bgcolor="#FFFFFF" width="100%"><:ifFieldPerm titleImage:><:titleImages:> (upload this to
86 the /images/titles directory)<:or:><:article titleImage:><:eif:></td>
d09682dd 87 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit titleImage:> <:error_img titleImage:></td>
759c295d 88 </tr><:or Cfg:><:eif Cfg:>
f5d30ab9 89 <tr>
d09682dd 90 <th valign="top" nowrap="nowrap" bgcolor="#FFFFFF" align="left"> Body: </th>
27feb834 91 <td bgcolor="#FFFFFF" width="100%">
deae2a52 92 <:if FieldPerm body:><textarea name="body" rows="10" cols="60" wrap="virtual"><: old body default body :></textarea>
d09682dd 93 <:or FieldPerm:><:bodytext article body:><:eif FieldPerm:>
f5d30ab9 94 </td>
d09682dd 95 <td valign="top" nowrap="nowrap" bgcolor="#FFFFFF"><:help body body:> <:error_img body:></td>
f5d30ab9
TC
96 </tr>
97 <tr>
d09682dd 98 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Template:</th>
759c295d 99 <td bgcolor="#FFFFFF" width="100%"><:ifFieldPerm template:> <:templates:><:or:><:article template:><:eif:> </td>
d09682dd 100 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit template:> <:error_img template:></td>
759c295d
TC
101 </tr>
102 <tr>
d09682dd 103 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">List article:</th>
759c295d 104 <td bgcolor="#FFFFFF" width="100%"> <: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>
d09682dd 105 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit listed:> <:error_img listed:></td>
759c295d
TC
106 </tr>
107 <tr>
d09682dd 108 <th valign="top" nowrap="nowrap" bgcolor="#FFFFFF" align="left">Flags:</th>
759c295d 109 <td bgcolor="#FFFFFF" width="100%"><:iterator begin flags:><:if FieldPerm flags:>
d09682dd
TC
110 <input type="checkbox" name="flags" value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:>
111 <:eif:> /><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:>
cc9019d1 112 <:eif FieldPerm:><:flag desc:><:iterator separator flags:><br /><:iterator end flags:></td>
d09682dd 113 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit flags:> <:error_img flags:></td>
9604a90c
TC
114 </tr>
115 <tr>
116 <th nowrap="nowrap" align="left" bgcolor="#FFFFFF">Page title:</th>
117 <td width="100%" bgcolor="#FFFFFF">
118 <:ifFieldPerm pageTitle:><input type="text" name="pageTitle" value='<:old pageTitle article pageTitle:>' size="60" maxlength="255" tabindex="7" /> (alternate title)<:or:><:article pageTitle:><:eif:>
119 </td>
120 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit pageTitle:> <:error_img pageTitle:></td>
121 </tr>
122 <tr>
123 <th nowrap="nowrap" align="left" bgcolor="#FFFFFF">Author name:</th>
124 <td width="100%" bgcolor="#FFFFFF" >
125 <: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" tabindex="7" /><:or FieldPerm:><:article author:><:eif FieldPerm:>
126 </td>
127 <td nowrap="nowrap" bgcolor="#FFFFFF" ><:help edit author:> <:error_img author:></td>
759c295d
TC
128 </tr>
129 <tr>
d09682dd 130 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Release date:</th>
27feb834 131 <td bgcolor="#FFFFFF" width="100%">
deae2a52 132 <:if FieldPerm release:><input type="text" name="release" value="<: old release date "%d/%m/%Y" default release :>" size="10" maxlength="10" />
918735d1 133 (dd/mm/yyyy<: ifNew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td>
d09682dd 134 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit release:> <:error_img release:></td>
f5d30ab9
TC
135 </tr>
136 <tr>
d09682dd 137 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Expiry date:</th>
27feb834 138 <td bgcolor="#FFFFFF" width="100%">
deae2a52 139 <:if FieldPerm expire:><input type="text" name="expire" value="<: old expire date "%d/%m/%Y" default expire :>" size="10" maxlength="10" />
918735d1 140 (dd/mm/yyyy - <: ifNew :>default is never, <: or :><: eif :>blank
abf5bbc6 141 for never expires)<:or FieldPerm:><: date "%d/%m/%Y" article expire :><:eif FieldPerm:></td>
d09682dd 142 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit expire:> <:error_img expire:></td>
f5d30ab9
TC
143 </tr>
144 <tr>
d09682dd 145 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Summary length:</th>
27feb834 146 <td bgcolor="#FFFFFF" width="100%">
deae2a52 147 <:if FieldPerm summaryLength:><input type="text" name="summaryLength" size="10" maxlength="10" value="<: old summaryLength default summaryLength :>" />
918735d1 148 (in characters - <: ifNew :>default inherited from <:parentType:>, <: or :><: eif :>
abf5bbc6 149 zero for no summary)<:or FieldPerm:><: article summaryLength :><:eif FieldPerm:></td>
d09682dd 150 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit summary:> <:error_img summaryLength:></td>
f5d30ab9
TC
151 </tr>
152 <tr>
d09682dd 153 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Display threshold:</th>
27feb834 154 <td bgcolor="#FFFFFF" width="100%">
deae2a52 155 <:ifFieldPerm threshold:><input type="text" name="threshold" size="10" maxlength="10" value="<: old threshold default threshold :>" /><:or:><: article threshold :><:eif:>
f5d30ab9 156 </td>
d09682dd 157 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit threshold:> <:error_img
429e9103 158 threshold:></td>
f5d30ab9
TC
159 </tr>
160 <tr>
d09682dd 161 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Keywords:</th>
27feb834 162 <td bgcolor="#FFFFFF" width="100%">
deae2a52 163 <:ifFieldPerm keyword:><input type="text" name="keyword" maxlength="255" size="60" value="<: old keyword default keyword :>" />
abf5bbc6 164 (comma separated)<:or:><: article threshold :><:eif:></td>
d09682dd 165 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit keywords:> <:error_img keyword:></td>
918735d1 166 </tr>
c2096d67
TC
167 <tr>
168 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Always Dynamic:</th>
169 <td bgcolor="#FFFFFF" width="100%">
170 <:ifFieldPerm force_dynamic:><input type="hidden" name="save_force_dynamic" value="1" /><input type="checkbox" name="force_dynamic" value="1" <:if Article force_dynamic :>checked="checked"<:or Article:><:eif Article:> />
171 <:or:><:ifArticle force_dynamic :>Yes<:or Article:>No<:eif Article:><:eif:></td>
172 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit keywords:> <:error_img keyword:></td>
173 </tr>
d64413ee 174<:include admin/article_custom.tmpl optional:>
f5d30ab9 175 <tr>
d09682dd 176 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left" valign="top">Thumbnail image:</th>
429e9103
TC
177 <td width="100%" valign="top" bgcolor="#FFFFFF">
178 <:ifFieldPerm thumbImage:>
d09682dd 179 <input type="file" name="thumbnail" /><:or:><:eif:>
27feb834 180 <:ifArticle thumbImage:><img src="/images/<:article thumbImage:>">
d09682dd 181 <:if FieldPerm thumbImage:><input type=checkbox name="remove_thumb" />
429e9103 182 Remove<:or FieldPerm:><:eif FieldPerm:><:or:><:eif:></td>
d09682dd 183 <td valign="top" nowrap="nowrap" bgcolor="#FFFFFF"><:help edit thumb:> <:error_img
429e9103 184 thumbImage:></td>
f5d30ab9 185 </tr>
27feb834
TC
186 <:if Article id:>
187 <tr>
d09682dd
TC
188 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left" valign="top"><a name="files"></a>Files:</th>
189 <td nowrap="nowrap" bgcolor="#FFFFFF" width="100%"> <:if Files:>
27feb834 190 <table cellpadding="0" cellspacing="0" border="0" bgcolor="#333333">
abf5bbc6
TC
191 <tr>
192 <td>
27feb834
TC
193 <table cellpadding="5" cellspacing="1" border="0">
194 <tr bgcolor="#FFFFFF">
195 <th>Filename</th>
196 <th>Size</th>
197 <th>Type</th>
35c0719f
TC
198 <th>D/l</th>
199 <th>Pay</th>
200 <th>User</th>
201 </tr>
202 <:iterator begin files:>
27feb834
TC
203 <tr bgcolor="#FFFFFF">
204 <td><:file displayName:></td>
35c0719f 205 <td align="center"><:kb file sizeInBytes:></td>
27feb834
TC
206 <td><:file contentType:></td>
207 <td align=center><:ifFile download:>Yes<:or:>No<:eif:></td>
208 <td align=center><:ifFile forSale:>Yes<:or:>No<:eif:></td>
35c0719f
TC
209 <td align=center><:ifFile requireUser:>Yes<:or:>No<:eif:></td>
210 </tr>
211 <:iterator end files:>
212 </table>
abf5bbc6
TC
213 </td>
214 </tr>
215 </table>
d09682dd 216 <p><a href="<:script:>?id=<:article id:>&amp;_t=file"><b>Manage Files</b></a>
caa7299c
TC
217 </p>
218 <:or Files:>
d09682dd 219 <p>No files are attached to this article. <a href="<:script:>?id=<:article id:>&amp;_t=file"><b>Manage Files</b></a></p>
abf5bbc6 220 <:eif Files:>
4afdbb1b 221 </td>
d09682dd 222 <td nowrap="nowrap" bgcolor="#FFFFFF" valign="top"><:help edit files:> <:error_img
429e9103 223 files:></td>
4afdbb1b 224 </tr>
f5d30ab9 225 <tr>
d09682dd 226 <th valign="top" nowrap="nowrap" bgcolor="#FFFFFF" align="left">Images:
9fae8be7 227 </th>
de30d08a 228 <td align="center" bgcolor="#FFFFFF" width="100%" name="images"><:if Images:> <:iterator begin
27feb834
TC
229 images:> <img src="/images/<: image image :>" alt="<:image alt :>" width=
230 <:image width:> height=<:image height:>> <:iterator separator images:>
f5d30ab9 231 <hr noshade size="1">
15fb10f2 232 <: iterator end images :>
d09682dd 233 <p align="left"><a href="<:script:>?id=<:article id:>&amp;_t=img"><b>Manage Images</b></a></p>
abf5bbc6 234 <:or Images:>
d09682dd 235 <p align="left">No images are attached to this article. <a href="<:script:>?id=<:article id:>&amp;_t=img"><b>Manage Images</b></a></p>
abf5bbc6 236 <:eif Images:>
55753022 237 </td>
d09682dd 238 <td valign="top" nowrap="nowrap" bgcolor="#FFFFFF"><:help edit images:> <:error_img
429e9103 239 images:></td>
35c0719f 240 </tr>
ca9aa2bf 241 <:or Article:><:eif Article:>
f5d30ab9
TC
242 </table>
243</td>
244</tr>
245</table>
246
918735d1 247 <p><: ifNew :>
d09682dd 248 <input type="submit" name="save" value=" Add New <: articleType:> " />
abf5bbc6 249 <:or:>
d09682dd 250 <:if UserCan edit_save:article:><input type="submit" name="save" value=" Update <: articleType:> " /><:or UserCan:><:eif UserCan:>
abf5bbc6 251 <:eif:></p>
f5d30ab9 252 </form>
918735d1 253<:if children:> <:ifEq [article id] [cfg articles shop]:>
35c0719f
TC
254<h2>Catalogs</h2>
255<:or:>
256<h2><: childtype :></h2>
257<:eif:><a name="children"></a>
258<table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" width="100%" class="table">
27feb834 259 <tr>
f5d30ab9 260 <td>
27feb834
TC
261 <table border=0 cellpadding="6" cellspacing="1" width="100%">
262 <tr bgcolor="#FFFFFF">
9fae8be7
TC
263 <th width="30%">Title</th>
264 <th width="70%">Summary</th>
1d8d4a4a 265 <th>Listed</th>
d09682dd
TC
266 <th nowrap="nowrap">Modify</th>
267 <th nowrap="nowrap">Move</th>
1d8d4a4a 268 </tr>
1df3b258 269<:if UserCan edit_reorder_children:article:>
1d8d4a4a 270 <tr>
d09682dd 271 <td colspan="5" bgcolor="#FFFFFF">Sort by: <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> | <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> | <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></td>
1d8d4a4a 272 </tr>
abf5bbc6 273<:or UserCan:><:eif UserCan:>
1d8d4a4a 274 <:iterator begin children:>
f5d30ab9 275 <tr bgcolor="#FFFFFF">
9fae8be7
TC
276 <td width="30%"><a href="<:child admin:>"><:child title:></a></td>
277 <td width="70%"><: summary child body :></td>
f5d30ab9 278 <td align="center"><: is child listed :></td>
d09682dd
TC
279 <td nowrap="nowrap"> <a href="/cgi-bin/admin/add.pl?id=<:child id:>">Edit</a>
280 <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&amp;remove=1" 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>
281 <td nowrap="nowrap"><:movechild:></td>
99ef7979
TC
282 </tr>
283 <:iterator separator children:> <:iterator end children:>
284 </table>
f5d30ab9
TC
285</td>
286</tr>
287</table>
288<:or children:>
289<:eif children:>
290<:if HaveChildType:>
918735d1
TC
291<:if New:>
292<:or New:>
de30d08a 293<:if UserCan edit_add_child:article:><form action="/cgi-bin/admin/add.pl" "addchild">
d09682dd 294<input type="hidden" name="parentid" value="<:article id:>" />
35c0719f 295 <p>
d09682dd 296 <input type="submit" value="Add <:ifEq [article id] [cfg articles shop]:>Catalog<:or:><: childtype :><:eif:>" />
35c0719f 297 </p>
abf5bbc6 298</form><:or UserCan:><:eif UserCan:>
918735d1 299<:eif New:> <:or HaveChildType:> <:eif HaveChildType:>