Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Calendar mutations
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 22 Oct 2022
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL;
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\Types;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Blog mutationss GraphQL API
|
||||
*/
|
||||
abstract class _Mutation
|
||||
{
|
||||
/**
|
||||
* Get the supported query types in this app
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function mutations(): array
|
||||
{
|
||||
$return = [
|
||||
'createEvent' => new \IPS\calendar\api\GraphQL\Mutations\CreateEvent(),
|
||||
];
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Create entry mutation
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 22 oct 2022
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL\Mutations;
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\TypeRegistry;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Event mutation for GraphQL API
|
||||
*/
|
||||
class _CreateEvent extends \IPS\Content\Api\GraphQL\ItemMutator
|
||||
{
|
||||
/**
|
||||
* Class
|
||||
*/
|
||||
protected $class = \IPS\calendar\Event::class;
|
||||
|
||||
/*
|
||||
* @brief Query description
|
||||
*/
|
||||
public static $description = "Create a new calendar event";
|
||||
|
||||
/*
|
||||
* Mutation arguments
|
||||
*/
|
||||
public function args(): array
|
||||
{
|
||||
$args = parent::args();
|
||||
$args['calendar'] = TypeRegistry::nonNull( TypeRegistry::id() );
|
||||
return $args;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the mutation return type
|
||||
*/
|
||||
public function type()
|
||||
{
|
||||
return \IPS\calendar\api\GraphQL\TypeRegistry::event();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves this mutation
|
||||
*
|
||||
* @param mixed Value passed into this resolver
|
||||
* @param array Arguments
|
||||
* @param array Context values
|
||||
* @return \IPS\calendar\Event
|
||||
*/
|
||||
public function resolve($val, $args, $context, $info)
|
||||
{
|
||||
/* Get calendar */
|
||||
try
|
||||
{
|
||||
$calendar = \IPS\calendar\Calendar::loadAndCheckPerms( $args['calendarID'] );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_CALENDAR', '1L296/6_graphql', 400 );
|
||||
}
|
||||
|
||||
/* Check permission */
|
||||
if ( !$calendar->can( 'add', \IPS\Member::loggedIn() ) )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_PERMISSION', '1L296/7_graphql', 403 );
|
||||
}
|
||||
|
||||
/* Check we have a title and a post */
|
||||
if ( !$args['title'] )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_TITLE', '1L296/8_graphql', 400 );
|
||||
}
|
||||
if ( !$args['content'] )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_POST', '1L296/9_grapqhl', 400 );
|
||||
}
|
||||
|
||||
if ( !$args['start'] )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'INVALID_START', '1L296/A_grapqhl', 400 );
|
||||
}
|
||||
|
||||
return $this->_create( $args, $calendar, $args['postKey'] ?? NULL );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Forum query
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 10 May 2017
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL\Queries;
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\TypeRegistry;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calendar query for GraphQL API
|
||||
*/
|
||||
class _calendar
|
||||
{
|
||||
/*
|
||||
* @brief Query description
|
||||
*/
|
||||
public static $description = "Returns a calendar";
|
||||
|
||||
/*
|
||||
* Query arguments
|
||||
*/
|
||||
public function args(): array
|
||||
{
|
||||
return array(
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the query return type
|
||||
*/
|
||||
public function type()
|
||||
{
|
||||
return \IPS\calendar\api\GraphQL\TypeRegistry::calendar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves this query
|
||||
*
|
||||
* @param mixed Value passed into this resolver
|
||||
* @param array Arguments
|
||||
* @param array Context values
|
||||
* @return \IPS\calendar\Calendar
|
||||
*/
|
||||
public function resolve($val, $args, $context, $info)
|
||||
{
|
||||
$calendar = \IPS\calendar\Calendar::load( $args['id'] );
|
||||
|
||||
if( !$calendar->can( 'view', $context['member'] ) )
|
||||
{
|
||||
throw new \OutOfRangeException;
|
||||
}
|
||||
return $calendar;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Forums query
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 10 May 2017
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL\Queries;
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\TypeRegistry;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Forums query for GraphQL API
|
||||
*/
|
||||
class _Calendars
|
||||
{
|
||||
/*
|
||||
* @brief Query description
|
||||
*/
|
||||
public static $description = "Returns a list of calendars";
|
||||
|
||||
/*
|
||||
* Query arguments
|
||||
*/
|
||||
public function args(): array
|
||||
{
|
||||
return array(
|
||||
'id' => TypeRegistry::id()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the query return type
|
||||
*/
|
||||
public function type()
|
||||
{
|
||||
return TypeRegistry::listOf( \IPS\calendar\api\GraphQL\TypeRegistry::calendar() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves this query
|
||||
*
|
||||
* @param mixed Value passed into this resolver
|
||||
* @param array Arguments
|
||||
* @param array Context values
|
||||
* @return array
|
||||
*/
|
||||
public function resolve($val, $args, $context, $info)
|
||||
{
|
||||
\IPS\calendar\Calendar::loadIntoMemory('view', $context['member']);
|
||||
return \IPS\calendar\Calendar::roots();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Topic query
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 10 May 2017
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL\Queries;
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\TypeRegistry;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event query for GraphQL API
|
||||
*/
|
||||
class _Event
|
||||
{
|
||||
/*
|
||||
* @brief Query description
|
||||
*/
|
||||
public static $description = "Returns an event";
|
||||
|
||||
/*
|
||||
* Query arguments
|
||||
*/
|
||||
public function args(): array
|
||||
{
|
||||
return array(
|
||||
'id' => TypeRegistry::nonNull( TypeRegistry::id() )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the query return type
|
||||
*/
|
||||
public function type()
|
||||
{
|
||||
return \IPS\calendar\api\GraphQL\TypeRegistry::event();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves this query
|
||||
*
|
||||
* @param mixed Value passed into this resolver
|
||||
* @param array Arguments
|
||||
* @param array Context values
|
||||
* @return \IPS\calendar\Event
|
||||
*/
|
||||
public function resolve($val, $args, $context, $info)
|
||||
{
|
||||
try
|
||||
{
|
||||
$event = \IPS\calendar\Event::loadAndCheckPerms( $args['id'] );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'NO_EVENT', '1F294/2_graphql', 400 );
|
||||
}
|
||||
|
||||
if( !$event->can('read') )
|
||||
{
|
||||
throw new \IPS\Api\GraphQL\SafeException( 'INVALID_ID', '2F294/9_graphql', 403 );
|
||||
}
|
||||
|
||||
return $event;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Calender Events query
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 26 January 2023
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL\Queries;
|
||||
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\TypeRegistry;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER[ 'SERVER_PROTOCOL' ] ) ? $_SERVER[ 'SERVER_PROTOCOL' ] : 'HTTP/1.0' ).' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calendar Events query for GraphQL API
|
||||
*/
|
||||
class _Events
|
||||
{
|
||||
/*
|
||||
* @brief Query description
|
||||
*/
|
||||
public static $description = "Returns a list of events";
|
||||
|
||||
/*
|
||||
* Query arguments
|
||||
*/
|
||||
public function args(): array
|
||||
{
|
||||
return [
|
||||
'calendar' => TypeRegistry::listOf( TypeRegistry::int() ),
|
||||
'offset' => [
|
||||
'type' => TypeRegistry::int(),
|
||||
'defaultValue' => 0,
|
||||
],
|
||||
'limit' => [
|
||||
'type' => TypeRegistry::int(),
|
||||
'defaultValue' => 25,
|
||||
],
|
||||
'orderBy' => [
|
||||
'type' => TypeRegistry::eNum( [
|
||||
'name' => 'events_order_by',
|
||||
'description' => 'Fields on which events can be sorted',
|
||||
'values' => \IPS\calendar\api\GraphQL\Types\EventType::getOrderByOptions(),
|
||||
] ),
|
||||
'defaultValue' => NULL, // will use default sort option
|
||||
],
|
||||
'orderDir' => [
|
||||
'type' => TypeRegistry::eNum( [
|
||||
'name' => 'events_order_dir',
|
||||
'description' => 'Directions in which items can be sorted',
|
||||
'values' => [ 'ASC', 'DESC' ],
|
||||
] ),
|
||||
'defaultValue' => 'DESC',
|
||||
],
|
||||
'honorPinned' => [
|
||||
'type' => TypeRegistry::boolean(),
|
||||
'defaultValue' => TRUE,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the query return type
|
||||
*/
|
||||
public function type()
|
||||
{
|
||||
return TypeRegistry::listOf( \IPS\calendar\api\GraphQL\TypeRegistry::event() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves this query
|
||||
*
|
||||
* @param mixed Value passed into this resolver
|
||||
* @param array Arguments
|
||||
* @param array Context values
|
||||
* @return \IPS\calendar\Event
|
||||
*/
|
||||
public function resolve( $val, $args, $context, $info )
|
||||
{
|
||||
$where = [];
|
||||
\IPS\calendar\Calendar::loadIntoMemory( 'view', \IPS\Member::loggedIn() );
|
||||
|
||||
$calendarIDs = [];
|
||||
|
||||
/* Are we filtering by calendards? */
|
||||
if( isset( $args[ 'calendars' ] ) && \count( $args[ 'calendars' ] ) )
|
||||
{
|
||||
foreach( $args[ 'calendars' ] as $id )
|
||||
{
|
||||
$calendar = \IPS\calendar\Calendar::loadAndCheckPerms( $id );
|
||||
$calendarIDs[] = $calendar->id;
|
||||
}
|
||||
|
||||
if( \count( $calendarIDs ) )
|
||||
{
|
||||
$where[ 'container' ][] = [ \IPS\Db::i()->in( 'calendar_events.event_calendar_id', array_filter( $calendarIDs ) ) ];
|
||||
}
|
||||
}
|
||||
|
||||
/* Get sorting */
|
||||
|
||||
if( $args[ 'orderBy' ] === NULL )
|
||||
{
|
||||
$orderBy = 'saved';
|
||||
}
|
||||
else if( \in_array( $args[ 'orderBy' ], \IPS\calendar\api\GraphQL\Types\EventType::getOrderByOptions() ) )
|
||||
{
|
||||
$orderBy = $args[ 'orderBy' ];
|
||||
}
|
||||
|
||||
$sortBy = \IPS\calendar\Event::$databaseTable.'.'.\IPS\calendar\Event::$databasePrefix."{$orderBy} {$args['orderDir']}";
|
||||
$offset = max( $args[ 'offset' ], 0 );
|
||||
$limit = min( $args[ 'limit' ], 50 );
|
||||
|
||||
return \IPS\calendar\Event::getItemsWithPermission( $where, $sortBy, [ $offset, $limit ], 'read' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Calendar queries
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 22 Oct 2022
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL;
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\Types;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Blog queries for GraphQL API
|
||||
*/
|
||||
abstract class _Query
|
||||
{
|
||||
/**
|
||||
* Get the supported query types in this app
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function queries()
|
||||
{
|
||||
return [
|
||||
'calendar' => new \IPS\calendar\api\GraphQL\Queries\Calendar(),
|
||||
'calendars' => new \IPS\calendar\api\GraphQL\Queries\Calendars(),
|
||||
'events' => new \IPS\calendar\api\GraphQL\Queries\Events(),
|
||||
'event' => new \IPS\calendar\api\GraphQL\Queries\Event(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Types registry
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 22 Oct 2022
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL;
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\Types;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
class _TypeRegistry
|
||||
{
|
||||
/**
|
||||
* The calendar type instance
|
||||
* @var \IPS\calendar\api\GraphQL\Types\CalendarType
|
||||
*/
|
||||
protected static $calendar;
|
||||
|
||||
/**
|
||||
* The event type instance
|
||||
* @var \IPS\calendar\api\GraphQL\Types\EventType
|
||||
*/
|
||||
protected static $event;
|
||||
|
||||
/**
|
||||
* The event comment instance
|
||||
* @var \IPS\calendar\api\GraphQL\Types\CalendarType
|
||||
*/
|
||||
protected static $comment;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// Defined to suppress static warnings
|
||||
}
|
||||
|
||||
/**
|
||||
* @return CalendarType
|
||||
*/
|
||||
public static function calendar() : \IPS\calendar\api\GraphQL\Types\CalendarType
|
||||
{
|
||||
return self::$calendar ?: (self::$calendar = new \IPS\calendar\api\GraphQL\Types\CalendarType());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EventType
|
||||
*/
|
||||
public static function event() : \IPS\calendar\api\GraphQL\Types\EventType
|
||||
{
|
||||
return self::$event ?: (self::$event = new \IPS\calendar\api\GraphQL\Types\EventType());
|
||||
}
|
||||
|
||||
public static function comment() : \IPS\calendar\api\GraphQL\Types\CommentType
|
||||
{
|
||||
return self::$comment ?: ( self::$comment = new \IPS\calendar\api\GraphQL\Types\CommentType() );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Blog Type
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 22 Oct 2022
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL\Types;
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\TypeRegistry;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* CalendarType for GraphQL API
|
||||
*/
|
||||
class _CalendarType extends \IPS\Node\Api\GraphQL\NodeType
|
||||
{
|
||||
/*
|
||||
* @brief The item classname we use for this type
|
||||
*/
|
||||
protected static $nodeClass = \IPS\calendar\Calendar::class;
|
||||
|
||||
/*
|
||||
* @brief GraphQL type name
|
||||
*/
|
||||
protected static $typeName = 'calendar_Calendar';
|
||||
|
||||
/*
|
||||
* @brief GraphQL type description
|
||||
*/
|
||||
protected static $typeDescription = 'A calendar';
|
||||
|
||||
/*
|
||||
* @brief Follow data passed in to FollowType resolver
|
||||
*/
|
||||
protected static $followData = array('app' => 'calendar', 'area' => 'calendar');
|
||||
|
||||
|
||||
/**
|
||||
* Get the item type that goes with this node type
|
||||
*
|
||||
* @return ObjectType
|
||||
*/
|
||||
public static function getItemType()
|
||||
{
|
||||
return \IPS\calendar\api\GraphQL\TypeRegistry::event();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Post Type
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 10 May 2017
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL\Types;
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\TypeRegistry;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* PostType for GraphQL API
|
||||
*/
|
||||
class _CommentType extends \IPS\Content\Api\GraphQL\CommentType
|
||||
{
|
||||
/*
|
||||
* @brief The item classname we use for this type
|
||||
*/
|
||||
protected static $commentClass = \IPS\calendar\Event\Comment::class;
|
||||
|
||||
/*
|
||||
* @brief GraphQL type name
|
||||
*/
|
||||
protected static $typeName = 'calendar_Comment';
|
||||
|
||||
/*
|
||||
* @brief GraphQL type description
|
||||
*/
|
||||
protected static $typeDescription = 'A calendar event comment';
|
||||
|
||||
/**
|
||||
* Get the item type that goes with this item type
|
||||
*
|
||||
* @return ObjectType
|
||||
*/
|
||||
public static function getItemType()
|
||||
{
|
||||
return \IPS\calendar\api\GraphQL\TypeRegistry::comment();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fields available in this type
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fields()
|
||||
{
|
||||
$defaultFields = parent::fields();
|
||||
$postFields = array(
|
||||
'event' => [
|
||||
'type' => \IPS\calendar\api\GraphQL\TypeRegistry::event(),
|
||||
'resolve' => function ($comment) {
|
||||
return $comment->item();
|
||||
}
|
||||
],
|
||||
);
|
||||
|
||||
// Remove duplicated fields
|
||||
unset( $defaultFields['item'] );
|
||||
|
||||
return array_merge( $defaultFields, $postFields );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief GraphQL: Topic Type
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @since 10 May 2017
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar\api\GraphQL\Types;
|
||||
|
||||
use GraphQL\Type\Definition\ObjectType;
|
||||
use IPS\Api\GraphQL\_TypeRegistry;
|
||||
use IPS\Api\GraphQL\TypeRegistry;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER[ 'SERVER_PROTOCOL' ] ) ? $_SERVER[ 'SERVER_PROTOCOL' ] : 'HTTP/1.0' ).' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Entry for GraphQL API
|
||||
*/
|
||||
class _EventType extends \IPS\Content\Api\GraphQL\ItemType
|
||||
{
|
||||
/*
|
||||
* @brief The item classname we use for this type
|
||||
*/
|
||||
protected static $itemClass = \IPS\calendar\Event::class;
|
||||
|
||||
/*
|
||||
* @brief GraphQL type name
|
||||
*/
|
||||
protected static $typeName = 'calendar_Event';
|
||||
|
||||
/*
|
||||
* @brief GraphQL type description
|
||||
*/
|
||||
protected static $typeDescription = 'A calendar event';
|
||||
|
||||
/*
|
||||
* @brief Follow data passed in to FollowType resolver
|
||||
*/
|
||||
protected static $followData = array( 'app' => 'calendar', 'area' => 'event' );
|
||||
|
||||
/**
|
||||
* Get the comment type that goes with this item type
|
||||
*
|
||||
* @return ObjectType
|
||||
*/
|
||||
protected static function getCommentType()
|
||||
{
|
||||
return \IPS\calendar\api\GraphQL\TypeRegistry::comment();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fields available in this type
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fields()
|
||||
{
|
||||
// Extend our fields with image-specific stuff
|
||||
$defaultFields = parent::fields();
|
||||
$imageFields = array(
|
||||
'start' => [
|
||||
'type' => TypeRegistry::string(),
|
||||
'resolve' => function( $event ){
|
||||
return $event->start_date;
|
||||
}
|
||||
]
|
||||
|
||||
);
|
||||
|
||||
// Remove duplicated fields
|
||||
unset( $defaultFields[ 'poll' ], $defaultFields[ 'isLocked' ], $defaultFields[ 'isPinned' ], $defaultFields[ 'isFeatured' ] );
|
||||
|
||||
return array_merge( $defaultFields, $imageFields );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the sort options available for this type
|
||||
*
|
||||
* @return array|string[]
|
||||
*/
|
||||
public static function getOrderByOptions(): array
|
||||
{
|
||||
return array_merge( parent::getOrderByOptions(), array(
|
||||
'saved','last_comment','start_date'
|
||||
) );
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ class _events extends \IPS\Content\Api\ItemController
|
||||
* Get list of events
|
||||
*
|
||||
* @note For requests using an OAuth Access Token for a particular member, only events the authorized user can view will be included
|
||||
* @apiparam string ids Comma-delimited list of event IDs
|
||||
* @apiparam string calendars Comma-delimited list of calendar IDs
|
||||
* @apiparam string authors Comma-delimited list of member IDs - if provided, only events started by those members are returned
|
||||
* @apiparam int locked If 1, only events which are locked are returned, if 0 only unlocked
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="calendar">
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="107643" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -112,7 +112,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="107643" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -231,7 +231,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.carousel.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.carousel.js" javascript_type="controller" javascript_version="107643" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -291,7 +291,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="107643" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -409,7 +409,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="107643" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -776,7 +776,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="107643" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -808,8 +808,6 @@ var PER_PAGE = 16;
|
||||
*/
|
||||
setup: function () {
|
||||
|
||||
var self = this;
|
||||
|
||||
// Other setup
|
||||
this._gotCoords = false;
|
||||
this._offset = 0;
|
||||
@@ -837,6 +835,34 @@ var PER_PAGE = 16;
|
||||
|
||||
|
||||
// Get map ready to show
|
||||
if( ips.getSetting( 'mapProvider' ) === 'google' ){
|
||||
this.setupGoogle();
|
||||
} else {
|
||||
this.setupMapbox();
|
||||
}
|
||||
},
|
||||
|
||||
setupGoogle: function(){
|
||||
var self = this;
|
||||
self._mapReady = true;
|
||||
Debug.log( self._resultsContainer.find('[data-eventid]') );
|
||||
Debug.log( self._mapContainer.attr('data-markers') );
|
||||
|
||||
if( self._resultsContainer.find('[data-eventid]').length && self._mapContainer.attr('data-markers') ){
|
||||
Debug.log('here');
|
||||
try {
|
||||
var markers = JSON.parse( self._mapContainer.attr('data-markers') );
|
||||
Debug.log( markers );
|
||||
self._updateGoogleMap( markers );
|
||||
} catch (err) {
|
||||
Debug.log("Invalid marker JSON");
|
||||
Debug.log(err);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setupMapbox: function(){
|
||||
var self = this;
|
||||
$('head').append( "<link rel='stylesheet' type='text/css' media='all' href='https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.css'><link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-markercluster/v1.0.0/MarkerCluster.css' rel='stylesheet' /><link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-markercluster/v1.0.0/MarkerCluster.Default.css' rel='stylesheet' /><link rel='stylesheet' type='text/css' media='all' href='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css' />" );
|
||||
|
||||
ips.loader.get( [ 'https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.js' ] ).then( function () {
|
||||
@@ -844,17 +870,12 @@ var PER_PAGE = 16;
|
||||
'https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js' ] ).then( function () {
|
||||
|
||||
self._mapReady = true;
|
||||
|
||||
Debug.log( self._resultsContainer.find('[data-eventid]') );
|
||||
Debug.log( self._mapContainer.attr('data-markers') );
|
||||
|
||||
|
||||
if( self._resultsContainer.find('[data-eventid]').length && self._mapContainer.attr('data-markers') ){
|
||||
Debug.log('here');
|
||||
|
||||
try {
|
||||
var markers = JSON.parse( self._mapContainer.attr('data-markers') );
|
||||
Debug.log( markers );
|
||||
self._updateMap( markers );
|
||||
self._updateMapboxMap( markers );
|
||||
} catch (err) {
|
||||
Debug.log("Invalid marker JSON");
|
||||
Debug.log(err);
|
||||
@@ -862,7 +883,6 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
getInitialLocation: function () {
|
||||
@@ -1076,7 +1096,57 @@ var PER_PAGE = 16;
|
||||
});
|
||||
},
|
||||
|
||||
_updateMap: function (markers) {
|
||||
_updateMap: function ( markers ){
|
||||
if( ips.getSetting( 'mapProvider' ) === 'google' ){
|
||||
this._updateGoogleMap( markers );
|
||||
} else {
|
||||
this._updateMapboxMap( markers );
|
||||
}
|
||||
},
|
||||
|
||||
_updateGoogleMap: function (markers){
|
||||
|
||||
if( !this._map ){
|
||||
this._map = new window.google.maps.Map( document.querySelector( '[data-role="searchResultsMap"]' ) );
|
||||
this._mapMarkers = [];
|
||||
}
|
||||
|
||||
this._mapContainer.removeClass('cEvents__searchMap--loading');
|
||||
|
||||
/* Clear existing markers before we rebuild */
|
||||
if( this._mapMarkers.length ){
|
||||
for ( let marker of Object.values(this._mapMarkers) ) {
|
||||
marker.setMap(null);
|
||||
}
|
||||
this._mapMarkers = [];
|
||||
}
|
||||
|
||||
var bounds = new google.maps.LatLngBounds();
|
||||
for ( let marker of Object.values(markers) ) {
|
||||
let mapMarker = new window.google.maps.Marker({
|
||||
position: {lat: marker.lat, lng: marker.long},
|
||||
map: this._map,
|
||||
title: marker.title
|
||||
});
|
||||
this._mapMarkers.push( mapMarker );
|
||||
|
||||
var coords = new google.maps.LatLng( marker.lat, marker.long );
|
||||
if( !( bounds.contains( coords ) ) ){
|
||||
bounds.extend( coords );
|
||||
}
|
||||
}
|
||||
|
||||
/* If we have only one marker in here, fitting to the bounds zooms in way too much */
|
||||
if( this._mapMarkers.length === 1 ){
|
||||
this._map.setZoom(15);
|
||||
this._map.setCenter(bounds.getCenter());
|
||||
} else {
|
||||
this._map.fitBounds( bounds );
|
||||
}
|
||||
this._mapContainer.show();
|
||||
},
|
||||
|
||||
_updateMapboxMap: function (markers) {
|
||||
if( !this._map ){
|
||||
L.mapbox.accessToken = ips.getSetting('mapApiKey');
|
||||
this._map = L.mapbox
|
||||
@@ -1270,8 +1340,9 @@ var PER_PAGE = 16;
|
||||
this._page.find('[data-role="searchResultsWrapper"]').hide();
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="107601" javascript_position="1000150"><![CDATA[/**
|
||||
}(jQuery, _));
|
||||
]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="107643" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1844,7 +1915,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="107601" javascript_position="1000200"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="107643" javascript_position="1000200"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1956,7 +2027,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="107601" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="107643" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2039,7 +2110,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="107601" javascript_position="1000250">/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="107643" javascript_position="1000250">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2149,7 +2220,7 @@ var PER_PAGE = 16;
|
||||
});
|
||||
}(jQuery, _));
|
||||
</file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="107601" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="107643" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*/
|
||||
@@ -2158,7 +2229,7 @@ var PER_PAGE = 16;
|
||||
ips.templates.set('calendar.reminder.loading', " \
|
||||
<div class='ipsLoading ipsLoading_tiny'></div>\
|
||||
");]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="107601" javascript_position="1000300"><![CDATA[ips.templates.set("eventLoading", "\
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="107643" javascript_position="1000300"><![CDATA[ips.templates.set("eventLoading", "\
|
||||
<li class='ipsBox ipsBox--child event event--withImage event--loading'>\
|
||||
<div class='cEvents__skeleton cEvents__skeleton--eventImage'></div>\
|
||||
<div class='cEvents__details'>\
|
||||
@@ -2184,7 +2255,6 @@ controllers</order>
|
||||
<order app="global" path="/dev/js//library/">underscore
|
||||
jquery
|
||||
mustache
|
||||
jstz
|
||||
IntersectionObserver
|
||||
Debug.js
|
||||
app.js</order>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="calendar" version="107601">
|
||||
<app key="calendar" version="107643">
|
||||
<word key="__app_calendar" js="0">Events</word>
|
||||
<word key="frontnavigation_calendar" js="0">Events</word>
|
||||
<word key="__indefart_calendar_event_comment" js="0">a comment on an event</word>
|
||||
@@ -480,6 +480,7 @@
|
||||
<word key="AchievementAction__Rsvp_log" js="0">RSVP'd to %s</word>
|
||||
<word key="AchievementAction__Rsvp_title" js="0">Event RSVP</word>
|
||||
<word key="menu__calendar_stats" js="0">Calendar</word>
|
||||
<word key="emailstats__notification_event_reminder" js="0">Event Reminders</word>
|
||||
<word key="menu__calendar_stats_rsvp" js="0">RSVP</word>
|
||||
<word key="calendar_stats_rsvp_title" js="0">RSVPs over time</word>
|
||||
<word key="calendar_stats_rsvp_response_0" js="0">Not Going</word>
|
||||
|
||||
@@ -624,7 +624,7 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 4,
|
||||
"length": 1,
|
||||
"name": "event_rsvp",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
@@ -636,7 +636,7 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 4,
|
||||
"length": 1,
|
||||
"name": "event_approved",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
@@ -792,7 +792,7 @@
|
||||
"comment": "Whether the event is locked (for new comments\/reviews) or not",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 3,
|
||||
"length": 1,
|
||||
"name": "event_locked",
|
||||
"type": "TINYINT",
|
||||
"unsigned": true,
|
||||
@@ -804,7 +804,7 @@
|
||||
"comment": "Whether the event is featured or not",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 3,
|
||||
"length": 1,
|
||||
"name": "event_featured",
|
||||
"type": "TINYINT",
|
||||
"unsigned": true,
|
||||
@@ -876,7 +876,7 @@
|
||||
"comment": "Maximum number of attendees allowed for the event",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 11,
|
||||
"length": 10,
|
||||
"name": "event_rsvp_limit",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
@@ -1020,7 +1020,7 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 11,
|
||||
"length": 10,
|
||||
"name": "event_edit_time",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
@@ -1044,7 +1044,7 @@
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 4,
|
||||
"length": 1,
|
||||
"name": "event_append_edit",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
@@ -1062,6 +1062,42 @@
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
},
|
||||
"event_author_name": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 255,
|
||||
"name": "event_author_name",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
},
|
||||
"event_is_anon": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "event_is_anon",
|
||||
"type": "INT",
|
||||
"unsigned": true,
|
||||
"values": []
|
||||
},
|
||||
"event_external_url": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 255,
|
||||
"name": "event_external_url",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
},
|
||||
"event_latitude": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
@@ -1086,33 +1122,45 @@
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
},
|
||||
"event_author_name": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 255,
|
||||
"name": "event_author_name",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
},
|
||||
"event_is_anon": {
|
||||
"event_online": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "event_is_anon",
|
||||
"type": "INT",
|
||||
"length": 3,
|
||||
"name": "event_online",
|
||||
"type": "TINYINT",
|
||||
"unsigned": true,
|
||||
"values": []
|
||||
},
|
||||
"event_online": {
|
||||
"name": "event_online",
|
||||
"type": "TINYINT",
|
||||
"event_url": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 250,
|
||||
"name": "event_url",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
},
|
||||
"event_online_type": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 250,
|
||||
"name": "event_online_type",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
},
|
||||
"event_livetopic_id": {
|
||||
"name": "event_livetopic_id",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
@@ -1121,30 +1169,6 @@
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
},
|
||||
"event_url": {
|
||||
"name": "event_url",
|
||||
"type": "VARCHAR",
|
||||
"length": 250,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
},
|
||||
"event_online_type": {
|
||||
"name": "event_online_type",
|
||||
"type": "VARCHAR",
|
||||
"length": 250,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
</ul>
|
||||
</form>
|
||||
</div>]]></template>
|
||||
<template template_group="events" template_name="event" template_data="$event, $size='normal'" template_location="front" template_app="calendar"><![CDATA[
|
||||
<template template_group="events" template_name="event" template_data="$event, $size='normal', $date=NULL" template_location="front" template_app="calendar"><![CDATA[{{$date = $date ?: \IPS\calendar\Date::getDate();}}
|
||||
{{$sameDay = FALSE;}}
|
||||
{{if $event->_end_date}}
|
||||
{{$sameDay = !( ($event->_start_date->mday != $event->_end_date->mday) or ($event->_start_date->mon != $event->_end_date->mon) or ($event->_start_date->year != $event->_end_date->year) );}}
|
||||
@@ -364,8 +364,8 @@
|
||||
</a>
|
||||
<div class='cEvent__dateAside'>
|
||||
{{if $event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' )}}
|
||||
<span class='cEvent__dateAside__month'>{lang="_date_month_short" pluralize="$event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' )->format( 'n' )"}</span>
|
||||
<span class='cEvent__dateAside__day'>{$event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' )->format( 'd' )}</span>
|
||||
<span class='cEvent__dateAside__month'>{lang="_date_month_short" pluralize="$event->nextOccurrence( $date, 'startDate' )->format( 'n' )"}</span>
|
||||
<span class='cEvent__dateAside__day'>{$event->nextOccurrence( $date, 'startDate' )->format( 'd' )}</span>
|
||||
{{else}}
|
||||
<span class='cEvent__dateAside__month'>{lang="_date_month_short" pluralize="$event->lastOccurrence( 'startDate' )->format( 'n' )"}</span>
|
||||
<span class='cEvent__dateAside__day'>{$event->lastOccurrence( 'startDate' )->format('d')}</span>
|
||||
@@ -431,9 +431,9 @@
|
||||
" data-ipsTooltip>{$event->_happening}</span>
|
||||
{{else}}
|
||||
<time datetime='{expression="$event->_start_date->format( 'Y-m-d' )"}'>
|
||||
{{if $event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' )}}
|
||||
<span data-controller="core.global.core.datetime" data-time="{$event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' )->format('c')}" data-format="{expression="\IPS\calendar\Date::calendarDateFormat()"}{{if !$event->all_day}}, {{endif}}">
|
||||
{$event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' )->calendarDate()}{{if !$event->all_day}}, {{endif}}
|
||||
{{if $event->nextOccurrence( $date, 'startDate' )}}
|
||||
<span data-controller="core.global.core.datetime" data-time="{$event->nextOccurrence( $date, 'startDate' )->format('c')}" data-format="{expression="\IPS\calendar\Date::calendarDateFormat()"}{{if !$event->all_day}}, {{endif}}">
|
||||
{$event->nextOccurrence( $date, 'startDate' )->calendarDate()}{{if !$event->all_day}}, {{endif}}
|
||||
</span>
|
||||
{{if !$event->all_day}}
|
||||
<span data-controller="core.global.core.datetime" data-time="{$event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' )->format('c')}" data-format="{expression="\IPS\calendar\Date::localeTimeFormat( FALSE )"}">
|
||||
@@ -537,7 +537,7 @@
|
||||
|
||||
<div data-item="{$idx + 1}" class='cFeaturedEvents__event cFeaturedEvents__event--{$idx + 1}'>
|
||||
{{if $image}}
|
||||
<img class='cFeaturedEvents__image' src='{backgroundimage="$image->url"}' alt=''>
|
||||
<img class='cFeaturedEvents__image' src='{$image->url}' alt=''>
|
||||
{{endif}}
|
||||
|
||||
<div class='cFeaturedEvents__event-details'>
|
||||
@@ -714,9 +714,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{if $mapMarkers and $mapMarkers !== '[]'}}
|
||||
<div class='cEvents__searchMap cEvents__searchMap--loading event ipsAreaBackground ipsPad ipsSpacer_bottom ipsSpacer_double' data-role='searchResultsMap' {{if $mapMarkers}}data-markers="{$mapMarkers}"{{endif}}></div>
|
||||
{{endif}}
|
||||
<div class='cEvents__searchMap cEvents__searchMap--loading event ipsAreaBackground ipsPad ipsSpacer_bottom ipsSpacer_double' data-role='searchResultsMap' {{if $mapMarkers}}data-markers="{$mapMarkers}"{{endif}}></div>
|
||||
<ul class='eventList {{if !\count( $results )}}ipsHide{{endif}}' data-role='searchResults'>
|
||||
{template="searchResults" app="calendar" group="events" params="$results"}
|
||||
</ul>
|
||||
@@ -1327,8 +1325,7 @@
|
||||
<p class='ipsType_light'>{$reason}</p>
|
||||
</div>
|
||||
{{endif}}]]></template>
|
||||
<template template_group="overview" template_name="byMonth" template_data="$calendars, $date, $featured, $events, $thisCalendar, $months=array()" template_location="front" template_app="calendar"><![CDATA[
|
||||
<section class='ipsBox' data-controller="calendar.front.overview.eventList">
|
||||
<template template_group="overview" template_name="byMonth" template_data="$calendars, $date, $featured, $events, $thisCalendar, $months=array()" template_location="front" template_app="calendar"><![CDATA[<section class='ipsBox' data-controller="calendar.front.overview.eventList">
|
||||
<h2 class='ipsType_sectionTitle'>{lang="events_browse_by_month"}</h2>
|
||||
<div class='ipsPadding ipsAreaBackground_light ipsRadius:bl ipsRadius:br'>
|
||||
<div class='cEvents__monthNav' data-role='monthNav'>
|
||||
@@ -1344,7 +1341,7 @@
|
||||
{{if \count($events) }}
|
||||
<ul class='eventList' data-role='eventList'>
|
||||
{{foreach $events as $event}}
|
||||
{template="event" app="calendar" group="events" params="$event"}
|
||||
{template="event" app="calendar" group="events" params="$event, 'normal', \IPS\calendar\Date::getDate( $date->firstDayOfMonth('year'), $date->firstDayOfMonth('mon'), $date->firstDayOfMonth('mday') )"}
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
<div class='ipsPadding_top ipsType_center'>
|
||||
@@ -1366,12 +1363,36 @@
|
||||
|
||||
<ul class="ipsToolList ipsToolList_horizontal ipsClearfix">
|
||||
<li class="ipsToolList_primaryAction">
|
||||
{{if !\IPS\Settings::i()->club_nodes_in_apps and $theOnlyNode = \IPS\calendar\Calendar::theOnlyNode() }}
|
||||
<a class="ipsButton ipsButton_medium ipsButton_important" href="{url="app=calendar&module=calendar&controller=submit&do=submit&id={$theOnlyNode->_id}" seoTemplate="calendar_submit"}">{lang="create_event"}</a>
|
||||
{{elseif ( $thisCalendar AND $thisCalendar->can('add') )}}
|
||||
<a class="ipsButton ipsButton_medium ipsButton_important" href='{url="app=calendar&module=calendar&controller=submit&do=submit&id={$thisCalendar->_id}" seoTemplate="calendar_submit"}' data-ipsTooltip title='{lang="add_event"}'>{lang="create_event"}</a>
|
||||
{{elseif \IPS\calendar\Calendar::canOnAny('add')}}
|
||||
<a class="ipsButton ipsButton_medium ipsButton_important" href="{url="app=calendar&module=calendar&controller=submit" seoTemplate="calendar_submit"}" data-ipsdialog="" data-ipsdialog-size="narrow" data-ipsdialog-title="{lang="select_calendar"}">{lang="create_event"}</a>
|
||||
{{if \IPS\Application::appIsEnabled('cloud') and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'cloud', 'livetopics' ) ) and \IPS\cloud\LiveTopic::canCreate( \IPS\Member::loggedIn() )}}
|
||||
<a href="#elEventCreate_menu" id="elEventCreate" class="ipsButton ipsButton_medium ipsButton_important" data-ipsMenu>{lang="livetopic_create_event"} <i class="fa fa-caret-down"></i></a>
|
||||
<ul id="elEventCreate_menu" class="ipsMenu ipsMenu_normal ipsHide">
|
||||
<li class="ipsMenu_item" data-menuItem="livetopic">
|
||||
{{if !\IPS\Settings::i()->club_nodes_in_apps and $theOnlyNode = \IPS\calendar\Calendar::theOnlyNode() }}
|
||||
<a class="ipsMenu_link" href="{url="app=calendar&module=calendar&controller=submit&do=livetopic&id={$theOnlyNode->_id}" seoTemplate="calendar_submit"}">{lang="event_create_livetopic"}</a>
|
||||
{{elseif ( $thisCalendar AND $thisCalendar->can('add') )}}
|
||||
<a class="ipsMenu_link" href='{url="app=calendar&module=calendar&controller=submit&do=livetopic&id={$thisCalendar->_id}" seoTemplate="calendar_submit"}' data-ipsTooltip title='{lang="add_event"}'>{lang="event_create_livetopic"}</a>
|
||||
{{elseif \IPS\calendar\Calendar::canOnAny('add')}}
|
||||
<a class="ipsMenu_link" href="{url="app=calendar&module=calendar&controller=submit&do=livetopic" seoTemplate="calendar_submit"}">{lang="event_create_livetopic"}</a>
|
||||
{{endif}}
|
||||
</li>
|
||||
<li class="ipsMenu_item" data-menuItem="event">
|
||||
{{if !\IPS\Settings::i()->club_nodes_in_apps and $theOnlyNode = \IPS\calendar\Calendar::theOnlyNode() }}
|
||||
<a class="ipsMenu_link" href="{url="app=calendar&module=calendar&controller=submit&do=submit&id={$theOnlyNode->_id}" seoTemplate="calendar_submit"}">{lang="event_create_normal"}</a>
|
||||
{{elseif ( $thisCalendar AND $thisCalendar->can('add') )}}
|
||||
<a class="ipsMenu_link" href='{url="app=calendar&module=calendar&controller=submit&do=submit&id={$thisCalendar->_id}" seoTemplate="calendar_submit"}' data-ipsTooltip title='{lang="add_event"}'>{lang="event_create_normal"}</a>
|
||||
{{elseif \IPS\calendar\Calendar::canOnAny('add')}}
|
||||
<a class="ipsMenu_link" href="{url="app=calendar&module=calendar&controller=submit" seoTemplate="calendar_submit"}" data-ipsdialog="" data-ipsdialog-size="narrow" data-ipsdialog-title="{lang="select_calendar"}">{lang="event_create_normal"}</a>
|
||||
{{endif}}
|
||||
</li>
|
||||
</ul>
|
||||
{{else}}
|
||||
{{if !\IPS\Settings::i()->club_nodes_in_apps and $theOnlyNode = \IPS\calendar\Calendar::theOnlyNode() }}
|
||||
<a class="ipsButton ipsButton_medium ipsButton_important" href="{url="app=calendar&module=calendar&controller=submit&do=submit&id={$theOnlyNode->_id}" seoTemplate="calendar_submit"}">{lang="create_event"}</a>
|
||||
{{elseif ( $thisCalendar AND $thisCalendar->can('add') )}}
|
||||
<a class="ipsButton ipsButton_medium ipsButton_important" href='{url="app=calendar&module=calendar&controller=submit&do=submit&id={$thisCalendar->_id}" seoTemplate="calendar_submit"}' data-ipsTooltip title='{lang="add_event"}'>{lang="create_event"}</a>
|
||||
{{elseif \IPS\calendar\Calendar::canOnAny('add')}}
|
||||
<a class="ipsButton ipsButton_medium ipsButton_important" href="{url="app=calendar&module=calendar&controller=submit" seoTemplate="calendar_submit"}" data-ipsdialog="" data-ipsdialog-size="narrow" data-ipsdialog-title="{lang="select_calendar"}">{lang="create_event"}</a>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</li>
|
||||
<li>
|
||||
@@ -1723,6 +1744,10 @@
|
||||
|
||||
{template="pageHeader" group="global" app="core" params="$pageHeader"}
|
||||
|
||||
{{if isset( \IPS\Request::i()->do ) and \IPS\Request::i()->do === 'livetopic'}}
|
||||
<div class="ipsMargin_top ipsMargin_bottom">{lang="ai_service_livetopics_desc"}</div>
|
||||
{{endif}}
|
||||
|
||||
{$output|raw}]]></template>
|
||||
<template template_group="venue" template_name="upcomingStream" template_data="$date, $events, $venue" template_location="front" template_app="calendar"><![CDATA[
|
||||
<div class='ipsPager cCalendarNav ipsSpacer_bottom lg:ipsPos_sticky'>
|
||||
@@ -2168,6 +2193,11 @@
|
||||
</div>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $livetopic = $event->_livetopic_id}}
|
||||
<div class='ipsBox ipsResponsive_pull ipsMargin_bottom ipsPadding'>
|
||||
<a href='{$livetopic->url()}' target='_blank' class='ipsButton ipsButton_important ipsButton_fullWidth ipsMargin_bottom:half'>{lang="open_event"} <i class="fa fa-external-link" aria-hidden="true" style='margin-inline:.4em'></i></a>
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
{{if $event->rsvp }}
|
||||
<div class='ipsBox ipsResponsive_pull'>
|
||||
@@ -2483,7 +2513,7 @@
|
||||
{{endif}}
|
||||
</div>]]></template>
|
||||
<template template_group="view" template_name="rsvpControls" template_data="$event, $attendees" template_location="front" template_app="calendar"><![CDATA[<!-- Don't use IDs here, this template is called twice in view -->
|
||||
{{if \IPS\Member::loggedIn()->member_id AND ( isset( $attendees[0][ \IPS\Member::loggedIn()->member_id ] ) OR isset( $attendees[1][ \IPS\Member::loggedIn()->member_id ] ) OR isset( $attendees[2][ \IPS\Member::loggedIn()->member_id ] ) )}}
|
||||
{{if \IPS\Member::loggedIn()->member_id AND ( isset( $attendees[0][ \IPS\Member::loggedIn()->member_id ] ) OR isset( $attendees[1][ \IPS\Member::loggedIn()->member_id ] ) OR ( isset( $attendees[2][ \IPS\Member::loggedIn()->member_id ] ) ) AND \count( $attendees[1] ) < $event->rsvp_limit )}}
|
||||
<div class='{{if isset( $attendees[1][ \IPS\Member::loggedIn()->member_id ] )}}ipsAreaBackground_positive{{elseif isset( $attendees[0][ \IPS\Member::loggedIn()->member_id ] )}}ipsAreaBackground_negative{{else}}ipsAreaBackground_reset{{endif}} ipsPadding'>
|
||||
<p class='ipsType_large ipsType_center ipsType_reset'>
|
||||
<strong>
|
||||
@@ -2592,7 +2622,7 @@
|
||||
|
||||
{template="contentItemMessages" group="global" app="core" params="$event->getMessages(), $event"}
|
||||
<div id="sidebarWrapper">
|
||||
{{if $event->rsvp || $address || $event->map( 270, 270 ) || $event->online }}
|
||||
{{if $event->rsvp || $address || $event->map( 270, 270 ) || $event->online || $event->_livetopic_id }}
|
||||
<div class='ipsColumns ipsColumns_collapsePhone'>
|
||||
<div class='ipsColumn ipsColumn_fluid'>
|
||||
{{endif}}
|
||||
@@ -2608,7 +2638,7 @@
|
||||
{{endif}}
|
||||
</div>
|
||||
<div class='ipsFlex-flex:01 ipsResponsive_hidePhone'>
|
||||
<div class='ipsFlex ipsFlex-ai:center ipsFlex-fw:wrap ipsGap:2'>
|
||||
<div class='ipsShareLinks'>
|
||||
{{if \count( $event->shareLinks() )}}
|
||||
{template="shareButton" app="core" group="sharelinks" params="$event"}
|
||||
{{endif}}
|
||||
@@ -2715,7 +2745,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{if $event->rsvp || $address || $event->map( 270, 270 ) || ( $event->online and $event->url and !$event->hasPassed() ) }}
|
||||
{{if $event->rsvp || $address || $event->map( 270, 270 ) || ( $event->online and $event->url and !$event->hasPassed() ) || $event->_livetopic_id}}
|
||||
</div>
|
||||
<aside class='ipsColumn ipsColumn_veryWide'>
|
||||
<div>
|
||||
@@ -2728,23 +2758,15 @@
|
||||
</section>
|
||||
|
||||
<div class='ipsBox ipsPadding ipsResponsive_pull ipsResponsive_showPhone ipsMargin_top'>
|
||||
<div class='ipsGap_row:3'>
|
||||
<div class='ipsShareLinks'>
|
||||
{{if \count( $event->shareLinks() )}}
|
||||
<div>
|
||||
{template="shareButton" app="core" group="sharelinks" params="$event, 'verySmall', 'light'"}
|
||||
</div>
|
||||
{template="shareButton" app="core" group="sharelinks" params="$event, 'verySmall', 'light'"}
|
||||
{{endif}}
|
||||
{{if $event->canRemind()}}
|
||||
<div>
|
||||
{template="reminder" app="calendar" group="view" params="$event, $reminder, 'ipsButton_fullWidth'"}
|
||||
</div>
|
||||
{template="reminder" app="calendar" group="view" params="$event, $reminder, 'ipsButton_fullWidth'"}
|
||||
{{endif}}
|
||||
<div>
|
||||
{template="follow" app="core" group="global" params="'calendar', 'event', $event->id, $event->followersCount()"}
|
||||
</div>
|
||||
<div>
|
||||
{template="promote" app="core" group="global" params="$event"}
|
||||
</div>
|
||||
{template="follow" app="core" group="global" params="'calendar', 'event', $event->id, $event->followersCount()"}
|
||||
{template="promote" app="core" group="global" params="$event"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2766,27 +2788,25 @@
|
||||
<template template_group="widgets" template_name="recentReviews" template_data="$reviews, $orientation='vertical'" template_location="front" template_app="calendar"><![CDATA[<h3 class='ipsType_reset ipsWidget_title'>{lang="block_recentReviews"}</h3>
|
||||
<div class='ipsWidget_inner'>
|
||||
{{if $orientation == 'vertical'}}
|
||||
<div class='ipsPad_half'>
|
||||
{{if !empty( $reviews ) }}
|
||||
<ul class='ipsDataList ipsDataList_reducedSpacing'>
|
||||
{{foreach $reviews as $review}}
|
||||
<li class='ipsDataItem'>
|
||||
<div class='ipsDataItem_icon'>
|
||||
{template="userPhoto" app="core" group="global" params="$review->author(), 'tiny'"}
|
||||
</div>
|
||||
<div class='ipsDataItem_main ipsType_break ipsContained'>
|
||||
<a href="{$review->item()->url( "getPrefComment" )}" title='{lang="view_this_event" sprintf="$review->item()->title"}' class='ipsTruncate ipsTruncate_line'>{$review->item()->title}</a><br>
|
||||
<span class='ipsType_light ipsType_medium'>{lang="byline_nodate" htmlsprintf="$review->author()->link()"}</span><br>
|
||||
{template="rating" group="global" location="front" app="core" params="'small', $review->rating, \IPS\Settings::i()->reviews_rating_out_of"}
|
||||
<span class='ipsType_small ipsType_reset'><time datetime="{$review->mapped('date')}">{datetime="$review->mapped('date')" norelative="true"}</time></span>
|
||||
</div>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<div class='ipsType_light ipsPad_half ipsType_center'>{lang="no_recent_reviews"}</div>
|
||||
{{endif}}
|
||||
</div>
|
||||
{{if !empty( $reviews ) }}
|
||||
<ul class='ipsDataList ipsDataList_reducedSpacing'>
|
||||
{{foreach $reviews as $review}}
|
||||
<li class='ipsDataItem'>
|
||||
<div class='ipsDataItem_icon'>
|
||||
{template="userPhoto" app="core" group="global" params="$review->author(), 'tiny'"}
|
||||
</div>
|
||||
<div class='ipsDataItem_main ipsType_break ipsContained'>
|
||||
<a href="{$review->item()->url( "getPrefComment" )}" title='{lang="view_this_event" sprintf="$review->item()->title"}' class='ipsTruncate ipsTruncate_line'>{$review->item()->title}</a><br>
|
||||
<span class='ipsType_light ipsType_medium'>{lang="byline_nodate" htmlsprintf="$review->author()->link()"}</span><br>
|
||||
{template="rating" group="global" location="front" app="core" params="'small', $review->rating, \IPS\Settings::i()->reviews_rating_out_of"}
|
||||
<span class='ipsType_small ipsType_reset'><time datetime="{$review->mapped('date')}">{datetime="$review->mapped('date')" norelative="true"}</time></span>
|
||||
</div>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<div class='ipsType_light ipsPadding:half ipsType_center'>{lang="no_recent_reviews"}</div>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{{if !empty( $reviews ) }}
|
||||
<ul class='ipsDataList ipsDataList_reducedSpacing'>
|
||||
@@ -2813,10 +2833,6 @@
|
||||
<template template_group="widgets" template_name="upcomingEvents" template_data="$events, $today, $orientation='vertical'" template_location="front" template_app="calendar"><![CDATA[<h3 class='ipsType_reset ipsWidget_title'>{lang="block_upcomingEvents"}</h3>
|
||||
<div class='ipsWidget_inner'>
|
||||
|
||||
{{if $orientation == 'vertical'}}
|
||||
<div class='ipsPad_half'>
|
||||
{{endif}}
|
||||
|
||||
{{if !empty( $events ) }}
|
||||
<ul class='ipsDataList ipsDataList_reducedSpacing'>
|
||||
|
||||
@@ -2889,10 +2905,6 @@
|
||||
<div class='ipsType_light ipsPad_half ipsType_center'>{lang="no_upcoming_events"}</div>
|
||||
{{endif}}
|
||||
|
||||
{{if $orientation == 'vertical'}}
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
</div>]]></template>
|
||||
<css css_location="front" css_app="calendar" css_attributes="" css_path="." css_name="calendar_responsive.css"><![CDATA[/* BOTH */
|
||||
@media screen and (max-width: 979px) {
|
||||
|
||||
@@ -507,5 +507,19 @@
|
||||
"107504": "4.7.5",
|
||||
"107505": "4.7.5",
|
||||
"107600": "4.7.6 Beta 1",
|
||||
"107601": "4.7.6"
|
||||
"107601": "4.7.6",
|
||||
"107602": "4.7.6",
|
||||
"107620": "4.7.7 Beta 1",
|
||||
"107621": "4.7.7 Beta 2",
|
||||
"107622": "4.7.7 Beta 2",
|
||||
"107623": "4.7.7 Beta 3",
|
||||
"107624": "4.7.7 Beta 4",
|
||||
"107625": "4.7.7",
|
||||
"107626": "4.7.7",
|
||||
"107627": "4.7.7",
|
||||
"107628": "4.7.7",
|
||||
"107640": "4.7.8 Beta 1",
|
||||
"107641": "4.7.8 Beta 2",
|
||||
"107642": "4.7.8 Beta 3",
|
||||
"107643": "4.7.8"
|
||||
}
|
||||
@@ -369,6 +369,18 @@ class _event extends \IPS\Content\Controller
|
||||
*/
|
||||
protected function edit()
|
||||
{
|
||||
if ( \IPS\Application::appIsEnabled('cloud') and $this->event->livetopic_id )
|
||||
{
|
||||
/* Allow live topic edit form to handle this */
|
||||
try
|
||||
{
|
||||
/* Make sure it's a valid topic */
|
||||
$liveTopic = \IPS\cloud\LiveTopic::load( $this->event->livetopic_id );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=modcp&controller=modcp&tab=livetopics&action=create&fromEvent=1&id=' . $liveTopic->id, 'front', 'modcp_livetopics' ) );
|
||||
}
|
||||
catch( \Exception ) { }
|
||||
}
|
||||
|
||||
/* Are we blocking changes to past events? */
|
||||
if( $this->event->hasPassed() AND \IPS\Settings::i()->calendar_block_past_changes )
|
||||
{
|
||||
|
||||
@@ -648,7 +648,7 @@ class _view extends \IPS\Dispatcher\Controller
|
||||
/* Build an array of month objects for the nav */
|
||||
$months = new \DatePeriod( (new \DateTime)->setDate( date('Y'), date('m'), 1 ), new \DateInterval( 'P1M' ), 11 );
|
||||
|
||||
$stream = \IPS\Theme::i()->getTemplate( 'overview', 'calendar' )->byMonth( $calendars, $date, $featured, $events, NULL, $months );
|
||||
$stream = \IPS\Theme::i()->getTemplate( 'overview', 'calendar' )->byMonth( $calendars, \IPS\calendar\Date::getDate( $date->firstDayOfMonth('year'), $date->firstDayOfMonth('mon'), $date->firstDayOfMonth('mday') ), $featured, $events, NULL, $months );
|
||||
|
||||
$form = $this->getForm();
|
||||
|
||||
@@ -762,16 +762,14 @@ class _view extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$having[] = 'distance < 500';
|
||||
}
|
||||
|
||||
if( isset( \IPS\Request::i()->sortBy ) && \IPS\Request::i()->sortBy == 'nearest' )
|
||||
{
|
||||
$sort = 'distance asc';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sort = 'event_start_date asc';
|
||||
|
||||
if( isset( \IPS\Request::i()->sortBy ) && \IPS\Request::i()->sortBy == 'nearest' && $location )
|
||||
{
|
||||
$sort = 'distance asc';
|
||||
}
|
||||
|
||||
/* Filter? */
|
||||
if( isset( \IPS\Request::i()->show ) && \IPS\Request::i()->show !== 'all' )
|
||||
{
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
"params": [
|
||||
"calendar_events",
|
||||
{
|
||||
"name": "event_appened_edit",
|
||||
"name": "event_append_edit",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
@@ -128,7 +128,7 @@
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"calendar_events",
|
||||
"event_appened_edit",
|
||||
"event_append_edit",
|
||||
{
|
||||
"name": "event_append_edit",
|
||||
"type": "TINYINT",
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107602,
|
||||
"name": "4.7.6",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107620,
|
||||
"name": "4.7.7 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": true,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"global\/\/dev\/js\/\/library\/"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"emailstats__notification_event_reminder"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/events\/event",
|
||||
"front\/overview\/byMonth"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107621,
|
||||
"name": "4.7.7 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107622,
|
||||
"name": "4.7.7 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107623,
|
||||
"name": "4.7.7 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107624,
|
||||
"name": "4.7.7 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107625,
|
||||
"name": "4.7.7",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107626,
|
||||
"name": "4.7.7",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107627,
|
||||
"name": "4.7.7",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107628,
|
||||
"name": "4.7.7",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107640,
|
||||
"name": "4.7.8 Beta 1",
|
||||
"steps": {
|
||||
"queries": true,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"calendar\/front\/controllers\/overview\/ips.overview.search.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"calendar_events",
|
||||
{
|
||||
"name": "event_livetopic_id",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/events\/featuredEvent",
|
||||
"front\/events\/searchResultsWrapper",
|
||||
"front\/overview\/header",
|
||||
"front\/submit\/submitPage",
|
||||
"front\/view\/eventSidebar",
|
||||
"front\/view\/rsvpControls",
|
||||
"front\/view\/view",
|
||||
"front\/widgets\/recentReviews",
|
||||
"front\/widgets\/upcomingEvents"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107641,
|
||||
"name": "4.7.8 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107642,
|
||||
"name": "4.7.8 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107643,
|
||||
"name": "4.7.8",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -332,7 +332,7 @@ class _Calendar extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'cal_allow_reviews', $this->id ? $this->allow_reviews : FALSE, FALSE, array( 'togglesOn' => array( 'cal_review_moderate' ) ) ) );
|
||||
if( $club->type == 'closed' )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'club_node_public', $this->id ? $this->isPublic() : FALSE ) );
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'club_node_public', $this->id ? $this->isPublic() : 0, TRUE, array( 'options' => array( '0' => 'club_node_public_no', '1' => 'club_node_public_view', '2' => 'club_node_public_participate' ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,13 @@ class _Date extends \IPS\DateTime
|
||||
public function adjust( $adjustment )
|
||||
{
|
||||
$datetime = \IPS\DateTime::ts( $this->dateInformation[0] )->setTimezone( new \DateTimeZone( "UTC" ) );
|
||||
$datetime->add( \DateInterval::createFromDateString( $adjustment ) );
|
||||
$dateInterval=\DateInterval::createFromDateString( $adjustment );
|
||||
|
||||
if( $dateInterval )
|
||||
{
|
||||
$datetime->add( $dateInterval );
|
||||
}
|
||||
|
||||
|
||||
return static::getDate( gmdate( 'Y', $datetime->getTimestamp() ), gmdate( 'm', $datetime->getTimestamp() ), gmdate( 'd', $datetime->getTimestamp() ), gmdate( 'H', $datetime->getTimestamp() ), gmdate( 'i', $datetime->getTimestamp() ), gmdate( 's', $datetime->getTimestamp() ) );
|
||||
}
|
||||
|
||||
@@ -81,11 +81,6 @@ class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory,
|
||||
* @brief [Content] Key for hide reasons
|
||||
*/
|
||||
public static $hideLogKey = 'calendar-events';
|
||||
|
||||
/**
|
||||
* @brief Whether to track the sentiment scores in cloud_sentiment_scores for this content
|
||||
*/
|
||||
public $trackSentimentScore = true;
|
||||
|
||||
/**
|
||||
* Get URL for doing stuff
|
||||
|
||||
@@ -472,7 +472,7 @@ class _Event extends \IPS\Content\Item implements
|
||||
$results[] = array( 'startDate' => $date, 'endDate' => $eDate );
|
||||
}
|
||||
|
||||
/* Figure out which of teh days is next. For example, if the start date is a Wednesday, and the
|
||||
/* Figure out which of the days is next. For example, if the start date is a Wednesday, and the
|
||||
event repeats every Monday and Friday, we need to start with Friday (not Monday) because that's
|
||||
when the first occurance is */
|
||||
$nextTimes = array();
|
||||
@@ -1053,6 +1053,28 @@ class _Event extends \IPS\Content\Item implements
|
||||
|
||||
return $this->dateObjects['end'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the live topic, or NULL if one not available
|
||||
*
|
||||
* @return \IPS\cloud\LiveTopic|null
|
||||
*/
|
||||
public function get__livetopic_id(): ?\IPS\cloud\LiveTopic
|
||||
{
|
||||
if ( ! \IPS\Application::appIsEnabled('cloud') )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return \IPS\cloud\LiveTopic::load( $this->livetopic_id );
|
||||
}
|
||||
catch( \Exception )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a string with the event date/times in the timezone of the user who created the event
|
||||
@@ -2304,8 +2326,11 @@ class _Event extends \IPS\Content\Item implements
|
||||
public function hasPassed()
|
||||
{
|
||||
// Get the end date. If none is available use the start date plus an hour so that online event join links show for a short while after the start
|
||||
$lastOccurrence = $this->lastOccurrence( 'endDate' ) ?? $this->lastOccurrence( 'startDate' )->add( new \DateInterval("PT1H") );
|
||||
if ( $lastOccurrence < \IPS\DateTime::ts( time() ) )
|
||||
$lastOccurrence = $this->lastOccurrence( 'endDate' ) ?? $this->lastOccurrence( 'startDate' );
|
||||
|
||||
$lastOccurrenceClone = clone $lastOccurrence;
|
||||
$lastOccurrenceClone = $lastOccurrenceClone->add( new \DateInterval("PT1H") );
|
||||
if ( $lastOccurrenceClone < \IPS\DateTime::ts( time() ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -85,11 +85,6 @@ class _Review extends \IPS\Content\Review implements \IPS\Content\EditHistory, \
|
||||
* @brief [Content] Key for hide reasons
|
||||
*/
|
||||
public static $hideLogKey = 'calendar-events-rev';
|
||||
|
||||
/**
|
||||
* @brief Whether to track the sentiment scores in cloud_sentiment_scores for this content
|
||||
*/
|
||||
public $trackSentimentScore = true;
|
||||
|
||||
/**
|
||||
* Get URL for doing stuff
|
||||
|
||||
Reference in new issue
Block a user