]> git.imager.perl.org - bse.git/blame_incremental - site/templates/admin/edit_1.tmpl
added some debugging output to the ifUserCan tag handler
[bse.git] / site / templates / admin / edit_1.tmpl
... / ...
CommitLineData
1<:wrap admin/xbase.tmpl title=>"Edit [articleType]":>
2<h1><:ifNew:>New<:or:>Edit<:eif:> <:articleType:></h1>
3<:ifMessage:>
4<p><b><:message:></b></p>
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
10 catalogs</a> |<:or Eq:><:eif Eq:><:if New:><:or New:> <a href="<:script:>?id=<:article id:>&amp;_t=steps">Manage
11 step children/parents</a> |
12<a href="<:script:>?id=<:article id:>&amp;_t=groups">Manage access</a> |
13<:eif New:></p>
14
15 <h2><:articleType:> Details</h2>
16
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
19<:ifNew:><:or:>
20<:if Or [iadminuser_count] [iadmingroup_count]:>
21 <form action="/cgi-bin/admin/adminusers.pl" name="access">
22 <input type=hidden name=id value="<: article id:>" />
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>
28 <th nowrap="nowrap">
29
30 <font size=2>Manage access:</font>
31 </th>
32 <td bgcolor="#FFFFFF">
33 <select name=adminid>
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:>
40 </select>
41 <input type=submit name="a_showobjectart" value="Manage" />
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:>
54 <form enctype="multipart/form-data" method="post" action="<:script:>" name="edit">
55
56 <input type="hidden" name="lastModified" value="<: old lastModified article lastModified :>" />
57 <input type="hidden" name="type" value="Article" />
58 <input type="hidden" name="level" value="<: level :>" />
59 <input type="hidden" name="id" value="<: article id :>" />
60
61 <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" width="100%" class="table">
62 <tr>
63 <td>
64
65 <table cellpadding="6" border="0" cellspacing="1" width="100%">
66 <tr>
67 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Parent:</th>
68 <td bgcolor="#FFFFFF" width="100%">
69 <:if FieldPerm parentid:><select name="parentid">
70 <option value="">Please select a <:parentType:></option><: list:>
71 </select><:or FieldPerm:><:parent title:> (<:parent id:>)<:eif FieldPerm:>
72 </td>
73 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit section:> <:error_img parentid:></td>
74 </tr>
75 <tr>
76 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Title:
77 </th>
78 <td bgcolor="#FFFFFF" width="100%">
79 <:ifFieldPerm title:><input type="text" name="title" maxlength="<:cfg fields title_size 255:>" size="64" value="<: old title default title :>" />
80 <:or:><:default title:><:eif:></td>
81 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit title:> <:error_img title:></td>
82 </tr>
83 <:if Cfg image title:><tr>
84 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Title image:</th>
85 <td bgcolor="#FFFFFF" width="100%"><:ifFieldPerm titleImage:><:titleImages:> (upload this to
86 the /images/titles directory)<:or:><:article titleImage:><:eif:></td>
87 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit titleImage:> <:error_img titleImage:></td>
88 </tr><:or Cfg:><:eif Cfg:>
89 <tr>
90 <th valign="top" nowrap="nowrap" bgcolor="#FFFFFF" align="left"> Body: </th>
91 <td bgcolor="#FFFFFF" width="100%">
92 <:if FieldPerm body:><textarea name="body" rows="10" cols="60" wrap="virtual"><: old body default body :></textarea>
93 <:or FieldPerm:><:bodytext article body:><:eif FieldPerm:>
94 </td>
95 <td valign="top" nowrap="nowrap" bgcolor="#FFFFFF"><:help body body:> <:error_img body:></td>
96 </tr>
97 <tr>
98 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Template:</th>
99 <td bgcolor="#FFFFFF" width="100%"><:ifFieldPerm template:> <:templates:><:or:><:article template:><:eif:> </td>
100 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit template:> <:error_img template:></td>
101 </tr>
102 <tr>
103 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">List article:</th>
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>
105 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit listed:> <:error_img listed:></td>
106 </tr>
107 <tr>
108 <th valign="top" nowrap="nowrap" bgcolor="#FFFFFF" align="left">Flags:</th>
109 <td bgcolor="#FFFFFF" width="100%"><:iterator begin flags:><:if FieldPerm flags:>
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:>
112 <:eif FieldPerm:><:flag desc:><:iterator separator flags:><br /><:iterator end flags:></td>
113 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit flags:> <:error_img flags:></td>
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>
128 </tr>
129 <tr>
130 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Release date:</th>
131 <td bgcolor="#FFFFFF" width="100%">
132 <:if FieldPerm release:><input type="text" name="release" value="<: old release date "%d/%m/%Y" default release :>" size="10" maxlength="10" />
133 (dd/mm/yyyy<: ifNew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td>
134 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit release:> <:error_img release:></td>
135 </tr>
136 <tr>
137 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Expiry date:</th>
138 <td bgcolor="#FFFFFF" width="100%">
139 <:if FieldPerm expire:><input type="text" name="expire" value="<: old expire date "%d/%m/%Y" default expire :>" size="10" maxlength="10" />
140 (dd/mm/yyyy - <: ifNew :>default is never, <: or :><: eif :>blank
141 for never expires)<:or FieldPerm:><: date "%d/%m/%Y" article expire :><:eif FieldPerm:></td>
142 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit expire:> <:error_img expire:></td>
143 </tr>
144 <tr>
145 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Summary length:</th>
146 <td bgcolor="#FFFFFF" width="100%">
147 <:if FieldPerm summaryLength:><input type="text" name="summaryLength" size="10" maxlength="10" value="<: old summaryLength default summaryLength :>" />
148 (in characters - <: ifNew :>default inherited from <:parentType:>, <: or :><: eif :>
149 zero for no summary)<:or FieldPerm:><: article summaryLength :><:eif FieldPerm:></td>
150 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit summary:> <:error_img summaryLength:></td>
151 </tr>
152 <tr>
153 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Display threshold:</th>
154 <td bgcolor="#FFFFFF" width="100%">
155 <:ifFieldPerm threshold:><input type="text" name="threshold" size="10" maxlength="10" value="<: old threshold default threshold :>" /><:or:><: article threshold :><:eif:>
156 </td>
157 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit threshold:> <:error_img
158 threshold:></td>
159 </tr>
160 <tr>
161 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left">Keywords:</th>
162 <td bgcolor="#FFFFFF" width="100%">
163 <:ifFieldPerm keyword:><input type="text" name="keyword" maxlength="255" size="60" value="<: old keyword default keyword :>" />
164 (comma separated)<:or:><: article threshold :><:eif:></td>
165 <td nowrap="nowrap" bgcolor="#FFFFFF"><:help edit keywords:> <:error_img keyword:></td>
166 </tr>
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>
174<:include admin/article_custom.tmpl optional:>
175 <tr>
176 <th nowrap="nowrap" bgcolor="#FFFFFF" align="left" valign="top">Thumbnail image:</th>
177 <td width="100%" valign="top" bgcolor="#FFFFFF">
178 <:ifFieldPerm thumbImage:>
179 <input type="file" name="thumbnail" /><:or:><:eif:>
180 <:ifArticle thumbImage:><img src="/images/<:article thumbImage:>">
181 <:if FieldPerm thumbImage:><input type=checkbox name="remove_thumb" />
182 Remove<:or FieldPerm:><:eif FieldPerm:><:or:><:eif:></td>
183 <td valign="top" nowrap="nowrap" bgcolor="#FFFFFF"><:help edit thumb:> <:error_img
184 thumbImage:></td>
185 </tr>
186 <:if Article id:>
187 <tr>
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:>
190 <table cellpadding="0" cellspacing="0" border="0" bgcolor="#333333">
191 <tr>
192 <td>
193 <table cellpadding="5" cellspacing="1" border="0">
194 <tr bgcolor="#FFFFFF">
195 <th>Filename</th>
196 <th>Size</th>
197 <th>Type</th>
198 <th>D/l</th>
199 <th>Pay</th>
200 <th>User</th>
201 </tr>
202 <:iterator begin files:>
203 <tr bgcolor="#FFFFFF">
204 <td><:file displayName:></td>
205 <td align="center"><:kb file sizeInBytes:></td>
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>
209 <td align=center><:ifFile requireUser:>Yes<:or:>No<:eif:></td>
210 </tr>
211 <:iterator end files:>
212 </table>
213 </td>
214 </tr>
215 </table>
216 <p><a href="<:script:>?id=<:article id:>&amp;_t=file"><b>Manage Files</b></a>
217 </p>
218 <:or Files:>
219 <p>No files are attached to this article. <a href="<:script:>?id=<:article id:>&amp;_t=file"><b>Manage Files</b></a></p>
220 <:eif Files:>
221 </td>
222 <td nowrap="nowrap" bgcolor="#FFFFFF" valign="top"><:help edit files:> <:error_img
223 files:></td>
224 </tr>
225 <tr>
226 <th valign="top" nowrap="nowrap" bgcolor="#FFFFFF" align="left">Images:
227 </th>
228 <td align="center" bgcolor="#FFFFFF" width="100%" name="images"><:if Images:> <:iterator begin
229 images:> <img src="/images/<: image image :>" alt="<:image alt :>" width=
230 <:image width:> height=<:image height:>> <:iterator separator images:>
231 <hr noshade size="1">
232 <: iterator end images :>
233 <p align="left"><a href="<:script:>?id=<:article id:>&amp;_t=img"><b>Manage Images</b></a></p>
234 <:or Images:>
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>
236 <:eif Images:>
237 </td>
238 <td valign="top" nowrap="nowrap" bgcolor="#FFFFFF"><:help edit images:> <:error_img
239 images:></td>
240 </tr>
241 <:or Article:><:eif Article:>
242 </table>
243</td>
244</tr>
245</table>
246
247 <p><: ifNew :>
248 <input type="submit" name="save" value=" Add New <: articleType:> " />
249 <:or:>
250 <:if UserCan edit_save:article:><input type="submit" name="save" value=" Update <: articleType:> " /><:or UserCan:><:eif UserCan:>
251 <:eif:></p>
252 </form>
253<:if children:> <:ifEq [article id] [cfg articles shop]:>
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">
259 <tr>
260 <td>
261 <table border=0 cellpadding="6" cellspacing="1" width="100%">
262 <tr bgcolor="#FFFFFF">
263 <th width="30%">Title</th>
264 <th width="70%">Summary</th>
265 <th>Listed</th>
266 <th nowrap="nowrap">Modify</th>
267 <th nowrap="nowrap">Move</th>
268 </tr>
269<:if UserCan edit_reorder_children:article:>
270 <tr>
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>
272 </tr>
273<:or UserCan:><:eif UserCan:>
274 <:iterator begin children:>
275 <tr bgcolor="#FFFFFF">
276 <td width="30%"><a href="<:child admin:>"><:child title:></a></td>
277 <td width="70%"><: summary child body :></td>
278 <td align="center"><: is child listed :></td>
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>
282 </tr>
283 <:iterator separator children:> <:iterator end children:>
284 </table>
285</td>
286</tr>
287</table>
288<:or children:>
289<:eif children:>
290<:if HaveChildType:>
291<:if New:>
292<:or New:>
293<:if UserCan edit_add_child:article:><form action="/cgi-bin/admin/add.pl" "addchild">
294<input type="hidden" name="parentid" value="<:article id:>" />
295 <p>
296 <input type="submit" value="Add <:ifEq [article id] [cfg articles shop]:>Catalog<:or:><: childtype :><:eif:>" />
297 </p>
298</form><:or UserCan:><:eif UserCan:>
299<:eif New:> <:or HaveChildType:> <:eif HaveChildType:>