Skip to content

Commit

Permalink
Fixed: Usage of scoutnet_webservice models
Browse files Browse the repository at this point in the history
  • Loading branch information
DasLampe committed Dec 31, 2022
1 parent 8b90b49 commit bcbdf40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
22 changes: 11 additions & 11 deletions templates/inline_kalender_list.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
Scoutnet Kalender Template: WIDGET-EVENTS (default)
Dir stehen hier alle Inhalte des Kalenders in einem Array zur Verf�gung.
Z.B.:
<?php echo date('d. m. Y', $event->Start); ?>
Expand All @@ -14,32 +14,32 @@
Dieses Template bindet auch Remote-HTML-Code ein, wenn das
jemand in den Kalender eingetragen hat.
*/
*/

// Deutsche Zeit
date_default_timezone_set('Europe/Berlin');

foreach($events as $event) { /* @var $event SN_Model_Event */
?>
<h2><?php echo date('d.m.Y', $event->Start); ?></span>: <?php echo $event->Title; ?></h2>
<h2><?php echo $event->getStartDate()->format("d.m.Y"); ?></span>: <?php echo $event->getTitle(); ?></h2>

<p>
<?php echo $event->Description; ?>
<?php echo $event->getDescription(); ?>
<br />
eingetragen von: <?php echo $event->Author->get_full_name(); ?>
eingetragen von: <?php echo $event->getAuthor()->getFullName(); ?>
<br />
<?php
// Zeigt den Link nur an, wenn das Feld gef�llt ist
if (trim($event->URL)!="") {
if (trim($event->getURL())!="") {
// Zeigt den Link_Text (mit Link) nur an, wenn das Feld gef�llt ist
if (trim($event->URL_Text)!="") { ?>
Link: <a href="<?php echo $event->URL; ?>"><?php echo $event->URL_Text; ?></a>
if (trim($event->getURLText())!="") { ?>
Link: <a href="<?php echo $event->getURL(); ?>"><?php echo $event->getURLText(); ?></a>
<?php }
else { ?>
Link: <a href="<?php echo $event->URL; ?>"><?php echo $event->Title; ?></a>
Link: <a href="<?php echo $event->getURL(); ?>"><?php echo $event->getTitle(); ?></a>
<?php }
}
?>
</p>
<br />
<?php } ?>
<?php } ?>
14 changes: 7 additions & 7 deletions templates/widget_kalender_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@
?>
<div class="<?php echo $wrapclassname; ?>" style="min-height: 235px;">Lade Kalenderdaten...</div>
<?php

// wenn der Aufruf jedoch per AJAX kam, ganz normal Content ausgeben, mit dem wir unseren DIV f�llen wollen
} else {
foreach($events as $event) { /* @var $event SN_Model_Event */
?>
<div>
<strong><?php echo date('d.n.Y', $event->Start); ?> <?php echo gmdate('G:i', $event->Start); ?> <?php echo $event->Location; ?></strong><br />
<strong><?php echo $event->getStartDate()->format("d.n.Y G:i"); ?> <?php echo $event->getLocation(); ?></strong><br />
<?php
if (trim($event->URL)=="") {
echo $event->Title;
if (trim($event->getURL())=="") {
echo $event->getTitle();
}
else { ?>
<a href="<?php echo $event->URL; ?>"><?php echo $event->Title; ?></a>
<a href="<?php echo $event->getURL(); ?>"><?php echo $event->getTitle(); ?></a>
<?php } ?>
</div>

<br />
<?php
}
}
?>
?>

0 comments on commit bcbdf40

Please sign in to comment.