added an empty style template and the ability to hide templates from forms and editing
This commit is contained in:
parent
016c33171e
commit
044b024011
5 changed files with 16 additions and 5 deletions
|
|
@ -187,10 +187,10 @@ sub www_editTemplateSave {
|
|||
sub www_listTemplates {
|
||||
my ($output, $sth, @data, @row, $i, $p, $where);
|
||||
if (WebGUI::Privilege::isInGroup(8)) {
|
||||
$where = "where namespace=".quote($session{form}{namespace}) if ($session{form}{namespace});
|
||||
$where = "and namespace=".quote($session{form}{namespace}) if ($session{form}{namespace});
|
||||
$output = helpIcon(33);
|
||||
$output .= '<h1>'.WebGUI::International::get(506).'</h1>';
|
||||
$sth = WebGUI::SQL->read("select templateId,name,namespace from template $where order by namespace,name");
|
||||
$sth = WebGUI::SQL->read("select templateId,name,namespace from template where isEditable=1 $where order by namespace,name");
|
||||
while (@data = $sth->array) {
|
||||
$row[$i] = '<tr><td valign="top" class="tableData">'
|
||||
.deleteIcon('op=deleteTemplate&tid='.$data[0].'&namespace='.$data[2])
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ our @EXPORT = qw(&www_theWg &www_genesis);
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_genesis {
|
||||
$session{page}{styleId} = 2;
|
||||
$session{page}{useEmptyStyle} = 1;
|
||||
my $output = '<html><head><title>About WebGUI</title>
|
||||
<style>.big {font-size: 23px;}</style>
|
||||
</head><body bgcolor="#ef4200" text="black" link="white" vlink="white">
|
||||
|
|
@ -37,7 +37,7 @@ sub www_genesis {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_theWg {
|
||||
$session{page}{styleId} = 2;
|
||||
$session{page}{useEmptyStyle} = 1;
|
||||
my $output = '<html><head><title>WebGUI</title></head><body BGCOLOR="black"><center>
|
||||
<nobr><font SIZE="1" FACE="Courier New, Courier"><font COLOR="white"></font><font COLOR="#1A1108">p</font><font COLOR="#24130C">a</font><font COLOR="#5C2605">c</font><font COLOR="#642206">kageW</font><font COLOR="#5C1F04">e</font><font COLOR="#642206">bGUI;ou</font><font COLOR="#5C2605">r</font><font COLOR="#642206">$VERSION="5.5.0</font><font COLOR="#5C2605">"</font><font COLOR="#642206">;usestr</font><font COLOR="#5C1F04">i</font><font COLOR="#642206">ctqw(v</font><font COLOR="#68290C">a</font><font COLOR="#5C1F04">r</font><font COLOR="#5C2605">s</font><font COLOR="#642206">s</font><font COLOR="#541604">u</font><font COLOR="#481404">b</font><font COLOR="#380B04">s</font><font COLOR="#0B0204">);useTie::CPHash;useW
|
||||
|
||||
|
|
|
|||
|
|
@ -95,6 +95,8 @@ sub process {
|
|||
$templateId = $session{setting}{adminStyleId};
|
||||
} elsif ($session{scratch}{personalStyleId} ne "") {
|
||||
$templateId = $session{scratch}{personalStyleId};
|
||||
} elsif ($session{page}{useEmptyStyle}) {
|
||||
$templateId = 6;
|
||||
}
|
||||
my $type = lc($session{setting}{siteicon});
|
||||
$type =~ s/.*\.(.*?)$/$1/;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ Defaults to "Page". Specify the namespace to build the list for.
|
|||
|
||||
sub getList {
|
||||
my $namespace = $_[0] || "Page";
|
||||
return WebGUI::SQL->buildHashRef("select templateId,name from template where namespace=".quote($namespace)." order by name");
|
||||
return WebGUI::SQL->buildHashRef("select templateId,name from template where namespace=".quote($namespace)." and showInForms=1 order by name");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue