- 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:
parent
58566a6ed6
commit
9aa86225be
9 changed files with 413 additions and 371 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ our $HELP = {
|
|||
{
|
||||
'name' => 'isNewThread'
|
||||
},
|
||||
{
|
||||
'name' => 'archive.form'
|
||||
},
|
||||
{
|
||||
'name' => 'sticky.form'
|
||||
},
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ sub addPost {
|
|||
}
|
||||
}
|
||||
$post->postProcess;
|
||||
$post->getThread->unarchive if ($post->getThread->get("status") eq "archived");
|
||||
$post->requestCommit;
|
||||
return $post;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -769,8 +769,8 @@ each asset under the tab "Meta" 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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue