From 9aa86225be82ea0497a79f1c00b8adaa348e933f Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sat, 10 Jun 2006 20:49:11 +0000 Subject: [PATCH] - 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. --- docs/changelog/6.x.x.txt | 4 + .../request_tracker_post.tmpl | 732 +++++++++--------- lib/WebGUI/AdminConsole.pm | 22 + lib/WebGUI/Asset/Post.pm | 9 +- lib/WebGUI/Help/Asset_Post.pm | 3 + lib/WebGUI/Workflow/Activity/GetCsMail.pm | 1 + lib/WebGUI/i18n/English/Asset.pm | 4 +- lib/WebGUI/i18n/English/Asset_Post.pm | 5 + www/extras/adminConsole/adminConsole.css | 4 +- 9 files changed, 413 insertions(+), 371 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 7125b5cc7..9f6f7867f 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -22,6 +22,10 @@ - fix: EMS Discount Pass Not Applied - fix: Commerce checkout confirmation very confusing - fix: HttpProxy turns ampersands into semicolons + - 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. 6.99.3 diff --git a/docs/upgrades/templates-6.99.4/request_tracker_post.tmpl b/docs/upgrades/templates-6.99.4/request_tracker_post.tmpl index c7fbe40db..ce27a40ef 100644 --- a/docs/upgrades/templates-6.99.4/request_tracker_post.tmpl +++ b/docs/upgrades/templates-6.99.4/request_tracker_post.tmpl @@ -1,386 +1,386 @@ #PBtmpl0000000000000209 - - - -

-
- -

- -
- -
-<tmpl_var username> -
-
- : - - - - - -
- :
- :
- :
- : - -     [

+

|

-

] -
-
- - :     [     [ ]
- - - :
-
-
- - :
-: - -
-
- -
- -
- - -
- -
+ + + +

+
+ +

+ +
+ +
+<tmpl_var username> +
+
+ : + + + + + +
+ :
+ :
+ :
+ : + +     [

+

|

-

] +
+
+ + :     [     [ ]
+ + + :
+
+
+ + :
+: + +
+
+ +
+ +
+ + +
+ + - -
-
-
- - - - -
- - - • - - - - • - - -
-
- -
- - -
-

-
-
- - - - - -
-
- - - - - -
- -
- -
-
- - - - - - - - - -
-<tmpl_var username> - - : - - - - - -
- : -
- : - -     [

+

|

-

] -
-
-
-
-
- - -
+ +
+
+
+
+ + + + + +
+ + + • + + + + • + + +
+
+ +
+ + +
+

+
+
+ + + + + +
+
+ + + + + +
+ +
+ +
+
+ + + + + + + + + +
+<tmpl_var username> + + : + + + + + +
+ : +
+ : + +     [

+

|

-

] +
+
+
+
+
+ + + - -
-
- -
- - - • - - - - • - - -
-
-
-
-
- -
- - - - - -
-
- -
- -
-
- - - - - - - - - -
-<tmpl_var username> - - : - - - - - -
- : -
- : - -     [

+

|

-

] -
-
-
-
-
- - -
+ +
+
+
+
+ +
+ + + • + + + + • + + +
+
+
+ + + + + + + + + +
+
+ +
+ +
+
+ + + + + + + + + +
+<tmpl_var username> + + : + + + + + +
+ : +
+ : + +     [

+

|

-

] +
+
+
+
+
+ + + - -
-
- -
- - - • - - - - • - - -
-
-
-
-
-
- -
- - - - - - -
- - - • - - - - - • - - - - • - - • - - - - - • - - - • - - - - • - - - • - - - - - - - - - -
+ +
+
+
+
+ +
+ + + • + + + + • + + +
+
+
+
+ +
+ +
+ + + + + + +
+ + + • + + + + + • + + + + • + + • + + + + + • + + + • + + + + • + + + • + + + + + + + + + +
~~~ - + diff --git a/lib/WebGUI/AdminConsole.pm b/lib/WebGUI/AdminConsole.pm index 5486bee78..5e0f538fa 100644 --- a/lib/WebGUI/AdminConsole.pm +++ b/lib/WebGUI/AdminConsole.pm @@ -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"); diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 6807875eb..e8dac6f72 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -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"); diff --git a/lib/WebGUI/Help/Asset_Post.pm b/lib/WebGUI/Help/Asset_Post.pm index ee88bbe31..a51c6cef8 100644 --- a/lib/WebGUI/Help/Asset_Post.pm +++ b/lib/WebGUI/Help/Asset_Post.pm @@ -35,6 +35,9 @@ our $HELP = { { 'name' => 'isNewThread' }, + { + 'name' => 'archive.form' + }, { 'name' => 'sticky.form' }, diff --git a/lib/WebGUI/Workflow/Activity/GetCsMail.pm b/lib/WebGUI/Workflow/Activity/GetCsMail.pm index a308c8c74..403368277 100644 --- a/lib/WebGUI/Workflow/Activity/GetCsMail.pm +++ b/lib/WebGUI/Workflow/Activity/GetCsMail.pm @@ -122,6 +122,7 @@ sub addPost { } } $post->postProcess; + $post->getThread->unarchive if ($post->getThread->get("status") eq "archived"); $post->requestCommit; return $post; } diff --git a/lib/WebGUI/i18n/English/Asset.pm b/lib/WebGUI/i18n/English/Asset.pm index 8c8dabe62..b8a8aad85 100644 --- a/lib/WebGUI/i18n/English/Asset.pm +++ b/lib/WebGUI/i18n/English/Asset.pm @@ -769,8 +769,8 @@ each asset under the tab "Meta" in the asset properties.

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, diff --git a/lib/WebGUI/i18n/English/Asset_Post.pm b/lib/WebGUI/i18n/English/Asset_Post.pm index e39f4e1de..5514a1066 100644 --- a/lib/WebGUI/i18n/English/Asset_Post.pm +++ b/lib/WebGUI/i18n/English/Asset_Post.pm @@ -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, diff --git a/www/extras/adminConsole/adminConsole.css b/www/extras/adminConsole/adminConsole.css index cde9e23df..0397b5cd8 100644 --- a/www/extras/adminConsole/adminConsole.css +++ b/www/extras/adminConsole/adminConsole.css @@ -77,7 +77,7 @@ th { font-size: 12px; } -.adminConsoleMainMenu:hover, .adminConsoleUtilityMenu:hover { +.adminConsoleMainMenu:hover, .adminConsoleUtilityMenu:hover, .adminConsoleVersionTags:hover { opacity: 1.0; z-index: 10; background-color: #fafafa; @@ -108,7 +108,7 @@ th { background-color: #fafafa; } -.adminConsoleUtilityMenu { +.adminConsoleUtilityMenu, .adminConsoleVersionTags { z-index: 1; opacity: 0.6; border-top: 1px solid #D7D7D7;