Skip to content

Commit

Permalink
Merge pull request #815 from dvoracek-slub/fix-calendar
Browse files Browse the repository at this point in the history
[BUGFIX] Fix all-year calendar title and restore previous markup
  • Loading branch information
Alexander Bigga authored May 12, 2022
2 parents 27f9395 + 0b7be68 commit 72271f3
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 47 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/CalendarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function yearsAction()
}

$this->view->assign('documentId', $this->document->getUid());
$this->view->assign('allYearDocTitle', $this->document->getDoc()->getTitle($this->document->getPartof()));
$this->view->assign('allYearDocTitle', $this->document->getDoc()->getTitle($this->document->getUid()));
}

/**
Expand Down
16 changes: 11 additions & 5 deletions Resources/Private/Partials/Calendar/Day.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ <h4>{day.dayValue -> f:format.html()}</h4>
</f:else>
</f:if>
<div class="dayLinkList">
<f:for each="{day.issues}" as="item">
<f:link.page pageUid="{settings.targetPid}" additionalParams="{'tx_dlf[id]': item.documentId}">
{item.text}
</f:link.page>
</f:for>
<f:if condition="{day.issues}">
<ul>
<f:for each="{day.issues}" as="item">
<li>
<f:link.page pageUid="{settings.targetPid}" additionalParams="{'tx_dlf[id]': item.documentId}">
{item.text}
</f:link.page>
</li>
</f:for>
</ul>
</f:if>
</div>
</div>
</f:then>
Expand Down
82 changes: 41 additions & 41 deletions Resources/Private/Templates/Calendar/Calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
<div class="tx-dlf-calendar">
<div class="meta-header">
<div class="year-anchor">
<div class="year-anchor">
<f:link.page additionalParams="{'tx_dlf[id]': parentDocumentId}">
<f:translate key="calendar.allYears" /> {allYearDocTitle}
</f:link.page>
</div>
<f:link.page additionalParams="{'tx_dlf[id]': parentDocumentId}">
<f:translate key="calendar.allYears" /> {allYearDocTitle}
</f:link.page>
</div>
<div class="year">
<f:link.page additionalParams="{'tx_dlf[id]': documentId}">
Expand All @@ -45,44 +43,46 @@
</div>
</f:then>
</f:if>
<table class="month">
<caption>{month.MONTHNAME}</caption>
<tr>
<th class="">{month.DAYMON_NAME}</th>
<th class="">{month.DAYTUE_NAME}</th>
<th class="">{month.DAYWED_NAME}</th>
<th class="">{month.DAYTHU_NAME}</th>
<th class="">{month.DAYFRI_NAME}</th>
<th class="">{month.DAYSAT_NAME}</th>
<th class="">{month.DAYSUN_NAME}</th>
</tr>

<f:for each="{month.week}" as="week">
<div class="month">
<table>
<caption>{month.MONTHNAME}</caption>
<tr>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYMON}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYTUE}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYWED}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYTHU}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYFRI}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYSAT}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYSUN}'}"></f:render>
</td>
<th class="">{month.DAYMON_NAME}</th>
<th class="">{month.DAYTUE_NAME}</th>
<th class="">{month.DAYWED_NAME}</th>
<th class="">{month.DAYTHU_NAME}</th>
<th class="">{month.DAYFRI_NAME}</th>
<th class="">{month.DAYSAT_NAME}</th>
<th class="">{month.DAYSUN_NAME}</th>
</tr>
</f:for>
</table>

<f:for each="{month.week}" as="week">
<tr>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYMON}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYTUE}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYWED}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYTHU}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYFRI}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYSAT}'}"></f:render>
</td>
<td class="">
<f:render partial="Calendar/Day" arguments="{'day': '{week.DAYSUN}'}"></f:render>
</td>
</tr>
</f:for>
</table>
</div>
</f:for>
</div>

Expand Down

0 comments on commit 72271f3

Please sign in to comment.