Merge branch 'master' of git@github.com:plainblack/webgui

This commit is contained in:
daviddelikat 2009-10-29 09:07:03 -05:00
commit d0307d99c1
15 changed files with 166 additions and 264 deletions

View file

@ -1291,11 +1291,16 @@ sub viewList {
my $session = $self->session;
my $i18n = WebGUI::International->new($session,"Asset_Calendar");
my $var = $self->getTemplateVars;
my $tz = $session->datetime->getTimeZone();
### Get the events
my $dtStart = WebGUI::DateTime->new( $session, $params->{start} )->truncate( to => "day" );
my $dtStart = WebGUI::DateTime->new( $session, $params->{start} );
$dtStart->set_time_zone($tz);
$dtStart->truncate( to => 'day' );
my $dtEnd = $dtStart->clone->add( seconds => $self->get('listViewPageInterval') );
warn 'truncated: '.$dtStart->toDatabase;
warn 'end date: '.$dtEnd->toDatabase;
my @events
= $self->getEventsIn(
$dtStart->toDatabase,

View file

@ -18,6 +18,7 @@ our $HELP = {
{ 'name' => 'back.label' },
{ 'name' => 'compensation.label' },
{ 'name' => 'open.label' },
{ 'name' => 'captcha_label' },
{ 'name' => 'close.label' },
{ 'name' => 'closed.label' },
{ 'name' => 'critical.label' },
@ -34,6 +35,9 @@ our $HELP = {
{ 'name' => 'job.title.label' },
{ 'name' => 'job.description.label' },
{ 'name' => 'job.requirements.label' },
{ 'name' => 'karmascale.label' },
{ 'name' => 'karmaRank.label' },
{ 'name' => 'keywords.label' },
{ 'name' => 'location.label' },
{ 'name' => 'layout.flat.label' },
{ 'name' => 'link.header.label' },
@ -64,6 +68,7 @@ our $HELP = {
{ 'name' => 'synopsis.label' },
{ 'name' => 'thumbnail.label' },
{ 'name' => 'title.label' },
{ 'name' => 'transferkarma.label' },
{ 'name' => 'unlock.label' },
{ 'name' => 'unstick.label' },
{ 'name' => 'unsubscribe.label' },
@ -80,6 +85,11 @@ our $HELP = {
title => 'collaboration post list template variables title',
body => '',
fields => [],
isa => [
{ tag => 'pagination template variables',
namespace => 'WebGUI'
},
],
variables => [
{ 'name' => 'post_loop',
'variables' => [
@ -139,6 +149,7 @@ our $HELP = {
fields => [],
variables => [
{ 'name' => 'displayLastReply' },
{ 'name' => 'user.canStartThread' },
{ 'name' => 'user.canPost' },
{ 'name' => 'user.isModerator' },
{ 'name' => 'user.isVisitor', },
@ -159,7 +170,7 @@ our $HELP = {
{ 'name' => 'sortby.rating.url' },
{ 'name' => 'collaborationAssetId' },
],
related => [
isa => [
{ tag => 'collaboration template labels',
namespace => 'Asset_Collaboration',
},
@ -173,76 +184,19 @@ our $HELP = {
title => 'collaboration search template title',
body => '',
fields => [],
isa => [
{ namespace => "Asset_Collaboration",
tag => "collaboration post list template variables"
},
],
variables => [
{ 'name' => 'form.header' },
{ 'name' => 'query.form' },
{ 'name' => 'form.search' },
{ 'name' => 'form.footer' },
{ 'name' => 'back.url' },
{ 'name' => 'unsubscribe.url', },
{ 'name' => 'sortby.title.url', },
{ 'name' => 'sortby.username.url', },
{ 'name' => 'sortby.date.url', },
{ 'name' => 'sortby.lastreply.url', },
{ 'name' => 'sortby.views.url', },
{ 'name' => 'sortby.replies.url', },
{ 'name' => 'sortby.rating.url', }
],
related => [
{ tag => 'collaboration post list template variables',
namespace => 'Asset_Collaboration',
},
]
},
'collaboration rss template' => {
title => 'collaboration rss template title',
body => '',
fields => [],
variables => [
{ 'name' => 'title',
'description' => 'feed title'
},
{ 'name' => 'link',
'description' => 'collab link'
},
{ 'name' => 'description',
'description' => 'feed description'
},
{ 'name' => 'generator' },
{ 'name' => 'webMaster' },
{ 'name' => 'docs' },
{ 'name' => 'lastBuildDate' },
{ 'name' => 'item_loop',
'variables' => [
{ 'name' => 'author' },
{ 'name' => 'title',
'description' => 'post title'
},
{ 'name' => 'link',
'description' => 'full text link'
},
{ 'name' => 'description',
'description' => 'item description'
},
{ 'name' => 'guid' },
{ 'name' => 'pubDate' },
{ 'name' => 'epochDate' },
{ 'name' => 'attachmentLoop',
'variables' => [
{ 'name' => 'attachment_thumbnail' },
{ 'name' => 'attachment.url' },
{ 'name' => 'attachment.path' },
{ 'name' => 'attachment.length' }
]
}
]
}
],
related => [
{ tag => 'collaboration post list template variables',
namespace => 'Asset_Collaboration',
},
]
related => [ ],
},
};

View file

@ -337,7 +337,7 @@ A WebGUI::Session object
sub www_autoAddToGroup {
my $session = shift;
return WebGUI::AdminConsole->new($session,"groups")->render($session->privilege->insufficient()) unless ($session->user->userId ne 1);
return $self->session->privilege->noAccess() if ($session->user->isVisitor);
my $group = WebGUI::Group->new($session,$session->form->process("groupId"));
if ($group && $group->autoAdd) {
$group->addUsers([$session->user->userId],[$session->form->process("groupId")]);
@ -361,7 +361,7 @@ A WebGUI::Session object
sub www_autoDeleteFromGroup {
my $session = shift;
return WebGUI::AdminConsole->new($session,"groups")->render($session->privilege->insufficient()) unless ($session->user->userId ne 1);
return $self->session->privilege->noAccess() if ($session->user->isVisitor);
my $group = WebGUI::Group->new($session,$session->form->process("groupId"));
if ($group && $group->autoDelete) {
$group->deleteUsers([$session->user->userId],[$session->form->process("groupId")]);

View file

@ -100,6 +100,7 @@ sub execute {
my $getCalendar = WebGUI::Asset::Wobject::Calendar->getIsa($session);
CALENDAR: while (my $calendar = $getCalendar->()) {
next unless defined $calendar;
my $calendarTitle = $calendar->getTitle;
my $calendarId = $calendar->getId;
if ( $calendar->get( "state" ) ne "published" ) {

View file

@ -81,7 +81,7 @@ sub definition {
},
paypalSubject => {
fieldType => 'text',
label => $i18n->get('Subject for vendor notication email'),
label => $i18n->get('Subject for vendor notification email'),
defaultValue => $i18n->get('Vendor payout from').' ' . $session->setting->get('companyUrl'),
},
notificationGroupId => {

View file

@ -1057,6 +1057,31 @@ our $I18N = {
lastUpdated => 1150169038,
},
'transferkarma.label' => {
message => q|The phrase "Transfer Karma".|,
lastUpdated => 1150169038,
},
'karmascale.label' => {
message => q|The phrase "Karma Scale".|,
lastUpdated => 1150169038,
},
'karmaRank.label' => {
message => q|The phrase "Karma Rank".|,
lastUpdated => 1150169038,
},
'captcha_label' => {
message => q|The word "Captcha".|,
lastUpdated => 1150169038,
},
'keywords.label' => {
message => q|The word "Keywords".|,
lastUpdated => 1150169038,
},
'display last reply description' => {
message => q|If set to Yes, template variables will be added to allow the display of the last reply in this Thread.|,
lastUpdated => 1165449294,
@ -1404,6 +1429,12 @@ user has an avatar.|,
lastUpdated => 1149655833,
},
'user.canStartThread' => {
message => q|A conditional that is true if the current user can add Threads to this Collaboration Asset.|,
lastUpdated => 1149655833,
context => q|Template variable help|,
},
'displayLastReply' => {
message => q|A conditional that is true if the Collaboration System was configured to display the last reply. If this variable is true, then in the Collaboration Template, the lastReply.* variables will be enabled.|,
lastUpdated => 1149655833,
@ -1510,11 +1541,21 @@ the Collaboration Asset, the user will be notified.|,
lastUpdated => 1149655909,
},
'form.footer' => {
message => q|HTML required to end the search form.|,
lastUpdated => 1149655909,
},
'back.url' => {
message => q|A URL for returning to the main view for this Collaboration Asset.|,
lastUpdated => 1149655909,
},
'doit' => {
message => q|A boolean that is true if a search has just been submitted|,
lastUpdated => 1149655909,
},
'enable avatars' => {
message => q|Enable Avatars?|,
lastUpdated => 1131432414,
@ -1535,112 +1576,6 @@ the Collaboration Asset, the user will be notified.|,
lastUpdated => 1180759724,
},
'collaboration rss template title' => {
message => q|Collaboration RSS Template Variables|,
lastUpdated => 1184905545,
},
'feed title' => {
message => q|The title of the rss feed (comes from the collaboration title).|,
lastUpdated => 1149656056,
},
'collab link' => {
message => q|The url to the collaboration.|,
lastUpdated => 1149656056,
},
'feed description' => {
message => q|The description of the rss feed (comes from the collaboration synopsis).|,
lastUpdated => 1216913516,
},
'generator' => {
message => q|The program used to generate the rss feed, i.e. WebGUI plus version information. (optional field)|,
lastUpdated => 1149656056,
},
'webMaster' => {
message => q|The email address of the person responsible for the technical issues relating to this rss feed. (optional field)|,
lastUpdated => 1149656056,
},
'docs' => {
message => q|The url of documentation about the format of this file, RSS 2.0 (optional field)|,
lastUpdated => 1149656056,
},
'lastBuildDate' => {
message => q|The date that this feed was last updated. (optional field)|,
lastUpdated => 1149656056,
},
'item_loop' => {
message => q|Loops over the posts to be transmitted in this RSS feed.|,
lastUpdated => 1149656056,
},
'author' => {
message => q|The username of the person who submitted the post.|,
lastUpdated => 1149656056,
},
'post title' => {
message => q|The title of the item (post).|,
lastUpdated => 1149656056,
},
'full text link' => {
message => q|The url to the full text of the item.|,
lastUpdated => 1149656056,
},
'item description' => {
message => q|A synopsis of the item.|,
lastUpdated => 1149656056,
},
'guid' => {
message => q|A unique identifier for this item.|,
lastUpdated => 1149656056,
},
'pubDate' => {
message => q|The date the item was published.|,
lastUpdated => 1149656056,
},
'epochDate' => {
message => q|The date the item was published as an epoch date so that the Date macro can be used for custom date formatting.|,
lastUpdated => 1222106027,
},
'attachmentLoop' => {
message => q|A loop containg all attachements to this item (post).|,
lastUpdated => 1149656056,
},
'attachment_thumbnail' => {
message => q|The URL to the thumbnail for this attachment. Files will be represented by an
icon depending on their type. Images will have a true thumbnail.|,
lastUpdated => 1169747804,
},
'attachment.url' => {
message => q|The URL to this attachment.|,
lastUpdated => 1149656056,
},
'attachment.path' => {
message => q|The path in the filesystem to this attachment.|,
lastUpdated => 1149656056,
},
'attachment.length' => {
message => q|The length in this attachment, in bytes.|,
lastUpdated => 1149656056,
},
'collaborationAssetId' => {
message => q|The assetId of this Collaboration System. Unlike the variable assetId, this one will not be overridden by the assetIds inside of Threads or Posts.|,
lastUpdated => 1170543345,