From 759dfd2f6b546fbf1b9b18548d17648be4c77de6 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sun, 4 Jan 2004 06:02:28 +0000 Subject: [PATCH] added a bunch of style functions --- docs/changelog/6.x.x.txt | 2 ++ docs/gotcha.txt | 1 - docs/previousVersion.sql | 4 ++-- docs/upgrades/upgrade_5.9.9-6.0.0.pl | 1 - docs/upgrades/upgrade_5.9.9-6.0.0.sql | 15 ++++++++++++--- lib/WebGUI/Macro/PageTitle.pm | 2 +- lib/WebGUI/Macro/r_printable.pm | 4 ++-- lib/WebGUI/Operation.pm | 1 + lib/WebGUI/Operation/Group.pm | 14 +++----------- lib/WebGUI/Operation/Package.pm | 7 +++++-- lib/WebGUI/Operation/Page.pm | 25 ++++++++++++++----------- lib/WebGUI/Operation/Settings.pm | 11 +++++++++++ lib/WebGUI/Operation/Shared.pm | 1 + lib/WebGUI/Operation/Statistics.pm | 4 ++-- lib/WebGUI/Style.pm | 7 +++++++ lib/WebGUI/Wobject.pm | 1 + lib/WebGUI/Wobject/DataForm.pm | 1 + lib/WebGUI/Wobject/EventsCalendar.pm | 1 + lib/WebGUI/Wobject/FileManager.pm | 1 + lib/WebGUI/Wobject/MessageBoard.pm | 1 + lib/WebGUI/Wobject/Product.pm | 5 +++++ lib/WebGUI/Wobject/Survey.pm | 2 ++ 22 files changed, 75 insertions(+), 36 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 7f18ba8af..5e872cf7e 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -27,3 +27,5 @@ - Added new Authentication System. - Collateral macros now return undef instead of the macro tag when no matching collateral is found. + - Added style personalization. + - Added admin style option. diff --git a/docs/gotcha.txt b/docs/gotcha.txt index cd74b5298..e5742a9fd 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -21,7 +21,6 @@ save you many hours of grief. Please see docs/migration.txt for details. - 5.5.0 -------------------------------------------------------------------- * If you have any custom Message Board templates they will be diff --git a/docs/previousVersion.sql b/docs/previousVersion.sql index 758b37924..140cd8e33 100644 --- a/docs/previousVersion.sql +++ b/docs/previousVersion.sql @@ -17036,5 +17036,5 @@ update style set styleId=10 where styleId=-10; delete from style where styleId<0; update incrementer set nextValue=nextValue+1 where incrementerId='styleId'; update page set styleId=1000 where styleId=-8; -INSERT INTO style VALUES (1000,'WebGUI 6','\r\n ','\r\n^AdminBar(2);\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n
^L(17,"",2); ^AdminToggle;
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\n         \r\n\"home\" \n \"Email\"\r\n\"Print\" \n \"Site \"Plain\r\n^Spacer(56,1);^Spacer(26,1);
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
^Spacer(53,59);^D(\"%c %D, %y\");
^PageTitle;
^Spacer(53,59);
\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
^Spacer(53,1);\r\n
\r\n^FlexMenu;\r\n


\r\n\r\n
^-;^Spacer(53,1);
\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n'); - +INSERT INTO style VALUES (1000,'WebGUI 6','\r\n ','\r\n^AdminBar(2);\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n
^L(17,"",2); ^AdminToggle;
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\n         \r\n\"home\" \n \"Email\"\r\n\"Print\" \n \"Site \"Plain\r\n^Spacer(56,1);^Spacer(26,1);
\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
^Spacer(53,59);^D(\"%c %D, %y\");
^PageTitle;
^Spacer(53,59);
\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
^Spacer(53,1);\r\n
\r\n^FlexMenu;\r\n


\r\n\r\n
^-;^Spacer(53,1);
\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n'); +INSERT INTO style VALUES (1001,'WebGUI 6 Admin Style','\r\n \r\n\r\n\r\n',' \r\n\r\n^AdminBar(2);\r\n\r\n
\r\n ^-;\r\n
\r\n\r\n\r\n
^H; / ^PageTitle; / ^AdminToggle; / ^LoginToggle; / ^a;
\r\n\r\n\r\n\r\n\r\n\r\n\r\n'); diff --git a/docs/upgrades/upgrade_5.9.9-6.0.0.pl b/docs/upgrades/upgrade_5.9.9-6.0.0.pl index 9e360d981..cce4b5029 100644 --- a/docs/upgrades/upgrade_5.9.9-6.0.0.pl +++ b/docs/upgrades/upgrade_5.9.9-6.0.0.pl @@ -447,7 +447,6 @@ while (my $authHash = $authSth->hashRef){ #-------------------------------------------- print "\tRemoving unneeded files and directories.\n" unless ($quiet); -unlink("../../lib/WebGUI/Operation/Style.pm"); unlink("../../lib/WebGUI/Wobject/Item.pm"); unlink("../../lib/WebGUI/Wobject/LinkList.pm"); unlink("../../lib/WebGUI/Wobject/FAQ.pm"); diff --git a/docs/upgrades/upgrade_5.9.9-6.0.0.sql b/docs/upgrades/upgrade_5.9.9-6.0.0.sql index 5b61f2660..9ebe714ed 100644 --- a/docs/upgrades/upgrade_5.9.9-6.0.0.sql +++ b/docs/upgrades/upgrade_5.9.9-6.0.0.sql @@ -12,7 +12,7 @@ delete from international where internationalId=501 and namespace='WebGUI'; delete from international where internationalId=154 and namespace='WebGUI'; delete from international where internationalId=157 and namespace='WebGUI'; delete from international where internationalId=398 and namespace='WebGUI'; -#delete from style where name='Reserved'; +delete from style where name='Reserved'; delete from international where internationalId=654 and namespace='WebGUI'; delete from international where internationalId=609 and namespace='WebGUI'; delete from international where internationalId=659 and namespace='WebGUI'; @@ -169,7 +169,7 @@ delete from international where languageId=1 and namespace='USS' and internation insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (71,1,'USS','User Submission Systems (USS) are a great way to add a sense of community to any site as well as get free content from your users. The User Submission System name is misleading to some people, because they immediately think of users as visitors. However, users are also staff, or business partners, or even yourself. With the USS you can select who can add new content, and even who can moderate that content.\r\n

\r\nUser Submission systems are so versatile that they allow you to create all kinds of applications, just by editing a few templates. Example applications are Photo Galleries, FAQs, Link Lists, Guest Books, Classifieds, and more.\r\n\r\n\r\n

\r\nSubmission Template
\r\nChoose a layout for the individual submissions.\r\n

\r\n\r\nSubmission Form Template
\r\nChoose a layout of the form users see when submitting content.\r\n

\r\n\r\n\r\nSubmissions Per Page
\r\nHow many submissions should be listed per page in the submissions index?\r\n

\r\n\r\n\r\nFilter Content
\r\nSelect the level of content filtering you wish to perform on all submitted content.\r\n

\r\n\r\nSort By
\r\nThe field to sort the submission list by.\r\n

\r\n\r\nSort Order
\r\nThe direction to sort the submission list by.\r\n

\r\n\r\n\r\n\r\n\r\nWho can approve?
\r\nWhat group is allowed to approve and deny content?\r\n

\r\n\r\nWho can contribute?
\r\nWhat group is allowed to contribute content?\r\n

\r\n\r\n\r\nDefault Status
\r\nShould submissions be set to Approved, Pending, or Denied by default?\r\n

\r\nNote: If you set the default status to Pending, then be prepared to monitor your message log for new submissions.\r\n

\r\n\r\nKarma Per Submission
\r\nHow much karma should be given to a user when they contribute to this user submission system?\r\n

\r\n\r\n\r\nAllow discussion?
\r\nChecking this box will enable responses to your article much like Articles on Slashdot.org.\r\n

\r\n\r\n\r\n', 1070199700,NULL); INSERT INTO template VALUES (1,'Default Login Box','

\n\n \n
\n \n

\n \n
\n \n \n \n

\n
\n\n \n \">.\n \n \n \n \n
\n
\n','Macro/L_loginBox'); INSERT INTO template VALUES (2,'Horizontal Login Box','
\n\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n\n \n \">.\n
\n \n \n
\n
\n
\n','Macro/L_loginBox'); -INSERT INTO template VALUES (2,'DHTML Admin Bar','\n\n\n\n
\n','Macro/AdminBar'); +INSERT INTO template VALUES (2,'DHTML Admin Bar','\n\n\n\n
\n','Macro/AdminBar'); INSERT INTO template VALUES (1,'Default Admin Bar',' \n \n
\n\n \n \n \n \n \n
\n \n
\n \n
\n \n
\n
\n','Macro/AdminBar'); delete from international where internationalId=34 and namespace='WebGUI'; delete from international where internationalId=19 and namespace='SQLReport'; @@ -288,4 +288,13 @@ delete from template where namespace='Operation/Profile/Edit' and templateId=1; INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default Edit Profile Template','\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n \r\n\r\n\r\n\r\n \r\n \r\n\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n\r\n\r\n
\r\n
    \r\n \r\n
  • \r\n \r\n
\r\n
','Operation/Profile/Edit'); delete from template where namespace='Operation/Profile/View' and templateId=1; INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default Profile Display Template','\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
    \r\n \r\n
  • \r\n \r\n
\r\n
','Operation/Profile/View'); -#End Authentication Changes \ No newline at end of file +#End Authentication Changes +alter table page add column printableStyleId int not null default 3; +delete from international where languageId=1 and namespace='WebGUI' and internationalId=1079; +insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (1079,1,'WebGUI','Printable Style', 1073152790,'A label describing a style that looks good when printing the page.'); +delete from international where languageId=1 and namespace='WebGUI' and internationalId=1081; +insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (1081,1,'WebGUI','Admin Style', 1073161679,'A label indicating that the user should choose a style for admin pages.'); +delete from international where languageId=1 and namespace='WebGUI' and internationalId=1080; +insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (1080,1,'WebGUI','Use admin style?', 1073161583,'A label asking the user if they want to use a seperate admin style from the main page style.'); +insert into settings values ("useAdminStyle",1); +insert into settings values ("adminStyleId",1000); diff --git a/lib/WebGUI/Macro/PageTitle.pm b/lib/WebGUI/Macro/PageTitle.pm index 7061e1ba0..80234e41c 100644 --- a/lib/WebGUI/Macro/PageTitle.pm +++ b/lib/WebGUI/Macro/PageTitle.pm @@ -16,7 +16,7 @@ use WebGUI::URL; #------------------------------------------------------------------- sub process { - if ($session{env}{QUERY_STRING} =~ /op/ || $session{env}{QUERY_STRING} =~ /func/) { + if ($session{form}{op} || $session{form}{func}) { return ''.$session{page}{title}.''; } else { return $session{page}{title}; diff --git a/lib/WebGUI/Macro/r_printable.pm b/lib/WebGUI/Macro/r_printable.pm index baa1f7bad..38c9d7951 100644 --- a/lib/WebGUI/Macro/r_printable.pm +++ b/lib/WebGUI/Macro/r_printable.pm @@ -22,11 +22,11 @@ use WebGUI::Utility; sub process { my ($temp, @param, $styleId); @param = WebGUI::Macro::getParams($_[0]); - $temp = WebGUI::URL::append($session{env}{REQUEST_URI},'makePrintable=1'); + $temp = WebGUI::URL::append($session{env}{REQUEST_URI},'op=makePrintable'); if ($param[1] ne "") { ($styleId) = WebGUI::SQL->quickArray("select styleId from style where name=".quote($param[1])); if ($styleId != 0) { - $temp = WebGUI::URL::append($temp,'style='.$styleId); + $temp = WebGUI::URL::append($temp,'styleId='.$styleId); } } if ($param[0] ne "linkonly") { diff --git a/lib/WebGUI/Operation.pm b/lib/WebGUI/Operation.pm index 8e83b5698..a4eef3356 100644 --- a/lib/WebGUI/Operation.pm +++ b/lib/WebGUI/Operation.pm @@ -30,6 +30,7 @@ use WebGUI::Operation::Scratch; use WebGUI::Operation::Search; use WebGUI::Operation::Settings; use WebGUI::Operation::Statistics; +use WebGUI::Operation::Style; use WebGUI::Operation::Template; use WebGUI::Operation::Theme; use WebGUI::Operation::Trash; diff --git a/lib/WebGUI/Operation/Group.pm b/lib/WebGUI/Operation/Group.pm index d5815534c..da521ddd6 100644 --- a/lib/WebGUI/Operation/Group.pm +++ b/lib/WebGUI/Operation/Group.pm @@ -217,17 +217,9 @@ sub www_editGroup { -value=>$g->autoDelete, -label=>WebGUI::International::get(975) ); - my %databaseLinkOptions; - tie %databaseLinkOptions, 'Tie::IxHash', - "0"=>WebGUI::International::get(19,'SQLReport'), - WebGUI::DatabaseLink::getHash(); - $f->selectList( - -name=>"databaseLinkId", - -options=>\%databaseLinkOptions, - -label=>WebGUI::International::get(20,'SQLReport'), - -value=>[$g->databaseLinkId], - -subtext=>(WebGUI::Privilege::isInGroup(3)) ? ''.WebGUI::International::get(981).'' : "" - ); + $f->databaseLink( + -value=>[$g->databaseLinkId] + ); $f->textarea( -name=>"dbQuery", -value=>$g->dbQuery, diff --git a/lib/WebGUI/Operation/Package.pm b/lib/WebGUI/Operation/Package.pm index 62a920f1e..642db4839 100644 --- a/lib/WebGUI/Operation/Package.pm +++ b/lib/WebGUI/Operation/Package.pm @@ -74,7 +74,8 @@ sub _recursePageTree { hideFromNavigation, newWindow, cacheTimeout, - cacheTimeoutVisitor + cacheTimeoutVisitor, + printableStyleId ) values ( $newPageId, $_[1], @@ -101,7 +102,8 @@ sub _recursePageTree { $package{hideFromNavigation}, $package{newWindow}, $package{cacheTimeout}, - $package{cacheTimeoutVisitor} + $package{cacheTimeoutVisitor}, + $package{printableStyleId} )"); _recursePageTree($package{pageId},$newPageId); } @@ -111,6 +113,7 @@ sub _recursePageTree { #------------------------------------------------------------------- sub www_selectPackageToDeploy { my ($output, %data, $sth, $flag); + $session{page}{useAdminStyle} = 1; if (WebGUI::Privilege::canEditPage()) { tie %data,'Tie::CPHash'; $output = helpIcon(30); diff --git a/lib/WebGUI/Operation/Page.pm b/lib/WebGUI/Operation/Page.pm index 6291cedd8..ffc26d1de 100644 --- a/lib/WebGUI/Operation/Page.pm +++ b/lib/WebGUI/Operation/Page.pm @@ -69,7 +69,7 @@ sub _recursivelyChangeStyle { $sth = WebGUI::SQL->read("select pageId from page where parentId=$_[0]"); while (($pageId) = $sth->array) { if (WebGUI::Privilege::canEditPage($pageId)) { - WebGUI::SQL->write("update page set styleId=$session{form}{styleId} where pageId=$pageId"); + WebGUI::SQL->write("update page set styleId=$session{form}{styleId}, printableStyleId=$session{form}{printableStyleId} where pageId=$pageId"); _recursivelyChangeStyle($pageId); } } @@ -248,6 +248,7 @@ use WebGUI::TabForm; #------------------------------------------------------------------- sub www_editPage { my ($f, $endDate, $output, $subtext, $childCount, %hash, %page); + $session{page}{useAdminStyle} = 1; tie %hash, "Tie::IxHash"; tie %page, "Tie::CPHash"; if (WebGUI::Privilege::canEditPage($session{form}{npp})) { @@ -318,7 +319,7 @@ sub www_editPage { -value=>$page{urlizedTitle}, -uiLevel=>3 ); - $f->getTab("properties")->select( + $f->getTab("properties")->selectList( -name=>"languageId", -label=>WebGUI::International::get(304), -value=>[$page{languageId}], @@ -365,17 +366,17 @@ sub www_editPage { -unitsValue=>$data[1], -uiLevel=>8 ); - if (WebGUI::Privilege::isInGroup(5)) { - $subtext = '   '.WebGUI::International::get(6).''; - } else { - $subtext = ""; - } $f->getTab("layout")->template( -name=>"styleId", - -label=>WebGUI::International::get(105), - -value=>$page{styleId}, - -subtext=>$subtext, + -label=>WebGUI::International::get(912), + -value=>($page{styleId} || 2), + -namespace=>'style', + -uiLevel=>5 + ); + $f->getTab("layout")->template( + -name=>"printableStyleId", + -label=>WebGUI::International::get(1079), + -value=>($page{printableStyleId} || 3), -namespace=>'style', -uiLevel=>5 ); @@ -494,6 +495,7 @@ sub www_editPageSave { WebGUI::SQL->write("update page set title=".quote($session{form}{title}).", styleId=$session{form}{styleId}, + printableStyleId=$session{form}{printableStyleId}, ownerId=$session{form}{ownerId}, groupIdView=$session{form}{groupIdView}, groupIdEdit=$session{form}{groupIdEdit}, @@ -604,6 +606,7 @@ sub www_pastePage { #------------------------------------------------------------------- sub www_viewPageTree { my ($output); + $session{page}{useAdminStyle} = 1; $output = '

'.WebGUI::International::get(448).'

'; $output .= _traversePageTree(0,0); return $output; diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index 5e4e2875f..9d058c342 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -128,6 +128,17 @@ sub www_editMiscSettings { }, -label=>WebGUI::International::get(1069) ); + $f->yesNo( + -name=>"useAdminStyle", + -value=>$session{setting}{useAdminStyle}, + -label=>WebGUI::International::get(1080) + ); + $f->template( + -name=>"adminStyleId", + -namespace=>"style", + -value=>$session{setting}{adminStyleId}, + -label=>WebGUI::International::get(1081) + ); $f->submit; $output .= $f->print; return _submenu($output); diff --git a/lib/WebGUI/Operation/Shared.pm b/lib/WebGUI/Operation/Shared.pm index beb54224a..46ab3a7f7 100644 --- a/lib/WebGUI/Operation/Shared.pm +++ b/lib/WebGUI/Operation/Shared.pm @@ -66,6 +66,7 @@ our @EXPORT = qw(&menuWrapper); #------------------------------------------------------------------- sub menuWrapper { my ($output, $key); + $session{page}{useAdminStyle} = 1; $output = ''; ($data) = WebGUI::SQL->quickArray("select count(*) from wobject where wobjectId > 0 and pageId<>3"); $output .= ''; - ($data) = WebGUI::SQL->quickArray("select count(*) from style where styleId>1000"); + ($data) = WebGUI::SQL->quickArray("select count(*) from template where templateId>1000 and namespace='style'"); $output .= ''; - ($data) = WebGUI::SQL->quickArray("select count(*) from template where templateId>1000"); + ($data) = WebGUI::SQL->quickArray("select count(*) from template where templateId>1000 and namespace<>'style'"); $output .= ''; ($data) = WebGUI::SQL->quickArray("select count(*) from collateral"); $output .= ''; diff --git a/lib/WebGUI/Style.pm b/lib/WebGUI/Style.pm index 54b246644..cf53905f4 100644 --- a/lib/WebGUI/Style.pm +++ b/lib/WebGUI/Style.pm @@ -89,6 +89,13 @@ sub process { my %var; $var{'body.content'} = shift; my $templateId = shift; + if ($session{page}{makePrintable}) { + $templateId = $session{page}{printableStyleId}; + } elsif ($session{page}{useAdminStyle} ne "" && $session{setting}{useAdminStyle}) { + $templateId = $session{setting}{adminStyleId}; + } elsif ($session{scratch}{personalStyleId} ne "") { + $templateId = $session{scratch}{personalStyleId}; + } my $type = lc($session{setting}{siteicon}); $type =~ s/.*\.(.*?)$/$1/; $var{'head.tags'} = ' diff --git a/lib/WebGUI/Wobject.pm b/lib/WebGUI/Wobject.pm index 2eb240fb5..b014a8044 100644 --- a/lib/WebGUI/Wobject.pm +++ b/lib/WebGUI/Wobject.pm @@ -1165,6 +1165,7 @@ An id this namespace of the WebGUI international system. This message will be re sub www_edit { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($self, @p) = @_; my ($properties, $layout, $privileges, $heading, $helpId, $headingId) = rearrange([qw(properties layout privileges heading helpId headingId)], @p); diff --git a/lib/WebGUI/Wobject/DataForm.pm b/lib/WebGUI/Wobject/DataForm.pm index 41d580a41..9ae147d89 100644 --- a/lib/WebGUI/Wobject/DataForm.pm +++ b/lib/WebGUI/Wobject/DataForm.pm @@ -453,6 +453,7 @@ sub www_editSave { #------------------------------------------------------------------- sub www_editField { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($output, %field, $f, %fieldStatus); tie %field, 'Tie::CPHash'; tie %fieldStatus, 'Tie::IxHash'; diff --git a/lib/WebGUI/Wobject/EventsCalendar.pm b/lib/WebGUI/Wobject/EventsCalendar.pm index e1049e587..ebd9a7d56 100644 --- a/lib/WebGUI/Wobject/EventsCalendar.pm +++ b/lib/WebGUI/Wobject/EventsCalendar.pm @@ -318,6 +318,7 @@ sub www_editSave { #------------------------------------------------------------------- sub www_editEvent { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my (%recursEvery, $special, $output, $f, %event); tie %event, 'Tie::CPHash'; tie %recursEvery, 'Tie::IxHash'; diff --git a/lib/WebGUI/Wobject/FileManager.pm b/lib/WebGUI/Wobject/FileManager.pm index b5c002526..58a99f08b 100644 --- a/lib/WebGUI/Wobject/FileManager.pm +++ b/lib/WebGUI/Wobject/FileManager.pm @@ -184,6 +184,7 @@ sub www_editSave { #------------------------------------------------------------------- sub www_editDownload { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($output, $file, $f); $file = $_[0]->getCollateral("FileManager_file","FileManager_fileId",$session{form}{did}); $output .= helpIcon(2,$_[0]->get("namespace")); diff --git a/lib/WebGUI/Wobject/MessageBoard.pm b/lib/WebGUI/Wobject/MessageBoard.pm index 25b33f989..8dd6f7e29 100644 --- a/lib/WebGUI/Wobject/MessageBoard.pm +++ b/lib/WebGUI/Wobject/MessageBoard.pm @@ -102,6 +102,7 @@ sub www_edit { #------------------------------------------------------------------- sub www_editForum { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my $forumMeta; if ($session{form}{forumId} ne "new") { $forumMeta = WebGUI::SQL->quickHashRef("select title,description from MessageBoard_forums where forumId=".$session{form}{forumId}); diff --git a/lib/WebGUI/Wobject/Product.pm b/lib/WebGUI/Wobject/Product.pm index 6fc7a541b..815e39b0e 100644 --- a/lib/WebGUI/Wobject/Product.pm +++ b/lib/WebGUI/Wobject/Product.pm @@ -116,6 +116,7 @@ sub purge { #------------------------------------------------------------------- sub www_addAccessory { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($output, $f, $accessory, @usedAccessories); $output = helpIcon(4,$_[0]->get("namespace")); $output .= '

'.WebGUI::International::get(16,$_[0]->get("namespace")).'

'; @@ -137,6 +138,7 @@ sub www_addAccessory { #------------------------------------------------------------------- sub www_addAccessorySave { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($seq); ($seq) = WebGUI::SQL->quickArray("select max(sequenceNumber) from Product_accessory where wobjectId=".$_[0]->get("wobjectId")); @@ -326,6 +328,7 @@ sub www_editSave { #------------------------------------------------------------------- sub www_editBenefit { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($output, $data, $f, $benefits); $data = $_[0]->getCollateral("Product_benefit","Product_benefitId",$session{form}{bid}); $output = helpIcon(6,$_[0]->get("namespace")); @@ -361,6 +364,7 @@ sub www_editBenefitSave { #------------------------------------------------------------------- sub www_editFeature { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($output, $data, $f, $features); $data = $_[0]->getCollateral("Product_feature","Product_featureId",$session{form}{fid}); $output = helpIcon(2,$_[0]->get("namespace")); @@ -396,6 +400,7 @@ sub www_editFeatureSave { #------------------------------------------------------------------- sub www_editSpecification { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($output, $data, $f, $hashRef); $data = $_[0]->getCollateral("Product_specification","Product_specificationId",$session{form}{sid}); $output = helpIcon(3,$_[0]->get("namespace")); diff --git a/lib/WebGUI/Wobject/Survey.pm b/lib/WebGUI/Wobject/Survey.pm index 2e9d5b6ff..798f1b66a 100644 --- a/lib/WebGUI/Wobject/Survey.pm +++ b/lib/WebGUI/Wobject/Survey.pm @@ -306,6 +306,7 @@ sub www_editSave { #------------------------------------------------------------------- sub www_editAnswer { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($question, $output, $f, $answer); $answer = $_[0]->getCollateral("Survey_answer","Survey_answerId",$session{form}{aid}); $output = '

'.WebGUI::International::get(18,$_[0]->get("namespace")).'

'; @@ -383,6 +384,7 @@ sub www_editAnswerSave { #------------------------------------------------------------------- sub www_editQuestion { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditWobject($_[0]->get("wobjectId"))); + $session{page}{useAdminStyle} = 1; my ($output, $f, $question, $answerFieldType, $sth, %data); tie %data, 'Tie::CPHash'; $question = $_[0]->getCollateral("Survey_question","Survey_questionId",$session{form}{qid});
'; $output .= $_[0]; diff --git a/lib/WebGUI/Operation/Statistics.pm b/lib/WebGUI/Operation/Statistics.pm index 43d4c014b..bce6d5291 100644 --- a/lib/WebGUI/Operation/Statistics.pm +++ b/lib/WebGUI/Operation/Statistics.pm @@ -180,9 +180,9 @@ sub www_viewStatistics { $output .= '
'.WebGUI::International::get(794).':'.$data.'
'.WebGUI::International::get(148).':'.$data.'
'.WebGUI::International::get(427).':'.$data.'
'.WebGUI::International::get(792).':'.$data.'
'.WebGUI::International::get(793).':'.$data.'