Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Use short open tags in the templates
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Apr 1, 2015
1 parent 06eaf66 commit 8b54003
Show file tree
Hide file tree
Showing 22 changed files with 112 additions and 112 deletions.
18 changes: 9 additions & 9 deletions src/Resources/contao/templates/calendar/cal_default.html5
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
<table class="calendar">
<thead>
<tr>
<th colspan="2" class="head previous"><?php if ($this->prevHref): ?><a href="<?php echo $this->prevHref; ?>" title="<?php echo $this->prevTitle; ?>"><?php echo $this->prevLink; ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="3" class="head current"><?php echo $this->current; ?></th>
<th colspan="2" class="head next"><?php if ($this->nextHref): ?><a href="<?php echo $this->nextHref; ?>" title="<?php echo $this->nextTitle; ?>"><?php echo $this->nextLink; ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="2" class="head previous"><?php if ($this->prevHref): ?><a href="<?= $this->prevHref ?>" title="<?= $this->prevTitle ?>"><?= $this->prevLink ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="3" class="head current"><?= $this->current ?></th>
<th colspan="2" class="head next"><?php if ($this->nextHref): ?><a href="<?= $this->nextHref ?>" title="<?= $this->nextTitle ?>"><?= $this->nextLink ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
</tr>
<tr>
<?php foreach ($this->days as $i=>$day): ?>
<th class="label<?php echo $day['class']; ?>"><?php echo utf8_substr($day['name'], 0, $this->substr); ?><span><?php echo utf8_substr($day['name'], $this->substr); ?></span></th>
<th class="label<?= $day['class'] ?>"><?= utf8_substr($day['name'], 0, $this->substr) ?><span><?= utf8_substr($day['name'], $this->substr) ?></span></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php foreach ($this->weeks as $class=>$week): ?>
<tr class="<?php echo $class; ?>">
<tr class="<?= $class ?>">
<?php foreach ($week as $day): ?>
<td class="<?php echo $day['class']; ?>">
<div class="header"><?php echo $day['label']; ?></div>
<td class="<?= $day['class'] ?>">
<div class="header"><?= $day['label'] ?></div>
<?php foreach ($day['events'] as $event): ?>
<div class="event cal_<?php echo $event['parent']; ?><?php echo $event['class']; ?>">
<a href="<?php echo $event['href']; ?>" title="<?php echo $event['title']; ?> (<?php if ($event['day']): echo $event['day']; ?>, <?php endif; echo $event['date']; if ($event['time']): ?>, <?php echo $event['time']; endif; ?>)"<?php echo $event['target']; ?>><?php echo $event['link']; ?></a>
<div class="event cal_<?= $event['parent'] ?><?= $event['class'] ?>">
<a href="<?= $event['href'] ?>" title="<?= $event['title'] ?> (<?php if ($event['day']) echo $event['day'] . ', '; ?><?= $event['date'] ?><?php if ($event['time']) echo ', ' . $event['time']; ?>)"<?= $event['target'] ?>><?= $event['link'] ?></a>
</div>
<?php endforeach; ?>
</td>
Expand Down
18 changes: 9 additions & 9 deletions src/Resources/contao/templates/calendar/cal_default.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
<table class="calendar">
<thead>
<tr>
<th colspan="2" class="head previous"><?php if ($this->prevHref): ?><a href="<?php echo $this->prevHref; ?>" title="<?php echo $this->prevTitle; ?>"><?php echo $this->prevLink; ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="3" class="head current"><?php echo $this->current; ?></th>
<th colspan="2" class="head next"><?php if ($this->nextHref): ?><a href="<?php echo $this->nextHref; ?>" title="<?php echo $this->nextTitle; ?>"><?php echo $this->nextLink; ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="2" class="head previous"><?php if ($this->prevHref): ?><a href="<?= $this->prevHref ?>" title="<?= $this->prevTitle ?>"><?= $this->prevLink ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="3" class="head current"><?= $this->current ?></th>
<th colspan="2" class="head next"><?php if ($this->nextHref): ?><a href="<?= $this->nextHref ?>" title="<?= $this->nextTitle ?>"><?= $this->nextLink ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
</tr>
<tr>
<?php foreach ($this->days as $i=>$day): ?>
<th class="label<?php echo $day['class']; ?>"><?php echo utf8_substr($day['name'], 0, $this->substr); ?><span><?php echo utf8_substr($day['name'], $this->substr); ?></span></th>
<th class="label<?= $day['class'] ?>"><?= utf8_substr($day['name'], 0, $this->substr) ?><span><?= utf8_substr($day['name'], $this->substr) ?></span></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php foreach ($this->weeks as $class=>$week): ?>
<tr class="<?php echo $class; ?>">
<tr class="<?= $class ?>">
<?php foreach ($week as $day): ?>
<td class="<?php echo $day['class']; ?>">
<div class="header"><?php echo $day['label']; ?></div>
<td class="<?= $day['class'] ?>">
<div class="header"><?= $day['label'] ?></div>
<?php foreach ($day['events'] as $event): ?>
<div class="event cal_<?php echo $event['parent']; ?><?php echo $event['class']; ?>">
<a href="<?php echo $event['href']; ?>" title="<?php echo $event['title']; ?> (<?php if ($event['day']): echo $event['day']; ?>, <?php endif; echo $event['date']; if ($event['time']): ?>, <?php echo $event['time']; endif; ?>)"<?php echo $event['target']; ?>><?php echo $event['link']; ?></a>
<div class="event cal_<?= $event['parent'] ?><?= $event['class'] ?>">
<a href="<?= $event['href'] ?>" title="<?= $event['title'] ?> (<?php if ($event['day']) echo $event['day'] . ', '; ?><?= $event['date'] ?><?php if ($event['time']) echo ', ' . $event['time']; ?>)"<?= $event['target'] ?>><?= $event['link'] ?></a>
</div>
<?php endforeach; ?>
</td>
Expand Down
14 changes: 7 additions & 7 deletions src/Resources/contao/templates/calendar/cal_mini.html5
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
<table class="minicalendar">
<thead>
<tr>
<th class="head previous"><?php if ($this->prevHref): ?><a href="<?php echo $this->prevHref; ?>" rel="nofollow" title="<?php echo $this->prevTitle; ?>"><?php echo $this->prevLabel; ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="5" class="head current"><?php echo $this->current; ?></th>
<th class="head next"><?php if ($this->nextHref): ?><a href="<?php echo $this->nextHref; ?>" rel="nofollow" title="<?php echo $this->nextTitle; ?>"><?php echo $this->nextLabel; ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th class="head previous"><?php if ($this->prevHref): ?><a href="<?= $this->prevHref ?>" rel="nofollow" title="<?= $this->prevTitle ?>"><?= $this->prevLabel ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="5" class="head current"><?= $this->current ?></th>
<th class="head next"><?php if ($this->nextHref): ?><a href="<?= $this->nextHref ?>" rel="nofollow" title="<?= $this->nextTitle ?>"><?= $this->nextLabel ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
</tr>
<tr>
<?php foreach ($this->days as $i=>$day): ?>
<th class="label<?php echo $day['class']; ?>"><?php echo utf8_substr($day['name'], 0, $this->substr); ?><span class="invisible"><?php echo utf8_substr($day['name'], $this->substr); ?></span></th>
<th class="label<?= $day['class'] ?>"><?= utf8_substr($day['name'], 0, $this->substr) ?><span class="invisible"><?= utf8_substr($day['name'], $this->substr) ?></span></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php foreach ($this->weeks as $class=>$week): ?>
<tr class="<?php echo $class; ?>">
<tr class="<?= $class ?>">
<?php foreach ($week as $day): ?>
<?php if ($day['href']): ?>
<td class="<?php echo $day['class']; ?>"><a href="<?php echo $day['href']; ?>" title="<?php echo $day['title']; ?>"><?php echo $day['label']; ?></a></td>
<td class="<?= $day['class'] ?>"><a href="<?= $day['href'] ?>" title="<?= $day['title'] ?>"><?= $day['label'] ?></a></td>
<?php else: ?>
<td class="<?php echo $day['class']; ?>"><?php echo $day['label']; ?></td>
<td class="<?= $day['class'] ?>"><?= $day['label'] ?></td>
<?php endif; ?>
<?php endforeach; ?>
</tr>
Expand Down
14 changes: 7 additions & 7 deletions src/Resources/contao/templates/calendar/cal_mini.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
<table class="minicalendar">
<thead>
<tr>
<th class="head previous"><?php if ($this->prevHref): ?><a href="<?php echo $this->prevHref; ?>" rel="nofollow" title="<?php echo $this->prevTitle; ?>"><?php echo $this->prevLabel; ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="5" class="head current"><?php echo $this->current; ?></th>
<th class="head next"><?php if ($this->nextHref): ?><a href="<?php echo $this->nextHref; ?>" rel="nofollow" title="<?php echo $this->nextTitle; ?>"><?php echo $this->nextLabel; ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th class="head previous"><?php if ($this->prevHref): ?><a href="<?= $this->prevHref ?>" rel="nofollow" title="<?= $this->prevTitle ?>"><?= $this->prevLabel ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
<th colspan="5" class="head current"><?= $this->current ?></th>
<th class="head next"><?php if ($this->nextHref): ?><a href="<?= $this->nextHref ?>" rel="nofollow" title="<?= $this->nextTitle ?>"><?= $this->nextLabel ?></a><?php else: ?>&nbsp;<?php endif; ?></th>
</tr>
<tr>
<?php foreach ($this->days as $i=>$day): ?>
<th class="label<?php echo $day['class']; ?>"><?php echo utf8_substr($day['name'], 0, $this->substr); ?><span class="invisible"><?php echo utf8_substr($day['name'], $this->substr); ?></span></th>
<th class="label<?= $day['class'] ?>"><?= utf8_substr($day['name'], 0, $this->substr) ?><span class="invisible"><?= utf8_substr($day['name'], $this->substr) ?></span></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php foreach ($this->weeks as $class=>$week): ?>
<tr class="<?php echo $class; ?>">
<tr class="<?= $class ?>">
<?php foreach ($week as $day): ?>
<?php if ($day['href']): ?>
<td class="<?php echo $day['class']; ?>"><a href="<?php echo $day['href']; ?>" title="<?php echo $day['title']; ?>"><?php echo $day['label']; ?></a></td>
<td class="<?= $day['class'] ?>"><a href="<?= $day['href'] ?>" title="<?= $day['title'] ?>"><?= $day['label'] ?></a></td>
<?php else: ?>
<td class="<?php echo $day['class']; ?>"><?php echo $day['label']; ?></td>
<td class="<?= $day['class'] ?>"><?= $day['label'] ?></td>
<?php endif; ?>
<?php endforeach; ?>
</tr>
Expand Down
16 changes: 8 additions & 8 deletions src/Resources/contao/templates/events/event_full.html5
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@

