Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -30,14 +30,26 @@ class _Event
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
if ( \IPS\calendar\Calendar::canOnAny( 'add' ) )
|
||||
if ( \IPS\calendar\Calendar::canOnAny( 'add', NULL, \IPS\Settings::i()->club_nodes_in_apps ? array() : array( array( 'cal_club_id IS NULL' ) ) ) )
|
||||
{
|
||||
return array( 'event' => array(
|
||||
'link' => \IPS\Http\Url::internal( "app=calendar&module=calendar&controller=submit&_new=1", 'front', 'calendar_submit' ),
|
||||
'extraData' => array( 'data-ipsDialog' => true, 'data-ipsDialog-size' => "narrow", ),
|
||||
'title' => 'select_calendar'
|
||||
)
|
||||
);
|
||||
if ( !\IPS\Settings::i()->club_nodes_in_apps and $theOnlyNode = \IPS\calendar\Calendar::theOnlyNode() )
|
||||
{
|
||||
return array(
|
||||
'event' => array(
|
||||
'link' => \IPS\Http\Url::internal( "app=calendar&module=calendar&controller=submit&do=submit&id=" . $theOnlyNode->_id, 'front', 'calendar_submit' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array(
|
||||
'event' => array(
|
||||
'link' => \IPS\Http\Url::internal( "app=calendar&module=calendar&controller=submit&_new=1", 'front', 'calendar_submit' ),
|
||||
'extraData' => array( 'data-ipsDialog' => true, 'data-ipsDialog-size' => "narrow", ),
|
||||
'title' => 'select_calendar'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return array();
|
||||
|
||||
@@ -49,7 +49,8 @@ class _StreamItems
|
||||
{
|
||||
$member = \IPS\Member::load( $rsvp['rsvp_member_id'] );
|
||||
$event = \IPS\calendar\Event::load( $rsvp[ 'rsvp_event_id' ] );
|
||||
$rsvps[] = new \IPS\Content\Search\Result\Custom( \IPS\DateTime::ts( $rsvp[ 'rsvp_date' ] ), \IPS\Member::loggedIn()->language()->addToStack( 'calendar_activity_stream_rsvp', FALSE, array( 'htmlsprintf' => array( \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->userLink( $member ), $event->url(), $event->title ) ) ) );
|
||||
$title = htmlspecialchars( $event->title, ENT_DISALLOWED, 'UTF-8', FALSE );
|
||||
$rsvps[] = new \IPS\Content\Search\Result\Custom( \IPS\DateTime::ts( $rsvp[ 'rsvp_date' ] ), \IPS\Member::loggedIn()->language()->addToStack( 'calendar_activity_stream_rsvp', FALSE, array( 'htmlsprintf' => array( \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->userLink( $member ), $event->url(), $title ) ) ) );
|
||||
}
|
||||
|
||||
/* Return */
|
||||
|
||||
Reference in new issue
Block a user