* Added encoding="form" parameter to most of the macros using the request handler * Renamed commentsMode to commentMode (comments_mode to comment_mode in DB) * Reactivated notifications in a simplified manner * Throw an error in global sendMail() method if arguments are not sufficient * Added HopObject.notify() method * Added HopObject.kind_macro() method (provides the constructor's name in lowercase) * Added Messages.skin containing subskins suited for e-mail output * Removed obsolete skin files * Added reset_action() method for resetting a user's password to Members prototype * Added require() method to Membership prototype; wrapped static require() method around it * Added Membership.notify() method which does all the member-related notification stuff * Send notification on membership removal * Fixed contact form in Membership prototype * Dropped e-mail property from Site prototype (users can be contacted via Membership.contact_action(), Root prototype has extra e-mail property) * Added missing getPermission() method to User prototype, always requiring a privileged user
536 lines
16 KiB
Text
536 lines
16 KiB
Text
<% #main %>
|
|
<% response.pager %>
|
|
<% response.list %>
|
|
<% response.pager %>
|
|
|
|
<% #navigation %>
|
|
<div class="boxheader">admin</div>
|
|
<div class="box">
|
|
<% admin.link sites prefix="... " suffix="<br />" %>
|
|
<% admin.link users prefix="... " suffix="<br />" %>
|
|
<% admin.link log prefix="... " suffix="<br />" %>
|
|
<% admin.link setup prefix="... " suffix="<br />" %>
|
|
<% admin.link status prefix="... " suffix="<br />" %>
|
|
</div>
|
|
|
|
<% #welcome %>
|
|
<p><em>Note</em>: Since you are system administrator of this Antville
|
|
installation you can also define "<% site.title %>" as its front page site.
|
|
To do so simply enter <code><% site.name %></code> into the option
|
|
"front page site" of the <% root.admin.link setup "system preferences" %>.
|
|
If this site is open it will replace the default front page.
|
|
(Of course you can change this setting anytime you want.)</p>
|
|
|
|
<% #status %>
|
|
<table cellspacing="0" cellpadding="2">
|
|
<tr>
|
|
<td colspan="2" class="pageTitle" nowrap="nowrap"><% response.title %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Uptime:</td>
|
|
<td nowrap="nowrap"><% system.upSince | age %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Active threads:</td>
|
|
<td nowrap="nowrap"><% system.activeThreads %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Maximum threads:</td>
|
|
<td nowrap="nowrap"><% system.maxThreads %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Free threads:</td>
|
|
<td nowrap="nowrap"><% system.freeThreads %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Sessions:</td>
|
|
<td nowrap="nowrap"><% system.sessionCount %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">HTTP requests:</td>
|
|
<td nowrap="nowrap"><% system.requestCount %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Xml-Rpc requests:</td>
|
|
<td nowrap="nowrap"><% system.xmlRpcCount %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Errors:</td>
|
|
<td nowrap="nowrap"><% system.errorCount %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Objects in cache:</td>
|
|
<td nowrap="nowrap"><% system.cacheUsage %></td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Free memory:</td>
|
|
<td nowrap="nowrap"><% system.freeMemory | format ###,### %> KB</td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Used memory:</td>
|
|
<td nowrap="nowrap"><% system.usedMemory | format ###,### %> KB</td>
|
|
</tr>
|
|
<tr>
|
|
<td nowrap="nowrap">Total memory:</td>
|
|
<td nowrap="nowrap"><% system.totalMemory | format ###,### %> KB</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<% #sites %>
|
|
<div class="pageTitle">Site Manager</div>
|
|
<form method="post" action="<% response.action %>">
|
|
<table cellspacing="0" cellpadding="2">
|
|
<tr>
|
|
<td>... show</td>
|
|
<td>
|
|
<% admin.dropdown name="filter"
|
|
values="all sites,public sites,private sites,blocked sites,trusted sites" %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>... sorted by</td>
|
|
<td>
|
|
<% admin.dropdown name="order" values="last update,creation date,name" %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>... order</td>
|
|
<td>
|
|
<% admin.dropdown name="dir" values="descending,ascending" %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>... search</td>
|
|
<td><input name="query" value="<% request.query encoding="form" %>" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td><button input type="submit" name="search" value="1">show sites</button></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<% #Site %>
|
|
<a name="<% item.id %>" id="<% item.id %>"></name>
|
|
<table border="0" class="sysmgrListitem" cellspacing="0" cellpadding="0" width="100%">
|
|
<tr>
|
|
<td colspan="2">
|
|
<span class="label <% item.status %>"><% item.status %></span>
|
|
<span class="label <% item.mode %>"><% item.mode %></span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100%" valign="top">
|
|
<div><strong><% item.title | item.link %></strong></div>
|
|
<div><%// item.tagline suffix="<br />" %>
|
|
<a href="<% item.href %>"><% item.href %></a>
|
|
</div>
|
|
<div class="small">created by <% item.creator as="link" %> on
|
|
<% item.created | format short %><br />
|
|
last update: <% item.modified default="no updates so far" | format short %><br />
|
|
diskusage: FIXME <%// item.diskusage %>
|
|
</div>
|
|
</td>
|
|
<td class="small" valign="top" align="right">
|
|
<% admin.link edit <% item.id %> prefix="... " %><br />
|
|
<% admin.link delete <% item.id %> prefix="... " %>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<% #editSite %>
|
|
<form method="post" action="<% response.action %>#<% site.id %>">
|
|
<input type="hidden" name="id" value="<% request.id %>" />
|
|
<input type="hidden" name="page" value="<% request.page default="0" %>" />
|
|
|
|
<table cellspacing="0" cellpadding="0" width="100%">
|
|
<tr>
|
|
<td valign="top" class="small">
|
|
<% admin.count <% item.stories %> suffix=" stories<br />" %>
|
|
<% admin.count <% item.stories.comments %> suffix=" comments<br />" %>
|
|
<% admin.count <% item.images %> suffix=" images<br />" %>
|
|
<% admin.count <% item.files %> suffix=" files<br />" %>
|
|
</td>
|
|
<td class="small">status:<br />
|
|
<% item.select status %><br />
|
|
<button type="submit" name="save" value="1">save</button>
|
|
<button type="submit" name="cancel" value="1">cancel</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<% #deleteSite %>
|
|
<form method="post" action="<% response.action %>">
|
|
<input type="hidden" name="id" value="<% request.id %>" />
|
|
<input type="hidden" name="page" value="<% request.page %>" />
|
|
|
|
<table style="background-color: #ffcc00;" cellspacing="0" cellpadding="3" width="100%">
|
|
<tr>
|
|
<td valign="top">
|
|
<p><strong>Warning!</strong></p>
|
|
<p>You're about to delete the above site. Please mind that this is an
|
|
irreversible process, and any asset of this site will be deleted. Just to
|
|
remind you: <% item.alias %> currently contains
|
|
<strong><% admin.count <% item.stories %> suffix=" stories" %></strong> with
|
|
<strong><% admin.count <% item.stories.comments %> suffix=" comments" %> </strong>,
|
|
<strong><% admin.count <% item.images %> suffix=" images" %> </strong> and
|
|
<strong><% admin.count <% item.files %> suffix=" files" %></strong>.
|
|
Also all the subscriptions to this site will be removed.</p>
|
|
<p><strong>Are you sure you want to delete this site?</strong></p>
|
|
<p><button type="submit" name="remove" value="1">yes</button>
|
|
<button type="submit" name="cancel" value="1"> no </button></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<% #users %>
|
|
<div class="pageTitle">User Manager</div>
|
|
<form method="post" action="<% response.action %>">
|
|
<table cellspacing="0" cellpadding="2">
|
|
<tr>
|
|
<td>... show</td>
|
|
<td>
|
|
<% admin.dropdown name="filter"
|
|
values="all users,blocked users,trusted users,privileged users" %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>... sorted by</td>
|
|
<td>
|
|
<% admin.dropdown name="order" values="last visit,registration,username" %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>... order</td>
|
|
<td><% admin.dropdown name="dir" values="descending,ascending" %></td>
|
|
</tr>
|
|
<tr>
|
|
<td>... search</td>
|
|
<td><input name="query" value="<% request.query %>" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td><button input type="submit" name="search" value="1">show users</button></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<% #User %>
|
|
<a name="<% item.id %>" id="<% item.id %>"></name>
|
|
<table class="sysmgrListitem" cellspacing="0" cellpadding="0" width="100%">
|
|
<tr>
|
|
<td colspan="2">
|
|
<span class="label <% item.status %>"><% item.status %></span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">
|
|
<div><strong><% item.name %></strong></div>
|
|
<div><% item.email suffix="<br />" %>
|
|
<a href="<% item.url %>"><% item.url %></a></div>
|
|
<div class="small">
|
|
registered: <% item.created | format "yyyy-MM-dd HH:mm" %><br />
|
|
last visit: <% item.visited | format "yyyy-MM-dd HH:mm" %>
|
|
</div>
|
|
</td>
|
|
<td class="small" valign="top" align="right">
|
|
<% admin.link edit <% item.id %> prefix="... " %>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<% #editUser %>
|
|
<form method="post" action="<% response.action %>">
|
|
<input type="hidden" name="id" value="<% request.id %>" />
|
|
<input type="hidden" name="page" value="<% request.page %>" />
|
|
<table cellspacing="0" cellpadding="0" width="100%">
|
|
<tr>
|
|
<td class="small" valign="top">
|
|
<% admin.count <% item.stories %> suffix=" stories" %><!--
|
|
--><% admin.items <% item.stories %> prefix=": " %><br />
|
|
<% admin.count <% item.comments %> suffix=" comments" %><!--
|
|
--><% admin.items <% item.comments %> prefix=": " %><br />
|
|
<% admin.count <% item.images %> suffix=" images" %><!--
|
|
--><% admin.items <% item.images %> prefix=": " %><br />
|
|
<% admin.count <% item.files %> suffix=" files" %><!--
|
|
--><% admin.items <% item.files %> prefix=": " %><br />
|
|
</td>
|
|
<td class="small">
|
|
Status:<br />
|
|
<% item.select status %><br />
|
|
<button type="submit" name="save" value="1">save</button>
|
|
<button type="submit" name="cancel" value="1">cancel</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<% #log %>
|
|
<div class="pageTitle">System Log</div>
|
|
<form method="post" action="<% response.action %>">
|
|
<table cellspacing="0" cellpadding="2">
|
|
<tr>
|
|
<td>... show</td>
|
|
<td>
|
|
<% admin.dropdown name="filter"
|
|
values="all entries,site entries,user entries,root entries" %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>... order</td>
|
|
<td><% admin.dropdown name="dir" values="descending,ascending" %></td>
|
|
</tr>
|
|
<tr>
|
|
<td>... search</td>
|
|
<td><input name="query" value="<% request.query %>" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>
|
|
<button type="submit" name="search" value="1">show entries</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<% #LogEntry %>
|
|
<table border="0" class="sysmgrListitem" cellspacing="0" cellpadding="0" width="100%">
|
|
<tr>
|
|
<td>
|
|
<span class="label <% item.context_type %>"><% item.context_type %></span>
|
|
</td>
|
|
<td class="small" align="right" nowrap="nowrap">
|
|
<% item.created | format "yyyy-MM-dd HH:mm" %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="100%">
|
|
<% item.context.name prefix="<strong>" suffix="</strong><br />" %>
|
|
Action: <% item.action %><br />
|
|
User: <% item.creator %>
|
|
</td>
|
|
<td class="small" valign="top" align="right"></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<% #setup %>
|
|
<form method="post" action="<% response.action %>">
|
|
<table border="0" cellspacing="0" cellpadding="2">
|
|
<tr>
|
|
<td colspan="2"><strong>General</strong></td>
|
|
</tr>
|
|
<!-- tr>
|
|
<td valign="top">System URL:</td>
|
|
<td><%// root.sys_url as="editor" size="20" %><br />
|
|
<span class="small">This URL will be used by Antville in the footer of various
|
|
confirmation mails. You should set it to the URL of the front page of your
|
|
Antville installation.</span></td>
|
|
</tr -->
|
|
<!-- tr>
|
|
<td valign="top">Front page<br />site:</td>
|
|
<td><% root.sys_frontSite as="editor" size="20" %><br />
|
|
<span class="small">If you enter the alias of a public site here the front page
|
|
of this Antville installation will display the selected site instead of the
|
|
default front page.</span></td>
|
|
</tr -->
|
|
<tr>
|
|
<td valign="top">e-mail:</td>
|
|
<td>
|
|
<% root.input email %><br />
|
|
<span class="small">
|
|
Antville will use this e-mail address to send various confirmation
|
|
messages (e.g. when a user registers within the front page)
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Notifications:</td>
|
|
<td>
|
|
<% root.select notificationScope %> may notify members<br />
|
|
<span class="small">
|
|
By enabling this option site owners can define the receipients for
|
|
notification e-mails. (E.g. for new or updated stories and comments or
|
|
uploaded images and files.)
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Quota per site:</td>
|
|
<td>
|
|
<% root.input quota %> Kb<br />
|
|
<span class="small">
|
|
Maximum amount of disk space, which can be used for images and files per
|
|
site. This does not apply for trusted sites. If left empty, then the disk
|
|
space per site is not restricted.
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
<% admin.moduleSetup %>
|
|
|
|
<tr>
|
|
<td colspan="2">
|
|
<div class="blockSeparator"> </div><br />
|
|
<strong>Creation of new sites</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Sites may be<br /> created by:</td>
|
|
<td>
|
|
<% root.select creationScope %><br />
|
|
<span class="small">
|
|
Here you can choose who may create new sites: all registered users or
|
|
just those who are "trusted" (system administrators have this right
|
|
anyway).
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Delay between<br />creation of<br />two sites:</td>
|
|
<td>
|
|
<% root.input creationDelay %>
|
|
<span class="small">
|
|
days<br />
|
|
This is the amount of time a user has to wait before creating a new site
|
|
(this doesn't affect "trusted" users or system administrators).
|
|
</span>
|
|
</td>
|
|
|
|
<tr>
|
|
<td colspan="2">
|
|
<div class="blockSeparator"> </div><br />
|
|
<strong>Qualifying</strong>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Users must be<br />registered for:</td>
|
|
<td>
|
|
<% root.input qualifyingPeriod maxlength="2" %>
|
|
<span class="small"> days</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">or since:</td>
|
|
<td>
|
|
<% root.input qualifyingDate %>
|
|
<span class="small">
|
|
(eg. 2002-05-25 00:00)<br />
|
|
Here you can either specify the time a user has to be registered or you
|
|
define a timestamp which means that only users who have registered
|
|
<em>before</em> are allowed to participate (ie. create sites, stories,
|
|
images et al.)
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<div class="blockSeparator"> </div><br />
|
|
<strong>Automatic cleanup</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" class="small" valign="top">
|
|
Antville has some features that ease system administration: it can
|
|
automatically clean up the accesslog, block those sites being private for
|
|
too long, and it can automatically remove sites that are inactive (both
|
|
features can be enabled or disabled separately below). Whatever you choose,
|
|
it will be done once in 24 hours.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Automatic cleanup:</td>
|
|
<td>
|
|
<% root.checkbox autoCleanupEnabled label="enabled" %><br />
|
|
<span class="small">
|
|
Enabling this feature means that Antville will search for inactive or
|
|
private sites once in 24 hours.
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Start at hour:</td>
|
|
<td>
|
|
<% root.select autoCleanupStartTime %><br />
|
|
<span class="small">
|
|
Here you can define when Antville should start the cleanup process
|
|
(you should choose a time when there is low traffic, e.g. at night)
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<div class="blockSeparator"> </div><br />
|
|
<strong>Phasing out private/inactive sites</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" class="small" valign="top">
|
|
Antville can host both public and private sites. Since private sites are
|
|
accessible for members only and won't appear on the front page or in the
|
|
site directory this can be a risky thing (system administrators can access
|
|
those private sites, though). To ease administration Antville can
|
|
automatically search for private sites hosted here and disable them being
|
|
private for too long (below you can define the time span). However, please
|
|
note that his does not affect sites created by "trusted" users.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Phase out private<br />sites:</td>
|
|
<td><% root.checkbox phaseOutPrivatSites label="enabled" %></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" class="small" valign="top">
|
|
Antville can automatically remove sites that are inactive for too long.
|
|
Here you can decide if you want to enable this feature, define the number
|
|
of days of inactivity before Antville will send warning e-mails or finally
|
|
remove inactive sites.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Phase out inactive<br />sites:</td>
|
|
<td><% root.checkbox phaseOutInactiveSites label="enabled" %></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" class="small" valign="top">
|
|
Before finally phasing out a site you can notify the site owners that it's
|
|
about time. Additionally, you can specify a grace period determining the
|
|
time between notification and the ultimate deadline when nothing will
|
|
save the site anymore.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Warn via e-mail:</td>
|
|
<td>
|
|
<% root.input phaseOutNotificationPeriod %>
|
|
<span class="small">
|
|
days<br />
|
|
Here you can define the time a site is allowed to be private before
|
|
Antville will send a message to the owner telling that the site will be
|
|
blocked, soon.
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Time before<br />blocking:</td>
|
|
<td>
|
|
<% root.input phaseOutGracePeriod %>
|
|
<span class="small">
|
|
days<br />
|
|
Choose the time between sending the warning e-mail and actually blocking
|
|
a site that has been private for too long. After blocking a site its
|
|
owner will receive a message that the site was blocked.
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td><br />
|
|
<button type="submit" name="save" value="1">Save</button>
|
|
<button type="submit" name="cancel" value="1">Cancel</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|