<div class="event layout_full block<?php echo $this->class; ?>">
<div class="event layout_full block<?= $this->class ?>">

<h1><?php echo $this->title; ?></h1>
<p class="info"><?php echo $this->date; ?></p>
<h1><?= $this->title ?></h1>
<p class="info"><?= $this->date ?></p>

<?php if ($this->recurring): ?>
<p class="recurring"><?php echo $this->recurring; if ($this->until): ?> <?php echo $this->until; endif; ?>.</p>
<p class="recurring"><?= $this->recurring ?><?php if ($this->until) echo ' ' . $this->until; ?>.</p>
<?php endif; ?>

<?php if ($this->details): ?>
<?php echo $this->details; ?>
<?= $this->details ?>
<?php else: ?>
<div class="ce_text block">
<?php echo $this->teaser; ?>
<?= $this->teaser ?>
</div>
<?php endif; ?>

<?php if ($this->location): ?>
<p class="location"><?php echo $this->locationLabel; ?>: <?php echo $this->location; ?></p>
<p class="location"><?= $this->locationLabel ?>: <?= $this->location ?></p>
<?php endif; ?>

<?php if ($this->enclosure): ?>
<div class="enclosure">
<?php foreach ($this->enclosure as $enclosure): ?>
<p><img src="<?php echo $enclosure['icon']; ?>" width="18" height="18" alt="<?php echo $enclosure['mime']; ?>" class="mime_icon"> <a href="<?php echo $enclosure['href']; ?>" title="<?php echo $enclosure['title']; ?>"><?php echo $enclosure['link']; ?> <span class="size">(<?php echo $enclosure['filesize']; ?>)</span></a></p>
<p><img src="<?= $enclosure['icon'] ?>" width="18" height="18" alt="<?= $enclosure['mime'] ?>" class="mime_icon"> <a href="<?= $enclosure['href'] ?>" title="<?= $enclosure['title'] ?>"><?= $enclosure['link'] ?> <span class="size">(<?= $enclosure['filesize'] ?>)</span></a></p>
<?php endforeach; ?>
</div>
<?php endif; ?>
Expand Down
16 changes: 8 additions & 8 deletions src/Resources/contao/templates/events/event_full.xhtml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@

