-<html>
-<head>
-
- <title>
- Administration - <: ifnew :>New<: or :>Edit<: eif :> <:articleType:>
- </title>
-
- <link rel="stylesheet" type="text/css" href="/css/admin.css">
-
-</head>
-
-<body>
-
- <input type="button" onclick="history.go(0);" value=" Refresh ">
-
- <h1>Administration Page</h1>
-
- <h2>Select Images First</h2>
-
- <p><form enctype="multipart/form-data" method="POST" action="<:script:>">
-
- <p>
- <input type="submit" name="artimg" value="<:articleType:> Image Wizard">
- </p>
+<:wrap admin/base.tmpl title=>[cond [ifNew] [cat "New " [articleType]] [cat "Edit " [articleType] ": " [article title]]], js => "admin_edit.js":>
+<h1><:ifNew:>New<:or:>Edit<:eif:> <:articleType:></h1>
+<:if Message:>
+<div id="message" <:ifError:>class="error"<:or:><:eif:>><:message:></div>
+<:or Message:><:eif Message:>
+<:include admin/include/article_menu.tmpl:>
<h2><:articleType:> Details</h2>
- <p><:message:> | <a href="/admin/">Admin menu</a> | <:ifnew:><:or:><a href="<:article admin:>">See article</a> | <:eif:><:editParent:>
-<input type="hidden" name="level" value="<: level :>">
- <input type="hidden" name="id" value="<: article id :>">
+<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>
- </p>
-<table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000">
- <tr>
- <td>
-
- <table cellpadding="6" border="0" cellspacing="1">
- <tr>
- <th> <:parentType:>: </th>
- <td bgcolor="#FFFFFF">
- <select name="parentid">
- <option value="">Please select a Section <: ifart :><:
- list subsections :><:or:><:list sections:><:eif:>
+<:ifNew:><:or:>
+<:if Or [iadminuser_count] [iadmingroup_count]:>
+ <form action="/cgi-bin/admin/adminusers.pl" name="access">
+ <input type="hidden" name="id" value="<: article id:>" />
+ <table class="editform editformtiny">
+ <tr>
+ <th>Manage access: </th>
+ <td>
+ <select name="adminid">
+<:iterator begin adminusers:>
+<option value="<:iadminuser id:>">User <:iadminuser logon:>
+</option><:iterator end adminusers:>
+<:iterator begin admingroups:>
+<option value="<:iadmingroup id:>">Group <:iadmingroup name:>
+</option><:iterator end admingroups:>
</select>
- </td>
+ <input type="submit" name="a_showobjectart" value="Manage" />
+ </td>
+ <td class="help"><:help access manage:>
+ </td>
</tr>
+ </table>
+ </form>
+<br />
+<:or Or:><:eif Or:>
+<:eif:>
+ <form enctype="multipart/form-data" method="post" action="<:script:>" name="edit">
+
+ <input type="hidden" name="lastModified" value="<:article lastModified :>" />
+ <input type="hidden" name="type" value="Article" />
+ <input type="hidden" name="level" value="<: level :>" />
+ <input type="hidden" name="id" value="<: article id :>" />
+<:ifNew:><:csrfp admin_add_article hidden:><:or:><:csrfp admin_save_article hidden:><:eif:>
+ <table class="editform">
<tr>
- <th> <:articleType:> Title: </th>
- <td bgcolor="#FFFFFF">
- <input type="text" name="title" maxlength="64" size="64" value="<: article title :>">
+ <th>Parent:</th>
+ <td>
+ <:if FieldPerm parentid:><select name="parentid">
+ <option value="">Please select a <:parentType:></option><: list:>
+ </select><:or FieldPerm:><:parent title:> (<:parent id:>)<:eif FieldPerm:>
</td>
+ <td class="help"><:help edit section:> <:error_img parentid:></td>
</tr>
<tr>
- <th> Title Image: </th>
- <td bgcolor="#FFFFFF"> <:titleImages:> (upload this to the /images/titles
- directory) </td>
+ <th>Title:</th>
+ <td>
+ <:ifFieldPerm title:><input type="text" name="title" maxlength="<:cfg fields title_size 255:>" size="64" value="<: old title default title :>" />
+ <:or:><:default title:><:eif:></td>
+ <td class="help"><:help edit title:> <:error_img title:></td>
</tr>
- <tr>
- <th> Template: </th>
- <td bgcolor="#FFFFFF">
- <:templates:>
+ <:if Cfg "title alias" [concatenate level [article level]]:><tr>
+ <th>Alias:</th>
+ <td>
+ <: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:>
</td>
+ <td class="help"><:help edit titleAlias:> <:error_img titleAlias:></td>
+ </tr><:or Cfg:><:eif Cfg:>
+ <tr>
+ <th>Summary:
+ </th>
+ <td>
+ <:ifFieldPerm summary:><input type="text" name="summary" maxlength="<:cfg fields summary_size 255:>" size="64" value="<: old summary default summary :>" />
+ <:or:><:default summary:><:eif:></td>
+ <td class="help"><:help edit summary:> <:error_img summary:></td>
</tr>
+ <:if Cfg image title:><tr>
+ <th>Title image:</th>
+ <td><:ifFieldPerm titleImage:><:titleImages:> (upload this to
+ the /images/titles directory)<:or:><:article titleImage:><:eif:></td>
+ <td class="help"><:help edit titleImage:> <:error_img titleImage:></td>
+ </tr><:or Cfg:><:eif Cfg:>
<tr>
- <th valign="top"> Body: </th>
- <td bgcolor="#FFFFFF">
- <textarea name="body" rows="10" cols="60" wrap="virtual"><: article body :></textarea>
+ <th> Body: </th>
+ <td>
+ <:if FieldPerm body:><textarea name="body" rows="10" cols="60"><: old body default body :></textarea>
+ <:or FieldPerm:><:bodytext article body:><:eif FieldPerm:>
</td>
+ <td class="help"><:help body body:> <:error_img body:></td>
</tr>
+ <:if Cfgsection [concatenate level [article level] " menus"]:><tr>
+ <th>Menu:</th>
+ <td>
+ <:if FieldPerm menu:><select name="menu" id="menu">
+ <: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:>
+ <:iterator end cfgsection:>
+ </select><:or FieldPerm:><:article menu:><:eif FieldPerm:>
+ </td>
+ <td class="help"><:help article menu:> <:error_img menu:></td>
+ </tr><:or Cfgsection:><:eif Cfgsection:>
<tr>
- <th> Release Date: </th>
- <td bgcolor="#FFFFFF">
- <input type="text" name="release" value="<: article release :>" size="10" maxlength="10">
- (dd/mm/yyyy<: ifnew :> - default is today<: or :><: eif :>)</td>
+ <th>Template:</th>
+ <td><:ifFieldPerm template:> <:templates:><:or:><:article template:><:eif:> </td>
+ <td class="help"><:help edit template:> <:error_img template:></td>
+ </tr>
+ <tr>
+ <th>List article:</th>
+ <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>
+ <td class="help"><:help edit listed:> <:error_img listed:></td>
</tr>
-
-
<tr>
- <th> Expire Date: </th>
- <td bgcolor="#FFFFFF">
- <input type="text" name="expire" value="<: article expire :>" size="10" maxlength="10">
- (dd/mm/yyyy - <: ifnew :>default is two weeks from now, <: or :><: eif :>blank
- for never expires)</td>
+ <th>Link alias:</th>
+ <td>
+ <:ifFieldPerm linkAlias:><input type="text" name="linkAlias" maxlength="<:cfg fields linkAlias_size 255:>" size="40" value="<: old linkAlias article linkAlias :>" />
+ <:or:><:default linkAlias:><:eif:></td>
+ <td class="help"><:help edit linkAlias:> <:error_img linkAlias:></td>
+ </tr>
+ <tr>
+ <th>Flags:</th>
+ <td><:iterator begin flags:><:if FieldPerm flags:>
+ <input type="checkbox" name="flags" value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:>
+ <:eif:> /><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:>
+ <:eif FieldPerm:><:flag desc:><:iterator separator flags:><br /><:iterator end flags:></td>
+ <td class="help"><:help edit flags:> <:error_img flags:></td>
+ </tr>
+ <tr>
+ <th>Page title:</th>
+ <td>
+ <:ifFieldPerm pageTitle:><input type="text" name="pageTitle" value='<:old pageTitle article pageTitle:>' size="60" maxlength="255" /> (alternate title)<:or:><:article pageTitle:><:eif:>
+ </td>
+ <td class="help"><:help edit pageTitle:> <:error_img pageTitle:></td>
+ </tr>
+ <tr>
+ <th>Meta description:</th>
+ <td>
+ <:ifFieldPerm metaDescription:><input type="text" name="metaDescription" value='<:old metaDescription article metaDescription:>' size="60" maxlength="255" /><:or:><:article metaDescription:><:eif:>
+ </td>
+ <td class="help"><:help edit metaDescription:> <:error_img metaDescription:></td>
+ </tr>
+ <tr>
+ <th>Meta keywords:</th>
+ <td>
+ <:ifFieldPerm metaKeywords:><input type="text" name="metaKeywords" value='<:old metaKeywords article metaKeywords:>' size="60" maxlength="255" /> (comma separated)<:or:><:article metaKeywords:><:eif:>
+ </td>
+ <td class="help"><:help edit metaKeywords:> <:error_img metaKeywords:></td>
+ </tr>
+ <tr>
+ <th>Author name:</th>
+ <td>
+ <: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:>
+ </td>
+ <td class="help"><:help edit author:> <:error_img author:></td>
+ </tr>
+ <tr>
+ <th>Release date:</th>
+ <td>
+ <:if FieldPerm release:><input type="text" name="release" value="<: old release date "%d/%m/%Y" default release :>" size="10" maxlength="10" />
+ (dd/mm/yyyy<: ifNew :> - default is today<: or :><: eif :>)<:or FieldPerm:><: date "%d/%m/%Y" article release :><:eif FieldPerm:></td>
+ <td class="help"><:help edit release:> <:error_img release:></td>
</tr>
<tr>
- <th> Summary Length: </th>
- <td bgcolor="#FFFFFF">
- <input type="text" name="summaryLength" size="10" maxlength="10" value="<: article summaryLength :>">
- (in characters - <: ifnew :>default inherited from section<: if art :> or sub-section<:
- or art :><: eif art :>, <: or :><: eif :>zero for no
- summary)</td>
- </tr>
-
+ <th>Expiry date:</th>
+ <td>
+ <:if FieldPerm expire:><input type="text" name="expire" value="<: old expire date "%d/%m/%Y" default expire :>" size="10" maxlength="10" />
+ (dd/mm/yyyy - <: ifNew :>default is never, <: or :><: eif :>blank
+ for never expires)<:or FieldPerm:><: date "%d/%m/%Y" article expire :><:eif FieldPerm:></td>
+ <td class="help"><:help edit expire:> <:error_img expire:></td>
+ </tr>
<tr>
- <th> Display threshold: </th>
- <td bgcolor="#FFFFFF">
- <input type="text" name="threshold" size="10" maxlength="10" value="<: article threshold :>">
- </td>
+ <th>Summary length:</th>
+ <td>
+ <:if FieldPerm summaryLength:><input type="text" name="summaryLength" size="10" maxlength="10" value="<: old summaryLength default summaryLength :>" />
+ (in characters - <: ifNew :>default inherited from <:parentType:>, <: or :><: eif :>
+ zero for no summary)<:or FieldPerm:><: article summaryLength :><:eif FieldPerm:></td>
+ <td class="help"><:help edit summary:> <:error_img summaryLength:></td>
</tr>
<tr>
- <th> Keywords: </th>
- <td bgcolor="#FFFFFF">
- <input type="text" name="keyword" maxlength="255" size="60" value="<: article keyword :>">
- (comma separated)
+ <th>Display threshold:</th>
+ <td>
+ <:ifFieldPerm threshold:><input type="text" name="threshold" size="10" maxlength="10" value="<: old threshold default threshold :>" /><:or:><: article threshold :><:eif:>
</td>
+ <td class="help"><:help edit threshold:> <:error_img threshold:></td>
</tr>
-
-
-
-
-
+<:include admin/include/edit_common.tmpl:>
+<:include admin/article_custom.tmpl optional:>
+<:include admin/include/article_cfg_custom.tmpl:>
<tr>
- <th>List article:</th>
- <td bgcolor="#FFFFFF">
- <:list listed:> </td>
+ <th>Thumbnail image:</th>
+ <td>
+ <:ifFieldPerm thumbImage:>
+ <input type="file" name="thumbnail" /><:or:><:eif:>
+ <:ifArticle thumbImage:><img src="/images/<:article thumbImage:>">
+ <:if FieldPerm thumbImage:><input type="checkbox" name="remove_thumb" />
+ Remove<:or FieldPerm:><:eif FieldPerm:><:or:><:eif:></td>
+ <td class="help"><:help edit thumb:> <:error_img
+ thumbImage:></td>
</tr>
+ <:if Article id:>
<tr>
- <th>Thumbnails:</th>
- <td bgcolor="#FFFFFF">
- <input type=file name=thumbnail>
- <:ifArticle thumbImage:><img src="/images/<:article thumbImage:>"> <input type=checkbox name="remove_thumb"> Remove<:or:><:eif:></td>
+ <th><a name="files"></a>Files:</th>
+ <td> <:if Files:>
+ <table class="editform">
+ <tr bgcolor="#FFFFFF">
+ <th>Filename</th>
+ <th>Size</th>
+ <th>Type</th>
+ <th>D/l</th>
+ <th>Pay</th>
+ <th>User</th>
+ </tr>
+ <:iterator begin files:>
+ <tr bgcolor="#FFFFFF">
+ <td><:file displayName:></td>
+ <td align="center"><:kb file sizeInBytes:></td>
+ <td><:file contentType:></td>
+ <td align="center"><:ifFile download:>Yes<:or:>No<:eif:></td>
+ <td align="center"><:ifFile forSale:>Yes<:or:>No<:eif:></td>
+ <td align="center"><:ifFile requireUser:>Yes<:or:>No<:eif:></td>
+ </tr>
+ <:iterator end files:>
+ </table>
+ <div><a href="<:script:>?id=<:article id:>&_t=file"><b>Manage Files</b></a>
+ </div>
+ <:or Files:>
+ <div>No files are attached to this article. <a href="<:script:>?id=<:article id:>&_t=file"><b>Manage Files</b></a></div>
+ <:eif Files:>
+ </td>
+ <td class="help"><:help edit files:> <:error_img
+ files:></td>
</tr>
<tr>
- <th valign="top"> Uploaded files: </th>
- <td align="center" bgcolor="#FFFFFF"> <: iterator begin images :> <img src="/images/<: image image :>" alt="<:image alt :>" width=<:image width:> height=<:image height:>> <: iterator separator images
- :>
+ <th>Images:
+ </th>
+ <td id="images"><:if Images:> <:iterator begin
+ images:> <img src="/images/<: image image :>" alt="<:image alt :>" width="<:image width:>" height="<:image height:>" /> <:iterator separator images:>
<hr noshade size="1">
- <: iterator end images :> <br>
+ <: iterator end images :>
+ <p align="left"><a href="<:script:>?id=<:article id:>&_t=img">Manage Images</a></p>
+ <:or Images:>
+ No images are attached to this article. <a href="<:script:>?id=<:article id:>&_t=img">Manage Images</a>
+ <:eif Images:>
+ </td>
+ <td class="help"><:help edit images:> <:error_img
+ images:></td>
+ </tr>
+ <:or Article:><:eif Article:>
</table>
-</td>
-</tr>
-</table>
+<:.call "admin/include/edit_metadata.tmpl", tr: 0 :>
- <p>
- <input type="submit" name="save"
- value=" <: ifnew :>Add New<: or :>Update<: eif :> <: articleType:> "></p>
+ <p><: ifNew :>
+ <input type="submit" name="save" value="Add New <: articleType:>" />
+ <:or:>
+ <:if UserCan edit_save:article:><input type="submit" name="save" value="Update <: articleType:>" /><:or UserCan:><:eif UserCan:>
+ <:eif:></p>
</form>
-<:if children:> <a name="children"></a>
-<table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000">
- <tr>
- <td>
- <table border=0 cellpadding="6" cellspacing="1">
- <tr>
- <th>Title</th>
- <th>Summary</th>
+<:if Children:> <:ifEq [article id] [cfg articles shop]:>
+<h2>Catalogs</h2>
+<:or:>
+<h2><: childtype :></h2>
+<:eif:><a name="children"></a>
+ <table class="editform">
+ <tr>
+ <th width="30%">Title</th>
+ <th width="70%">Summary</th>
<th>Listed</th>
- <th> </th>
+ <th nowrap="nowrap">Modify</th>
+ <th nowrap="nowrap">Move</th>
</tr>
+<:if UserCan edit_reorder_children:article:>
<tr>
- <td colspan="4" bgcolor="#FFFFFF">Reorder child articles: <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
- title</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">by
- date</a> | <a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">reverse
- order</a></td>
+ <td colspan="5" bgcolor="#FFFFFF">Sort by:
+<a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=title&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">title</a> |
+<a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=date&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">date</a> |
+<a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&reverse=1&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">reverse</a> |
+<a href="/cgi-bin/admin/reorder.pl?parentid=<:article id:>&sort=shuffle&refreshto=/cgi-bin/admin/add.pl?id=<:article id:>">shuffle</a></td>
</tr>
+<:or UserCan:><:eif UserCan:>
<:iterator begin children:>
<tr bgcolor="#FFFFFF">
- <td><a href="<:child admin:>"><:child title:></a></td>
- <td><: summary child body :></td>
+ <td width="30%"><a href="<:child admin:>"><:child title:></a></td>
+ <td width="70%"><: summary child body :></td>
<td align="center"><: is child listed :></td>
- <td nowrap> <a href="/cgi-bin/admin/add.pl?id=<:child id:>">Edit</a>
- <:if NextChild:> <a href="/cgi-bin/admin/move.pl?id=<:child id:>&d=down&edit=1&all=1">
- <img src="/images/admin/move_down.gif" width="17" height="13" alt="Move Down" border="0"></a>
- <:or NextChild:> <:eif NextChild:> <:if PrevChild:> <a href="/cgi-bin/admin/move.pl?id=<:child id:>&d=up&edit=1&all=1">
- <img src="/images/admin/move_up.gif" width="17" height="13" alt="Move Up" border="0"></a>
- <:or PrevChild:> <:eif PrevChild:>
- <form action="<:script:>" onSubmit="return window.confirm('Are you sure you want to delete this article')" method=POST>
- <input type=hidden name=id value="<:article id:>">
- <input type=hidden name="deleteid" value="<:child id:>">
- <input type=submit name=remove value="Delete">
- </form>
- </td>
+ <td nowrap="nowrap"> <a href="/cgi-bin/admin/add.pl?id=<:child id:>">Edit</a>
+ <:if UserCan edit_delete_article:child:><a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1&_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>
+ <td nowrap="nowrap"><:movechild:></td>
</tr>
<:iterator separator children:> <:iterator end children:>
</table>
-</td>
-</tr>
-</table>
-<:or children:>
-<:eif children:>
+<:or Children:>
+<:eif Children:>
<:if HaveChildType:>
-<:if new:>
-<:or new:>
-<form action="/cgi-bin/admin/add.pl" method="POST">
-<input type=hidden name="parentid" value="<:article id:>">
-<p><input type=submit value="Add <:childtype:>"></p>
-</form>
-<p><:eif new:> <:or HaveChildType:> <:eif HaveChildType:> </p>
-</body
-></html>
+<:if New:>
+<:or New:>
+<:if UserCan edit_add_child:article:><form action="/cgi-bin/admin/add.pl" name="addchild">
+<input type="hidden" name="parentid" value="<:article id:>" />
+ <p>
+ <input type="submit" value="Add <:ifEq [article id] [cfg articles shop]:>Catalog<:or:><: childtype :><:eif:>" />
+ </p>
+</form><:or UserCan:><:eif UserCan:>
+<:eif New:> <:or HaveChildType:> <:eif HaveChildType:>
+
+<h2>Metadata</h2>
+
+<table class="editform">
+ <tr>
+ <th>Last Modified</th>
+ <td><:= bse.date("%H:%M %d/%m/%Y", article.lastModified) -:></td>
+ </tr>
+ <tr>
+ <th>Last Modified By</th>
+ <td><:= article.lastModifiedBy eq "" ? "(unknown)" : article.lastModifiedBy -:></td>
+ </tr>
+ <tr>
+ <th>Link</th>
+ <td><a href="<:= article.link -:>"><:= article.link -:></a></td>
+ </tr>
+ <tr>
+ <th>Generator</th>
+ <td><:= article.generator -:></td>
+ </tr>
+ <tr>
+ <th>Created</th>
+ <td><:= bse.date("%H:%M %d/%m/%Y", article.created) -:></td>
+ </tr>
+ <tr>
+ <th>Created By</th>
+ <td><:= article.createdBy eq "" ? "(unknown)" : article.createdBy -:></td>
+ </tr>
+</table>
\ No newline at end of file