Two bug fixes, for Wiki History and initial drop down setting in the Group Search dialog.

Documented the Wiki Page history template and i18n'ed the delete confirmation in the history
interface.
This commit is contained in:
Colin Kuskie 2006-12-18 22:57:38 +00:00
parent 16e2ad99da
commit bea0ae472a
5 changed files with 77 additions and 8 deletions

View file

@ -9,6 +9,8 @@
method instead of finding the path manually.
- fix: Avatar in Thread & Posts of CS
- fix: CS Phishing Exploit.
- fix: Groups admin gui
- fix: Wiki does not show history correctly
7.3.1
- Fixed a problem with IE and resizable text areas that caused IE to crash

View file

@ -310,16 +310,17 @@ sub www_getHistory {
return $self->session->privilege->insufficient unless $self->canEdit;
my $var = {};
my ($icon, $date) = $self->session->quick(qw(icon datetime));
my $i18n = WebGUI::International->new($self->session, 'Asset_WikPage');
foreach my $revision (@{$self->getRevisions}) {
my $user = WebGUI::User->new($self->session, $self->get("actionTakenBy"));
my $user = WebGUI::User->new($self->session, $revision->get("actionTakenBy"));
push(@{$var->{pageHistoryEntries}}, {
toolbar => $icon->delete("func=purgeRevision;revisionDate=".$self->get("revisionDate"), $self->get("url"), "Delete this revision?")
.$icon->edit('func=edit;revision='.$self->get("revisionDate"), $self->get("url"))
.$icon->view('func=view;revision='.$self->get("revisionDate"), $self->get("url")),
date => $date->epochToHuman($self->get("revisionDate")),
toolbar => $icon->delete("func=purgeRevision;revisionDate=".$revision->get("revisionDate"), $revision->get("url"), $i18n->get("delete confirmation"));
.$icon->edit('func=edit;revision='.$revision->get("revisionDate"), $revision->get("url"))
.$icon->view('func=view;revision='.$revision->get("revisionDate"), $revision->get("url")),
date => $date->epochToHuman($revision->get("revisionDate")),
username => $user->username,
actionTaken => $self->get("actionTaken"),
interval => join(" ", $date->secondsToInterval(time() - $self->get("revisionDate")))
actionTaken => $revision->get("actionTaken"),
interval => join(" ", $date->secondsToInterval(time() - $revision->get("revisionDate")))
});
}
return $self->processTemplate($var, $self->getWiki->get('pageHistoryTemplateId'));

View file

@ -119,6 +119,32 @@ our $HELP = {
],
},
'history template' => {
title => 'history title',
body => 'history body',
isa => [
],
variables => [
{
'name' => 'history toolbar',
},
{
'name' => 'history date',
},
{
'name' => 'history username',
},
{
'name' => 'history actionTaken',
},
{
'name' => 'history interval',
},
],
related => [
],
},
};
1;

View file

@ -118,7 +118,7 @@ sub getGroupSearchForm {
);
$f->selectBox(
-name=>"modifier",
-value=>($session->scratch->get("groupSearchModifier") || $i18n->get("contains") ),
-value=>($session->scratch->get("groupSearchModifier") || "contains" ),
-options=>{
startsWith=>$i18n->get("starts with"),
contains=>$i18n->get("contains"),

View file

@ -182,6 +182,46 @@ our $I18N =
lastUpdated => 1165812138,
},
'history title' => {
message => q|Wiki Page, Show History Template|,
lastUpdated => 1166050472,
},
'history body' => {
message => q|These variables are available for use in the template for displaying the history of edits and changes to a Wiki Page.|,
lastUpdated => 1165812138,
},
'history toolbar' => {
message => q|A toolbar with icons to delete, edit, or view revisions of this page.|,
lastUpdated => 1165812138,
},
'history date' => {
message => q|The date this revision of the page was committed.|,
lastUpdated => 1165812138,
},
'history username' => {
message => q|The name of the user who committed this page.|,
lastUpdated => 1165812138,
},
'history actionTaken' => {
message => q|The action that was taken in the revision, usually this will be "Edit".|,
lastUpdated => 1165812138,
},
'history interval' => {
message => q|How long ago the page was committed.|,
lastUpdated => 1165812138,
},
'delete confirmation' => {
message => q|Delete this revision?|,
lastUpdated => 1166484508,
},
};
1;