<div class="event layout_full block<?php echo $this->class; ?>">
<div class="event layout_full block<?= $this->class ?>">

<h1><?php echo $this->title; ?></h1>
<p class="info"><?php echo $this->date; ?></p>
<h1><?= $this->title ?></h1>
<p class="info"><?= $this->date ?></p>

<?php if ($this->recurring): ?>
<p class="recurring"><?php echo $this->recurring; if ($this->until): ?> <?php echo $this->until; endif; ?>.</p>
<p class="recurring"><?= $this->recurring ?><?php if ($this->until) echo ' ' . $this->until; ?>.</p>
<?php endif; ?>

<?php if ($this->details): ?>
<?php echo $this->details; ?>
<?= $this->details ?>
<?php else: ?>
<div class="ce_text block">
<?php echo $this->teaser; ?>
<?= $this->teaser ?>
</div>
<?php endif; ?>

<?php if ($this->location): ?>
<p class="location"><?php echo $this->locationLabel; ?>: <?php echo $this->location; ?></p>
<p class="location"><?= $this->locationLabel ?>: <?= $this->location ?></p>
<?php endif; ?>

<?php if ($this->enclosure): ?>
<div class="enclosure">
<?php foreach ($this->enclosure as $enclosure): ?>
<p><img src="<?php echo $enclosure['icon']; ?>" width="18" height="18" alt="<?php echo $enclosure['mime']; ?>" class="mime_icon" /> <a href="<?php echo $enclosure['href']; ?>" title="<?php echo $enclosure['title']; ?>"><?php echo $enclosure['link']; ?> <span class="size">(<?php echo $enclosure['filesize']; ?>)</span></a></p>
<p><img src="<?= $enclosure['icon'] ?>" width="18" height="18" alt="<?= $enclosure['mime'] ?>" class="mime_icon" /> <a href="<?= $enclosure['href'] ?>" title="<?= $enclosure['title'] ?>"><?= $enclosure['link'] ?> <span class="size">(<?= $enclosure['filesize'] ?>)</span></a></p>
<?php endforeach; ?>
</div>
<?php endif; ?>
Expand Down
12 changes: 6 additions & 6 deletions src/Resources/contao/templates/events/event_list.html5
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@

