more admin console changes
This commit is contained in:
parent
c4fa16700d
commit
394da3a14b
9 changed files with 216 additions and 309 deletions
|
|
@ -88,7 +88,7 @@ sub getAdminFunction {
|
|||
},
|
||||
"groups"=>{
|
||||
title=>{
|
||||
id=>"groups",
|
||||
id=>"89",
|
||||
namespace=>"WebGUI"
|
||||
},
|
||||
icon=>"groups.gif",
|
||||
|
|
@ -138,7 +138,7 @@ sub getAdminFunction {
|
|||
},
|
||||
icon=>"help.gif",
|
||||
op=>"viewHelpIndex",
|
||||
group=>"7"
|
||||
group=>"12"
|
||||
},
|
||||
"statistics"=>{
|
||||
title=>{
|
||||
|
|
|
|||
42
lib/WebGUI/Help/MetaData.pm
Normal file
42
lib/WebGUI/Help/MetaData.pm
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
package WebGUI::Help::MetaData;
|
||||
|
||||
our $HELP = {
|
||||
'metadata manage'=> {
|
||||
title => 'content profiling',
|
||||
body => 'metadata manage body',
|
||||
related => [
|
||||
{
|
||||
tag => 'metadata edit property',
|
||||
namespace => 'MetaData'
|
||||
},
|
||||
{
|
||||
tag => 'user macros',
|
||||
namespace => 'WebGUI'
|
||||
},
|
||||
{
|
||||
tag => 'wobject add/edit',
|
||||
namespace => 'WebGUI',
|
||||
},
|
||||
],
|
||||
},
|
||||
'metadata edit property' => {
|
||||
title => 'Metadata, Edit property',
|
||||
body => 'metadata edit property body',
|
||||
related => [
|
||||
{
|
||||
tag => 'metadata manage',
|
||||
namespace => 'MetaData'
|
||||
},
|
||||
{
|
||||
tag => 'user macros',
|
||||
namespace => 'WebGUI'
|
||||
},
|
||||
{
|
||||
tag => 'wobject add/edit',
|
||||
namespace => 'WebGUI',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
@ -12,6 +12,7 @@ package WebGUI::Operation::Group;
|
|||
|
||||
use strict;
|
||||
use Tie::CPHash;
|
||||
use WebGUI::AdminConsole;
|
||||
use WebGUI::DatabaseLink;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Group;
|
||||
|
|
@ -22,7 +23,6 @@ use WebGUI::HTMLForm;
|
|||
use WebGUI::Icon;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Mail;
|
||||
use WebGUI::Operation::Shared;
|
||||
use WebGUI::Operation::User;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
|
|
@ -40,24 +40,31 @@ sub _hasSecondaryPrivilege {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub _submenu {
|
||||
my ($output, %menu);
|
||||
tie %menu, 'Tie::IxHash';
|
||||
my $workarea = shift;
|
||||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("groups");
|
||||
if (WebGUI::Grouping::isInGroup(3)) {
|
||||
$menu{WebGUI::URL::page('op=editGroup&gid=new')} = WebGUI::International::get(90);
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editGroup&gid=new'), WebGUI::International::get(90));
|
||||
unless ($session{form}{op} eq "listGroups"
|
||||
|| $session{form}{gid} eq "new"
|
||||
|| $session{form}{op} eq "deleteGroupConfirm") {
|
||||
$menu{WebGUI::URL::page("op=editGroup&gid=".$session{form}{gid})} = WebGUI::International::get(753);
|
||||
$menu{WebGUI::URL::page("op=manageUsersInGroup&gid=".$session{form}{gid})} = WebGUI::International::get(754);
|
||||
$menu{WebGUI::URL::page("op=manageGroupsInGroup&gid=".$session{form}{gid})} = WebGUI::International::get(807);
|
||||
$menu{WebGUI::URL::page("op=emailGroup&gid=".$session{form}{gid})} = WebGUI::International::get(808);
|
||||
$menu{WebGUI::URL::page("op=deleteGroup&gid=".$session{form}{gid})} = WebGUI::International::get(806);
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editGroup&gid=".$session{form}{gid}), WebGUI::International::get(753));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=manageUsersInGroup&gid=".$session{form}{gid}), WebGUI::International::get(754));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=manageGroupsInGroup&gid=".$session{form}{gid}), WebGUI::International::get(807));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=emailGroup&gid=".$session{form}{gid}), WebGUI::International::get(808));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=deleteGroup&gid=".$session{form}{gid}), WebGUI::International::get(806));
|
||||
}
|
||||
$menu{WebGUI::URL::page("op=listGroups")} = WebGUI::International::get(756);
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=listGroups"), WebGUI::International::get(756));
|
||||
} else {
|
||||
$menu{WebGUI::URL::page("op=listGroupsSecondary")} = WebGUI::International::get(756);
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=listGroupsSecondary"), WebGUI::International::get(756));
|
||||
}
|
||||
return menuWrapper($_[0],\%menu);
|
||||
return $ac->render($workarea, $title);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -178,14 +185,12 @@ sub www_deleteGroup {
|
|||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
my ($output);
|
||||
return WebGUI::Privilege::vitalComponent() if ($session{form}{gid} < 26 && $session{form}{gid} > 0);
|
||||
$output .= helpIcon("group delete");
|
||||
$output .= '<h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output .= WebGUI::International::get(86).'<p>';
|
||||
$output .= '<div align="center"><a href="'.WebGUI::URL::page('op=deleteGroupConfirm&gid='.$session{form}{gid}).
|
||||
'">'.WebGUI::International::get(44).'</a>';
|
||||
$output .= ' <a href="'.WebGUI::URL::page('op=listGroups').'">'
|
||||
.WebGUI::International::get(45).'</a></div>';
|
||||
return _submenu($output);
|
||||
return _submenu($output, '42',"group delete");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -223,8 +228,6 @@ sub www_editGroup {
|
|||
} else {
|
||||
$g = WebGUI::Group->new($session{form}{gid});
|
||||
}
|
||||
$output .= helpIcon("group add/edit");
|
||||
$output .= '<h1>'.WebGUI::International::get(87).'</h1>';
|
||||
$f = WebGUI::HTMLForm->new;
|
||||
$f->hidden("op","editGroupSave");
|
||||
$f->hidden("gid",$session{form}{gid});
|
||||
|
|
@ -290,7 +293,7 @@ sub www_editGroup {
|
|||
$f->interval("dbCacheTimeout",WebGUI::International::get(1004), WebGUI::DateTime::secondsToInterval($g->dbCacheTimeout));
|
||||
$f->submit;
|
||||
$output .= $f->print;
|
||||
return _submenu($output);
|
||||
return _submenu($output,'87',"group add/edit");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -319,7 +322,6 @@ sub www_editGroupSave {
|
|||
sub www_emailGroup {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
my ($output,$f);
|
||||
$output = '<h1>'.WebGUI::International::get(809).'</h1>';
|
||||
$f = WebGUI::HTMLForm->new;
|
||||
$f->hidden("op","emailGroupSend");
|
||||
$f->hidden("gid",$session{form}{gid});
|
||||
|
|
@ -339,7 +341,7 @@ sub www_emailGroup {
|
|||
);
|
||||
$f->submit(WebGUI::International::get(810));
|
||||
$output = $f->print;
|
||||
return _submenu($output);
|
||||
return _submenu($output,'809');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -360,9 +362,7 @@ sub www_emailGroupSend {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_listGroups {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
my $output = helpIcon("groups manage");
|
||||
$output .= '<h1>'.WebGUI::International::get(89).'</h1>';
|
||||
$output .= getGroupSearchForm("listGroups");
|
||||
my $output = getGroupSearchForm("listGroups");
|
||||
my ($groupCount) = WebGUI::SQL->quickArray("select count(*) from groups");
|
||||
return _submenu($output) unless ($session{form}{doit} || $groupCount<250);
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
|
|
@ -382,46 +382,14 @@ sub www_listGroups {
|
|||
}
|
||||
$output .= '</table>';
|
||||
$output .= $p->getBarTraditional;
|
||||
return _submenu($output);
|
||||
return _submenu($output,'',"groups manage");
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_listGroups2 {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
my ($output, $p, $sth, @data, @row, $i, $userCount);
|
||||
$output = helpIcon("groups manage");
|
||||
$output .= '<h1>'.WebGUI::International::get(89).'</h1>';
|
||||
$sth = WebGUI::SQL->read("select groupId,groupName,description from groups
|
||||
where isEditable=1 order by groupName");
|
||||
while (@data = $sth->array) {
|
||||
$row[$i] = '<tr>';
|
||||
$row[$i] .= '<td valign="top" class="tableData"><a href="'
|
||||
.WebGUI::URL::page('op=editGroup&gid='.$data[0]).'">'.$data[1].'</td>';
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$data[2].'</td>';
|
||||
($userCount) = WebGUI::SQL->quickArray("select count(*) from groupings where groupId=".quote($data[0]));
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$userCount.'</td></tr>';
|
||||
$row[$i] .= '</tr>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=listGroups'));
|
||||
$p->setDataByArrayRef(\@row);
|
||||
$output .= '<table border=1 cellpadding=5 cellspacing=0 align="center">';
|
||||
$output .= '<tr><td class="tableHeader">'.WebGUI::International::get(84).'</td><td class="tableHeader">'
|
||||
.WebGUI::International::get(85).'</td><td class="tableHeader">'
|
||||
.WebGUI::International::get(748).'</td></tr>';
|
||||
$output .= $p->getPage($session{form}{pn});
|
||||
$output .= '</table>';
|
||||
$output .= $p->getBarTraditional($session{form}{pn});
|
||||
return _submenu($output);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_listGroupsSecondary {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(11));
|
||||
my ($output, $p, $sth, @data, @row, $i, $userCount);
|
||||
$output .= '<h1>'.WebGUI::International::get(89).'</h1>';
|
||||
my @editableGroups = WebGUI::SQL->buildArray("select groupId from groupings where userId=".quote($session{user}{userId})." and groupAdmin=1");
|
||||
push (@editableGroups,0);
|
||||
$sth = WebGUI::SQL->read("select groupId,groupName,description from groups
|
||||
|
|
@ -446,14 +414,13 @@ sub www_listGroupsSecondary {
|
|||
$output .= $p->getPage($session{form}{pn});
|
||||
$output .= '</table>';
|
||||
$output .= $p->getBarTraditional($session{form}{pn});
|
||||
return _submenu($output);
|
||||
return _submenu($output,'89');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_manageGroupsInGroup {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
my ($output, $p, $group, $groups, $f);
|
||||
$output = '<h1>'.WebGUI::International::get(813).'</h1><div align="center">';
|
||||
$f = WebGUI::HTMLForm->new;
|
||||
$f->hidden("op","addGroupsToGroupSave");
|
||||
$f->hidden("gid",$session{form}{gid});
|
||||
|
|
@ -468,7 +435,7 @@ sub www_manageGroupsInGroup {
|
|||
);
|
||||
$f->submit;
|
||||
$output .= $f->print;
|
||||
$output .= '</div><p/><table class="tableData" align="center">';
|
||||
$output .= '<p/><table class="tableData" align="center">';
|
||||
$output .= '<tr class="tableHeader"><td></td><td>'.WebGUI::International::get(84).'</td></tr>';
|
||||
$p = WebGUI::Paginator->new(WebGUI::URL::page('op=manageGroupsInGroup&gid='.$session{form}{gid}));
|
||||
$p->setDataByQuery("select a.groupName as name,a.groupId as id from groups a
|
||||
|
|
@ -483,14 +450,13 @@ sub www_manageGroupsInGroup {
|
|||
}
|
||||
$output .= '</table>';
|
||||
$output .= $p->getBarTraditional;
|
||||
return _submenu($output);
|
||||
return _submenu($output,'813');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_manageUsersInGroup {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
my $output = '<h1>'.WebGUI::International::get(88).'</h1>';
|
||||
$output .= WebGUI::Form::formHeader()
|
||||
my $output = WebGUI::Form::formHeader()
|
||||
.WebGUI::Form::hidden({
|
||||
name=>"gid",
|
||||
value=>$session{form}{gid}
|
||||
|
|
@ -551,7 +517,7 @@ sub www_manageUsersInGroup {
|
|||
);
|
||||
$f->submit;
|
||||
$output .= $f->print;
|
||||
return _submenu($output);
|
||||
return _submenu($output,'88');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -560,7 +526,6 @@ sub www_manageUsersInGroupSecondary {
|
|||
my ($output, $sth, %hash);
|
||||
tie %hash, 'Tie::CPHash';
|
||||
my $group = WebGUI::Group->new($session{form}{gid});
|
||||
$output = '<h1>'.WebGUI::International::get(88).' '.$group->name.'</h1>';
|
||||
my $f = WebGUI::HTMLForm->new;
|
||||
$f->hidden("gid",$session{form}{gid});
|
||||
$f->hidden("op","addUsersToGroupSecondarySave");
|
||||
|
|
@ -593,7 +558,7 @@ sub www_manageUsersInGroupSecondary {
|
|||
}
|
||||
$sth->finish;
|
||||
$output .= '</table>';
|
||||
return _submenu($output);
|
||||
return _submenu($output,'88');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ package WebGUI::Operation::Help;
|
|||
|
||||
use strict;
|
||||
use Tie::IxHash;
|
||||
use WebGUI::AdminConsole;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Session;
|
||||
|
|
@ -31,7 +32,7 @@ sub _get {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub _link {
|
||||
return '<a href="'.WebGUI::URL::page('op=viewHelp&hid='.WebGUI::URL::escape($_[0]).'&namespace='.$_[1]).'">'.$_[2].'</a>';
|
||||
return WebGUI::URL::page('op=viewHelp&hid='.WebGUI::URL::escape($_[0]).'&namespace='.$_[1]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -39,28 +40,31 @@ sub _seeAlso {
|
|||
my $related = shift;
|
||||
my $namespace = shift;
|
||||
my $output;
|
||||
foreach my $row (@{$related}) {
|
||||
my $help = _get($row->{tag},$row->{namespace});
|
||||
$output .= '<li>'._link($row->{tag},$row->{namespace},WebGUI::International::get($help->{title},$row->{namespace}));
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_viewHelp {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(12));
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
$ac->setAdminFunction("help");
|
||||
my $namespace = $session{form}{namespace} || "WebGUI";
|
||||
my $help = _get($session{form}{hid},$namespace);
|
||||
my $output = '<h1>'.WebGUI::International::get(93).': '.WebGUI::International::get($help->{title},$namespace).'</h1>';
|
||||
$output .= WebGUI::International::get($help->{body},$namespace);
|
||||
$output .= '<p><b>'.WebGUI::International::get(94).':<ul>';
|
||||
$output .= _seeAlso($help->{related},$namespace);
|
||||
$output .= '<li><a href="'.WebGUI::URL::page('op=viewHelpIndex').'">'.WebGUI::International::get(95).'</a></ul></b>';
|
||||
return WebGUI::Macro::negate($output);
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=viewHelpIndex'),WebGUI::International::get(95));
|
||||
foreach my $row (@{$help->{related}}) {
|
||||
my $relatedHelp = _get($row->{tag},$row->{namespace});
|
||||
$ac->addSubmenuItem(_link($row->{tag},$row->{namespace}),WebGUI::International::get($relatedHelp->{title},$row->{namespace}));
|
||||
}
|
||||
return $ac->render(
|
||||
WebGUI::Macro::negate(WebGUI::International::get($help->{body},$namespace)),
|
||||
WebGUI::International::get(93).': '.WebGUI::International::get($help->{title},$namespace)
|
||||
);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_viewHelpIndex {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(12));
|
||||
my %helpIndex;
|
||||
tie %helpIndex, "Tie::IxHash";
|
||||
my $i;
|
||||
|
|
@ -86,25 +90,23 @@ sub www_viewHelpIndex {
|
|||
}
|
||||
}
|
||||
}
|
||||
my $output = '<h1>Help Index</h1><table width="100%" class="content"><tr><td valign="top">';
|
||||
my $output = '<table width="100%" class="content"><tr><td valign="top">';
|
||||
my $halfway = round($i/2);
|
||||
$i = 0;
|
||||
%helpIndex = sortHash(%helpIndex);
|
||||
foreach my $key (keys %helpIndex) {
|
||||
my ($id,$namespace) = split("_",$key);
|
||||
my $help = _get($id,$namespace);
|
||||
$output .= _link($id,$namespace,$helpIndex{$key});
|
||||
$output .= '<ul style="padding-left: 20px; margin: 2px; font-size: smaller;">';
|
||||
$output .= _seeAlso($help->{related},$namespace);
|
||||
$output .= '</ul>';
|
||||
$output .= "<br>";
|
||||
$output .= '<p><a href="'._link($id,$namespace).'">'.$helpIndex{$key}.'</a></p>';
|
||||
$i++;
|
||||
if ($i == $halfway) {
|
||||
$output .= '</td><td valign="top">';
|
||||
}
|
||||
}
|
||||
$output .= '</td></tr></table>';
|
||||
return $output;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
$ac->setAdminFunction("help");
|
||||
return $ac->render($output);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -11,13 +11,12 @@ package WebGUI::Operation::MetaData;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use Tie::IxHash;
|
||||
use WebGUI::AdminConsole;
|
||||
use WebGUI::Icon;
|
||||
use WebGUI::Id;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::MetaData;
|
||||
use WebGUI::Operation::Shared;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
|
@ -26,24 +25,20 @@ use WebGUI::Utility;
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub _submenu {
|
||||
my (%menu);
|
||||
tie %menu, 'Tie::IxHash';
|
||||
$menu{WebGUI::URL::page('op=manageSettings')} = WebGUI::International::get(4);
|
||||
my $workarea = shift;
|
||||
my $title = shift;
|
||||
$title = WebGUI::International::get($title,"MetaData") if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
if ($help) {
|
||||
$ac->setHelp($help,"MetaData");
|
||||
}
|
||||
$ac->setAdminFunction("contentProfiling");
|
||||
if($session{form}{op} ne "manageMetaData") {
|
||||
$menu{WebGUI::URL::page('op=manageMetaData')} = WebGUI::International::get('Manage Metadata','MetaData');
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=manageMetaData'), WebGUI::International::get('content profiling','MetaData'));
|
||||
}
|
||||
$menu{WebGUI::URL::page('op=editMetaDataField')} = WebGUI::International::get('Add new field','MetaData');
|
||||
return menuWrapper($_[0],\%menu);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_saveMetaDataSettings {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
WebGUI::SQL->write("update settings set value=".quote($session{form}{metaDataEnabled})." where name='metaDataEnabled'");
|
||||
WebGUI::SQL->write("update settings set value=".quote($session{form}{passiveProfilingEnabled})." where name='passiveProfilingEnabled'");
|
||||
$session{setting}{metaDataEnabled} = $session{form}{metaDataEnabled};
|
||||
$session{setting}{passiveProfilingEnabled} = $session{form}{passiveProfilingEnabled};
|
||||
return www_manageMetaData();
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editMetaDataField'), WebGUI::International::get('Add new field','MetaData'));
|
||||
return $ac->render($workarea, $title);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -52,8 +47,6 @@ sub www_editMetaDataField {
|
|||
return WebGUI::Privilege::vitalComponent() if ($session{form}{fid} < 1000 && $session{form}{fid} > 0);
|
||||
|
||||
my ($output, $fieldName, $defaultValue, $description, $fieldInfo);
|
||||
$output = helpIcon('metadata edit property');
|
||||
$output .= '<h1>'.WebGUI::International::get('Edit Metadata','MetaData').'</h1>';
|
||||
|
||||
if($session{form}{fid} && $session{form}{fid} ne "new") {
|
||||
$fieldInfo = WebGUI::MetaData::getField($session{form}{fid});
|
||||
|
|
@ -78,10 +71,9 @@ sub www_editMetaDataField {
|
|||
-types=>WebGUI::MetaData::getFieldTypes()
|
||||
);
|
||||
$f->textarea("possibleValues",WebGUI::International::get(487),$fieldInfo->{possibleValues});
|
||||
#$f->text("defaultValue", "Default value", $defaultValue);
|
||||
$f->submit();
|
||||
$output .= $f->print;
|
||||
return _submenu($output);
|
||||
return _submenu($output,'Edit Metadata',"metadata edit property");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -130,17 +122,13 @@ sub www_deleteMetaDataField {
|
|||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
return WebGUI::Privilege::vitalComponent() if ($session{form}{fid} < 1000 && $session{form}{fid} > 0);
|
||||
|
||||
#TODO HELP
|
||||
my $output = helpIcon("theme delete");
|
||||
$output .= '<h1>'.WebGUI::International::get('Delete Metadata field','MetaData').'</h1>';
|
||||
$output .= WebGUI::International::get('deleteConfirm','MetaData').'<p>';
|
||||
my $output = WebGUI::International::get('deleteConfirm','MetaData').'<p>';
|
||||
$output .= '<div align="center"><a href="'.
|
||||
WebGUI::URL::page('op=deleteMetaDataFieldConfirm&fid='.$session{form}{fid})
|
||||
.'">'.WebGUI::International::get(44).'</a>';
|
||||
$output .= ' <a href="'.WebGUI::URL::page('op=manageMetaData').
|
||||
'">'.WebGUI::International::get(45).'</a></div>';
|
||||
return _submenu($output);
|
||||
|
||||
return _submenu($output,'Delete Metadata field');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -157,25 +145,6 @@ sub www_deleteMetaDataFieldConfirm {
|
|||
sub www_manageMetaData {
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3));
|
||||
my $output;
|
||||
$output = helpIcon('metadata manage');
|
||||
$output .= '<h1>'.WebGUI::International::get('Manage Metadata','MetaData').'</h1>';
|
||||
my $f = new WebGUI::HTMLForm;
|
||||
$f->hidden("op","saveMetaDataSettings");
|
||||
$f->yesNo(
|
||||
-name=>"metaDataEnabled",
|
||||
-label=>WebGUI::International::get("Enable Metadata ?", 'MetaData'),
|
||||
-value=>$session{setting}{metaDataEnabled},
|
||||
);
|
||||
$f->yesNo(
|
||||
-name=>"passiveProfilingEnabled",
|
||||
-label=>WebGUI::International::get("Enable passive profiling ?", 'MetaData'),
|
||||
-value=>$session{setting}{passiveProfilingEnabled},
|
||||
-extras=>' onChange="alert(\''.WebGUI::International::get("Illegal Warning","MetaData").'\')" '
|
||||
);
|
||||
|
||||
$f->submit();
|
||||
$output .= $f->print;
|
||||
$output .= "<h1>".WebGUI::International::get('Manage Metadata fields','MetaData')."</h1>";
|
||||
my $fields = WebGUI::MetaData::getMetaDataFields();
|
||||
foreach my $fieldId (keys %{$fields}) {
|
||||
$output .= deleteIcon("op=deleteMetaDataField&fid=".$fieldId);
|
||||
|
|
@ -185,7 +154,7 @@ sub www_manageMetaData {
|
|||
$output .= '<p><a href="'.WebGUI::URL::page("op=editMetaDataField&fid=new").'">'.
|
||||
WebGUI::International::get('Add new field','MetaData').
|
||||
'</a></p>';
|
||||
return _submenu($output);
|
||||
return _submenu($output,undef,"metadata manage");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,17 @@ sub www_editMiscSettings {
|
|||
-value=>$session{setting}{adminStyleId},
|
||||
-label=>WebGUI::International::get(1081)
|
||||
);
|
||||
$f->yesNo(
|
||||
-name=>"metaDataEnabled",
|
||||
-label=>WebGUI::International::get("Enable Metadata ?", 'MetaData'),
|
||||
-value=>$session{setting}{metaDataEnabled},
|
||||
);
|
||||
$f->yesNo(
|
||||
-name=>"passiveProfilingEnabled",
|
||||
-label=>WebGUI::International::get("Enable passive profiling ?", 'MetaData'),
|
||||
-value=>$session{setting}{passiveProfilingEnabled},
|
||||
-extras=>' onChange="alert(\''.WebGUI::International::get("Illegal Warning","MetaData").'\')" '
|
||||
);
|
||||
$f->submit;
|
||||
$output .= $f->print;
|
||||
return _submenu($output);
|
||||
|
|
|
|||
|
|
@ -16,11 +16,6 @@ our $I18N = {
|
|||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'Manage Metadata fields' => {
|
||||
message => q|Manage metadata properties|,
|
||||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'Metadata' => {
|
||||
message => q|Metadata|,
|
||||
lastUpdated => 1089039511
|
||||
|
|
@ -41,11 +36,6 @@ our $I18N = {
|
|||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'Manage Metadata' => {
|
||||
message => q|Manage Metadata|,
|
||||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'Add new field' => {
|
||||
message => q|Add new metadata property|,
|
||||
lastUpdated => 1089039511
|
||||
|
|
@ -82,6 +72,94 @@ our $I18N = {
|
|||
context => q|The title of the content profiling manager for the admin console.|
|
||||
},
|
||||
|
||||
'metadata edit property body' => {
|
||||
message => q|
|
||||
You may add as many Metadata properties as you like.<br>
|
||||
<br>
|
||||
<b>Field Name</b><br>
|
||||
The name of this metadata property.It must be unique. <br>
|
||||
It is advisable to use only letters (a-z), numbers (0-9) or underscores (_) for
|
||||
the field names.
|
||||
<p><b>Description<br>
|
||||
</b>An optional description for this metadata property. This text is displayed
|
||||
as mouseover text in the wobject properties tab.</p>
|
||||
<p><b>Data Type<br>
|
||||
</b>Choose the type of form element for this field.<b><br>
|
||||
<br>
|
||||
Possible Values<br>
|
||||
</b>This field is used for the list types (Radio List and Select List). Enter
|
||||
the values you wish to appear, one per line.</p>
|
||||
|,
|
||||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'metadata manage body' => {
|
||||
message => q|
|
||||
<p>The content profiling system in WebGUI (also known as the meta data system) allows you to identify content. Metadata is
|
||||
information about the content, and is defined in terms of property-value pairs.</p>
|
||||
<p>Examples of metadata:</p>
|
||||
<ul>
|
||||
<li>contenttype: sport</li>
|
||||
<li>adult content: no</li>
|
||||
<li>source: newspaper</li>
|
||||
</ul>
|
||||
<p>In the example <b>source: newspaper</b> is <i>source</i> the <i>property</i>
|
||||
and <i>newspaper</i> the <i>value</i>.</p>
|
||||
<p>Metadata properties are defined globally, while Metadata values are set for
|
||||
each wobject under the tab "Metadata" in the wobject properties.</p>
|
||||
<p>Before you can use metadata, you'll have to switch the "Enable Metadata
|
||||
?" setting to Yes.</p>
|
||||
<p>Usage of metadata:</p>
|
||||
<ul>
|
||||
<li><b>Passive Profiling</b><br>
|
||||
When passive profiling is switched on, every wobject viewed by a user will
|
||||
be logged. <br>
|
||||
The WebGUI scheduler summarizes the profiling information on a regular
|
||||
basis. <br>
|
||||
The metadata is used to generate the summary. This is basically content
|
||||
ranking based upon the user's Areas of Interest (AOI).<br>
|
||||
By default the summarizer runs once a day. However you can change that by
|
||||
setting: <b>passiveProfileInterval = <number of seconds> </b>in the
|
||||
WebGUI config file. <br>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><b>Areas of Interest Ranking<br>
|
||||
</b>Metadata in combination with passive profiling produces AOI (Areas of
|
||||
Interest) information. You can retrieve the value of a metadata property
|
||||
with the ^AOIRank macro:<br>
|
||||
<br>
|
||||
^AOIRank(contenttype); <br>
|
||||
This would return the highest ranked contenttype for this user, such as
|
||||
"sport".<br>
|
||||
<br>
|
||||
^AOIRank(contenttype,2);<br>
|
||||
This would return the second highest ranked contenttype for this user.<br>
|
||||
<br>
|
||||
You can also retrieve the number of hits a particular AOI has gotten:<br>
|
||||
<br>
|
||||
^AOIHits(contenttype,sport); <br>
|
||||
This would return 99 is this user has looked at content that was tagged
|
||||
"contenttype = sport" 99 times. </li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><b>Show content based upon criteria<br>
|
||||
</b>The Wobject Proxy allows you to select content based upon criteria like:<br>
|
||||
contenttype = sport AND source != newspaper<br>
|
||||
<br>
|
||||
You can use the AOI macro's described above in the criteria, so you can
|
||||
present content based upon the users Areas of Interest. Example:<br>
|
||||
type = ^AOIRank(contenttype);</li>
|
||||
</ul>|,
|
||||
lastUpdated => 1099039511,
|
||||
context => q|Metadata help|
|
||||
},
|
||||
|
||||
'Metadata, Edit property' => {
|
||||
message => q|Metadata, Edit|,
|
||||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -1708,72 +1708,6 @@ As with any delete operation, you are prompted to be sure you wish to proceed wi
|
|||
lastUpdated => 1050191766
|
||||
},
|
||||
|
||||
'Metadata, Manage' => {
|
||||
message => q|Metadata, Manage|,
|
||||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'metadata manage body' => {
|
||||
message => q|
|
||||
<p>The metadata system in WebGUI allows you to identify content. Metadata is
|
||||
information about the content, and is defined in terms of property-value pairs.</p>
|
||||
<p>Examples of metadata:</p>
|
||||
<ul>
|
||||
<li>contenttype: sport</li>
|
||||
<li>adult content: no</li>
|
||||
<li>source: newspaper</li>
|
||||
</ul>
|
||||
<p>In the example <b>source: newspaper</b> is <i>source</i> the <i>property</i>
|
||||
and <i>newspaper</i> the <i>value</i>.</p>
|
||||
<p>Metadata properties are defined globally, while Metadata values are set for
|
||||
each wobject under the tab "Metadata" in the wobject properties.</p>
|
||||
<p>Before you can use metadata, you'll have to switch the "Enable Metadata
|
||||
?" setting to Yes.</p>
|
||||
<p>Usage of metadata:</p>
|
||||
<ul>
|
||||
<li><b>Passive Profiling</b><br>
|
||||
When passive profiling is switched on, every wobject viewed by a user will
|
||||
be logged. <br>
|
||||
The WebGUI scheduler summarizes the profiling information on a regular
|
||||
basis. <br>
|
||||
The metadata is used to generate the summary. This is basically content
|
||||
ranking based upon the user's Areas of Interest (AOI).<br>
|
||||
By default the summarizer runs once a day. However you can change that by
|
||||
setting: <b>passiveProfileInterval = <number of seconds> </b>in the
|
||||
WebGUI config file. <br>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><b>Areas of Interest Ranking<br>
|
||||
</b>Metadata in combination with passive profiling produces AOI (Areas of
|
||||
Interest) information. You can retrieve the value of a metadata property
|
||||
with the ^AOIRank macro:<br>
|
||||
<br>
|
||||
^AOIRank(contenttype); <br>
|
||||
This would return the highest ranked contenttype for this user, such as
|
||||
"sport".<br>
|
||||
<br>
|
||||
^AOIRank(contenttype,2);<br>
|
||||
This would return the second highest ranked contenttype for this user.<br>
|
||||
<br>
|
||||
You can also retrieve the number of hits a particular AOI has gotten:<br>
|
||||
<br>
|
||||
^AOIHits(contenttype,sport); <br>
|
||||
This would return 99 is this user has looked at content that was tagged
|
||||
"contenttype = sport" 99 times. </li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><b>Show content based upon criteria<br>
|
||||
</b>The Wobject Proxy allows you to select content based upon criteria like:<br>
|
||||
contenttype = sport AND source != newspaper<br>
|
||||
<br>
|
||||
You can use the AOI macro's described above in the criteria, so you can
|
||||
present content based upon the users Areas of Interest. Example:<br>
|
||||
type = ^AOIRank(contenttype);</li>
|
||||
</ul>|,
|
||||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'678' => {
|
||||
message => q|Root, Manage|,
|
||||
lastUpdated => 1031514049
|
||||
|
|
@ -1943,11 +1877,6 @@ Just as the LDAP Identity Name is a label, so is the LDAP Password Name. Use thi
|
|||
lastUpdated => 1031514049
|
||||
},
|
||||
|
||||
'94' => {
|
||||
message => q|See also|,
|
||||
lastUpdated => 1031514049
|
||||
},
|
||||
|
||||
'816' => {
|
||||
message => q|Status|,
|
||||
lastUpdated => 1038431169
|
||||
|
|
@ -1958,11 +1887,6 @@ Just as the LDAP Identity Name is a label, so is the LDAP Password Name. Use thi
|
|||
lastUpdated => 1031514049
|
||||
},
|
||||
|
||||
'Metadata, Edit property' => {
|
||||
message => q|Metadata, Edit property|,
|
||||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'456' => {
|
||||
message => q|Back to user list.|,
|
||||
lastUpdated => 1031514049
|
||||
|
|
@ -3815,7 +3739,8 @@ You also cannot import a theme from a version of WebGUI that is newer than the o
|
|||
|
||||
'89' => {
|
||||
message => q|Groups|,
|
||||
lastUpdated => 1031514049
|
||||
lastUpdated => 1031514049,
|
||||
context => q|Title of the group manager for the admin console.|
|
||||
},
|
||||
|
||||
'175' => {
|
||||
|
|
@ -7226,27 +7151,6 @@ A randomly generated number. This is often used on images (such as banner ads) t
|
|||
lastUpdated => 1031514049
|
||||
},
|
||||
|
||||
'metadata edit property body' => {
|
||||
message => q|
|
||||
You may add as many Metadata properties as you like.<br>
|
||||
<br>
|
||||
<b>Field Name</b><br>
|
||||
The name of this metadata propertie.It must be unique. <br>
|
||||
It is advisable to use only letters (a-z), numbers (0-9) or underscores (_) for
|
||||
the field names.
|
||||
<p><b>Description<br>
|
||||
</b>An optional description for this metadata property. This text is displayed
|
||||
as mouseover text in the wobject properties tab.</p>
|
||||
<p><b>Data Type<br>
|
||||
</b>Choose the type of form element for this field.<b><br>
|
||||
<br>
|
||||
Possible Values<br>
|
||||
</b>This field is used for the list types (Radio List and Select List). Enter
|
||||
the values you wish to appear, one per line.</p>
|
||||
|,
|
||||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'4' => {
|
||||
message => q|Manage settings.|,
|
||||
lastUpdated => 1031514049
|
||||
|
|
@ -7271,67 +7175,7 @@ the values you wish to appear, one per line.</p>
|
|||
message => q|Scratch Filter|,
|
||||
lastUpdated => 1052560369
|
||||
},
|
||||
'metadata manage body' => {
|
||||
message => q|
|
||||
<p>The metadata system in WebGUI allows you to identify content. Metadata is
|
||||
information about the content, and is defined in terms of property-value pairs.</p>
|
||||
<p>Examples of metadata:</p>
|
||||
<ul>
|
||||
<li>contenttype: sport</li>
|
||||
<li>adult content: no</li>
|
||||
<li>source: newspaper</li>
|
||||
</ul>
|
||||
<p>In the example <b>source: newspaper</b> is <i>source</i> the <i>property</i>
|
||||
and <i>newspaper</i> the <i>value</i>.</p>
|
||||
<p>Metadata properties are defined globally, while Metadata values are set for
|
||||
each wobject under the tab "Metadata" in the wobject properties.</p>
|
||||
<p>Before you can use metadata, you'll have to switch the "Enable Metadata
|
||||
?" setting to Yes.</p>
|
||||
<p>Usage of metadata:</p>
|
||||
<ul>
|
||||
<li><b>Passive Profiling</b><br>
|
||||
When passive profiling is switched on, every wobject viewed by a user will
|
||||
be logged. <br>
|
||||
The WebGUI scheduler summarizes the profiling information on a regular
|
||||
basis. <br>
|
||||
The metadata is used to generate the summary. This is basically content
|
||||
ranking based upon the user's Areas of Interest (AOI).<br>
|
||||
By default the summarizer runs once a day. However you can change that by
|
||||
setting: <b>passiveProfileInterval = <number of seconds> </b>in the
|
||||
WebGUI config file. <br>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><b>Areas of Interest Ranking<br>
|
||||
</b>Metadata in combination with passive profiling produces AOI (Areas of
|
||||
Interest) information. You can retrieve the value of a metadata property
|
||||
with the ^AOIRank macro:<br>
|
||||
<br>
|
||||
^AOIRank(contenttype); <br>
|
||||
This would return the highest ranked contenttype for this user, such as
|
||||
"sport".<br>
|
||||
<br>
|
||||
^AOIRank(contenttype,2);<br>
|
||||
This would return the second highest ranked contenttype for this user.<br>
|
||||
<br>
|
||||
You can also retrieve the number of hits a particular AOI has gotten:<br>
|
||||
<br>
|
||||
^AOIHits(contenttype,sport); <br>
|
||||
This would return 99 is this user has looked at content that was tagged
|
||||
"contenttype = sport" 99 times. </li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><b>Show content based upon criteria<br>
|
||||
</b>The Wobject Proxy allows you to select content based upon criteria like:<br>
|
||||
contenttype = sport AND source != newspaper<br>
|
||||
<br>
|
||||
You can use the AOI macro's described above in the criteria, so you can
|
||||
present content based upon the users Areas of Interest. Example:<br>
|
||||
type = ^AOIRank(contenttype);</li>
|
||||
</ul>|,
|
||||
lastUpdated => 1089039511,
|
||||
context => q|Metadata help|
|
||||
},
|
||||
|
||||
'Export Page' => {
|
||||
message => q|Export Page|,
|
||||
lastUpdated => 1089039511,
|
||||
|
|
@ -7470,12 +7314,6 @@ config file.</p>
|
|||
context => q|Title of the database manager for the admin console.|
|
||||
},
|
||||
|
||||
'groups' => {
|
||||
message => q|Groups|,
|
||||
lastUpdated =>1092930637,
|
||||
context => q|Title of the group manager for the admin console.|
|
||||
},
|
||||
|
||||
'packages' => {
|
||||
message => q|Packages|,
|
||||
lastUpdated =>1092930637,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
position: absolute;
|
||||
top: 0px;
|
||||
left: 102px;
|
||||
font-size: 60px;
|
||||
font-size: 50px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
|
@ -30,6 +30,8 @@
|
|||
width: 180px;
|
||||
/* border: 1px solid #ddd;
|
||||
padding: 5px; */
|
||||
font-family: helvetica, arial;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.adminConsoleMainMenu {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue