- Added a better confirmation message when deleting content.

- Added a "commit" option as well as a listing of version tags per the rough
   edges discussions on IRC.
 - Added a "close" or "archive" option to replies.
This commit is contained in:
JT Smith 2006-06-10 20:49:11 +00:00
parent 58566a6ed6
commit 9aa86225be
9 changed files with 413 additions and 371 deletions

View file

@ -450,6 +450,28 @@ sub render {
$var{"console.canUse"} = $acParams->{canUse};
$var{"console.icon"} = $acParams->{icon};
$var{"help.url"} = $self->{_helpUrl};
my $working = WebGUI::VersionTag->getWorking($self->session, 1);
my $workingId = "";
my @tags = ();
if ($working) {
$workingId = $working->getId;
push(@tags, {
url=>$self->session->url->page("op=commitVersionTag;tagId=".$workingId),
title=>$i18n->get("commit my changes","Macro_AdminBar"),
icon=>$self->session->url->extras('adminConsole/small/versionTags.gif')
});
}
my $rs = $self->session->db->read("select tagId, name, groupToUse from assetVersionTag where isCommitted=0 and isLocked=0 order by name");
while (my ($id, $name, $group) = $rs->array) {
next unless $self->session->user->isInGroup($group);
push(@tags, {
url=>$self->session->url->page("op=setWorkingVersionTag;tagId=".$id),
title=>($id eq $workingId) ? '* '.$name : $name,
});
}
if (scalar(@tags)) {
$var{versionTags} = \@tags;
}
if (defined $self->session->asset) {
my $importNode = WebGUI::Asset->getImportNode($self->session);
my $importNodeLineage = $importNode->get("lineage");

View file

@ -140,7 +140,6 @@ sub chopTitle {
sub commit {
my $self = shift;
$self->SUPER::commit;
$self->getThread->unarchive if ($self->getThread->get("status") eq "archived");
$self->notifySubscribers;
if ($self->isNew) {
if ($self->session->setting->get("useKarma") && $self->getThread->getParent->get("karmaPerPost")) {
@ -673,6 +672,11 @@ sub processPropertiesFromFormPost {
$self->getThread->stick if ($self->session->form->process("stick"));
}
}
if ($self->session->form->process("archive") && $self->getThread->getParent->canModerate) {
$self->getThread->archive;
} elsif ($self->getThread->get("status") eq "archived") {
$self->getThread->unarchive;
}
$self->getThread->subscribe if ($self->session->form->process("subscribe"));
delete $self->{_storageLocation};
my $storage = $self->getStorageLocation;
@ -1002,6 +1006,9 @@ sub www_edit {
$content = $self->getValue("content");
$title = $self->getValue("title");
}
$var{'archive.form'} = WebGUI::Form::yesNo($self->session, {
name=>"archive"
});
$var{'form.header'} .= WebGUI::Form::hidden($self->session, {name=>"proceed", value=>"showConfirmation"});
if ($self->session->form->process("title") || $self->session->form->process("content") || $self->session->form->process("synopsis")) {
$var{'preview.title'} = WebGUI::HTML::filter($self->session->form->process("title"),"all");

View file

@ -35,6 +35,9 @@ our $HELP = {
{
'name' => 'isNewThread'
},
{
'name' => 'archive.form'
},
{
'name' => 'sticky.form'
},

View file

@ -122,6 +122,7 @@ sub addPost {
}
}
$post->postProcess;
$post->getThread->unarchive if ($post->getThread->get("status") eq "archived");
$post->requestCommit;
return $post;
}

View file

@ -769,8 +769,8 @@ each asset under the tab &quot;Meta&quot; in the asset properties.</p>
message => q|Hide from navigation?|
},
'43' => {
lastUpdated => 1031514049,
message => q|Are you certain that you wish to delete this content?|
lastUpdated => 1149960436,
message => q|Are you certain that you wish to delete this content? Note that this change is not versioned and will take place immediately.|
},
'940' => {
lastUpdated => 1050438829,

View file

@ -52,6 +52,11 @@ editing an existing Post.|,
lastUpdated => 1149829706,
},
'archive.form' => {
message => q|A yes/no button to archive the thread when you submit this reply. This is only available to moderators.|,
lastUpdated => 1149829706,
},
'sticky.form' => {
message => q|A yes/no button to set the thread to be sticky, so that it stays at the top of the forum listing.|,
lastUpdated => 1149829706,