<?php if ($this->header): ?>
<div class="header<?php echo $this->classHeader; ?>">
<time datetime="<?php echo $this->datetime; ?>" class="date"><?php echo $this->firstDate; ?></time><?php if ($this->firstDay): ?> <span class="day">(<?php echo $this->firstDay; ?>)</span><?php endif; ?>
<div class="header<?= $this->classHeader ?>">
<time datetime="<?= $this->datetime ?>" class="date"><?= $this->firstDate ?></time><?php if ($this->firstDay): ?> <span class="day">(<?= $this->firstDay ?>)</span><?php endif; ?>
</div>
<?php endif; ?>

<div class="event layout_list<?php echo $this->classList; ?>">
<div class="event layout_list<?= $this->classList ?>">

<h2><a href="<?php echo $this->href; ?>" title="<?php echo $this->title; ?> (<?php if ($this->day): echo $this->day; ?>, <?php endif; echo $this->date; if ($this->time): ?>, <?php echo $this->time; endif; ?>)"<?php echo $this->target; ?>><?php echo $this->link; ?></a></h2>
<h2><a href="<?= $this->href ?>" title="<?= $this->title ?> (<?php if ($this->day) echo $this->day . ', '; ?><?= $this->date ?><?php if ($this->time) echo ', ' . $this->time; ?>)"<?= $this->target ?>><?= $this->link ?></a></h2>

<?php if ($this->time || $this->span): ?>
<p class="time"><?php echo $this->time . $this->span; ?></p>
<p class="time"><?= $this->time . $this->span ?></p>
<?php endif; ?>

<div class="ce_text block">
<?php echo $this->details; ?>
<?= $this->details ?>
</div>

</div>
12 changes: 6 additions & 6 deletions src/Resources/contao/templates/events/event_list.xhtml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@

<?php if ($this->header): ?>
<div class="header<?php echo $this->classHeader; ?>">
<span class="date"><?php echo $this->firstDate; ?></span><?php if ($this->firstDay): ?> <span class="day">(<?php echo $this->firstDay; ?>)</span><?php endif; ?>
<div class="header<?= $this->classHeader ?>">
<span class="date"><?= $this->firstDate ?></span><?php if ($this->firstDay): ?> <span class="day">(<?= $this->firstDay ?>)</span><?php endif; ?>
</div>
<?php endif; ?>

<div class="event layout_list<?php echo $this->classList; ?>">
<div class="event layout_list<?= $this->classList ?>">

<h2><a href="<?php echo $this->href; ?>" title="<?php echo $this->title; ?> (<?php if ($this->day): echo $this->day; ?>, <?php endif; echo $this->date; if ($this->time): ?>, <?php echo $this->time; endif; ?>)"<?php echo $this->target; ?>><?php echo $this->link; ?></a></h2>
<h2><a href="<?= $this->href ?>" title="<?= $this->title ?> (<?php if ($this->day) echo $this->day . ', '; ?><?= $this->date ?><?php if ($this->time) echo ', ' . $this->time; ?>)"<?= $this->target ?>><?= $this->link ?></a></h2>

<?php if ($this->time || $this->span): ?>
<p class="time"><?php echo $this->time . $this->span; ?></p>
<p class="time"><?= $this->time . $this->span ?></p>
<?php endif; ?>

<div class="ce_text block">
<?php echo $this->details; ?>
<?= $this->details ?>
</div>

</div>
16 changes: 8 additions & 8 deletions src/Resources/contao/templates/events/event_teaser.html5
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@

<?php if ($this->header): ?>
<div class="header<?php echo $this->classHeader; ?>">
<span class="date"><?php echo $this->firstDate; ?></span><?php if ($this->firstDay): ?> <span class="day">(<?php echo $this->firstDay; ?>)</span><?php endif; ?>
<div class="header<?= $this->classHeader ?>">
<span class="date"><?= $this->firstDate ?></span><?php if ($this->firstDay): ?> <span class="day">(<?= $this->firstDay ?>)</span><?php endif; ?>
</div>
<?php endif; ?>

<div class="event layout_teaser<?php echo $this->classList; ?>">
<div class="event layout_teaser<?= $this->classList ?>">

<?php if ($this->details): ?>
<h2><a href="<?php echo $this->href; ?>" title="<?php echo $this->title; ?> (<?php if ($this->day): echo $this->day; ?>, <?php endif; echo $this->date; if ($this->time): ?>, <?php echo $this->time; endif; ?>)"<?php echo $this->target; ?>><?php echo $this->link; ?></a></h2>
<h2><a href="<?= $this->href ?>" title="<?= $this->title ?> (<?php if ($this->day) echo $this->day . ', '; ?><?= $this->date ?><?php if ($this->time) echo ', ' . $this->time; ?>)"<?= $this->target ?>><?= $this->link ?></a></h2>
<?php else: ?>
<h2><?php echo $this->title; ?></h2>
<h2><?= $this->title ?></h2>
<?php endif; ?>

<?php if ($this->time || $this->span): ?>
<p class="time"><?php echo $this->time . $this->span; ?></p>
<p class="time"><?= $this->time . $this->span ?></p>
<?php endif; ?>

<div class="teaser">
<?php echo $this->teaser; ?>
<?= $this->teaser ?>
</div>

<?php if ($this->details): ?>
<p class="more"><a href="<?php echo $this->href; ?>" title="<?php echo $this->readMore; ?>"<?php echo $this->target; ?>><?php echo $this->more; ?> <span class="invisible"><?php echo $this->link; ?></span></a></p>
<p class="more"><a href="<?= $this->href ?>" title="<?= $this->readMore ?>"<?= $this->target ?>><?= $this->more ?> <span class="invisible"><?= $this->link ?></span></a></p>
<?php endif; ?>

</div>
Loading

0 comments on commit 8b54003

Please sign in to comment.