added a bunch of style functions
This commit is contained in:
parent
264287a0fb
commit
759dfd2f6b
22 changed files with 75 additions and 36 deletions
|
|
@ -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)) ? '<a href="'.WebGUI::URL::page("op=listDatabaseLinks").'">'.WebGUI::International::get(981).'</a>' : ""
|
||||
);
|
||||
$f->databaseLink(
|
||||
-value=>[$g->databaseLinkId]
|
||||
);
|
||||
$f->textarea(
|
||||
-name=>"dbQuery",
|
||||
-value=>$g->dbQuery,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 = ' <a href="'.WebGUI::URL::page('op=listStyles')
|
||||
.'">'.WebGUI::International::get(6).'</a>';
|
||||
} 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 = '<h1>'.WebGUI::International::get(448).'</h1>';
|
||||
$output .= _traversePageTree(0,0);
|
||||
return $output;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ our @EXPORT = qw(&menuWrapper);
|
|||
#-------------------------------------------------------------------
|
||||
sub menuWrapper {
|
||||
my ($output, $key);
|
||||
$session{page}{useAdminStyle} = 1;
|
||||
$output = '<table width="100%" border="0" cellpadding="5" cellspacing="0">
|
||||
<tr><td width="70%" class="tableData" valign="top">';
|
||||
$output .= $_[0];
|
||||
|
|
|
|||
|
|
@ -180,9 +180,9 @@ sub www_viewStatistics {
|
|||
$output .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(794).':</td><td class="tableData">'.$data.'</td></tr>';
|
||||
($data) = WebGUI::SQL->quickArray("select count(*) from wobject where wobjectId > 0 and pageId<>3");
|
||||
$output .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(148).':</td><td class="tableData">'.$data.'</td></tr>';
|
||||
($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 .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(427).':</td><td class="tableData">'.$data.'</td></tr>';
|
||||
($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 .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(792).':</td><td class="tableData">'.$data.'</td></tr>';
|
||||
($data) = WebGUI::SQL->quickArray("select count(*) from collateral");
|
||||
$output .= '<tr><td align="right" class="tableHeader">'.WebGUI::International::get(793).':</td><td class="tableData">'.$data.'</td></tr>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue