Skip to content

Commit

Permalink
add two icons for recurring and recurring parent events
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Bigga committed Apr 26, 2018
1 parent 22a799d commit 9ee9c17
Show file tree
Hide file tree
Showing 8 changed files with 439 additions and 434 deletions.
25 changes: 0 additions & 25 deletions Classes/ViewHelpers/Be/FunctionBarViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,6 @@ protected function getGeniusBarIcon(\Slub\SlubEvents\Domain\Model\Event $event)
}
}

/**
* Returns the Recurring Icon
*
* @param event \Slub\SlubEvents\Domain\Model\Event
* @return string html output
*/
protected function getRecurringIcon(\Slub\SlubEvents\Domain\Model\Event $event)
{
if ($event !== null) {
if ($event->isRecurring()) {
$title = LocalizationUtility::translate('tx_slubevents_domain_model_event.recurring', 'slub_events', $arguments = null);
return '<span title="' . $title . '" class="recuring">[R]&nbsp;</span>';
} else {
if ($event->getParent()) {
$title = LocalizationUtility::translate('tx_slubevents_domain_model_event.recurring', 'slub_events', $arguments = null);
return '<span title="' . $title . '" class="recuring">[RW]&nbsp;</span>';
}
}
}
}


/**
* Renders a record list as known from the TYPO3 list module
* Note: This feature is experimental!
Expand Down Expand Up @@ -141,9 +119,6 @@ public function render($icon = 'edit', \Slub\SlubEvents\Domain\Model\Event $even
case 'geniusbar':
$content = $this->getGeniusBarIcon($event);
break;
case 'recurring':
$content = $this->getRecurringIcon($event);
break;
case 'datepicker':
$content = $iconHelper->getDatePickerIcon();
break;
Expand Down
11 changes: 10 additions & 1 deletion Resources/Private/Backend/Templates/Event/BeList.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@
<se:be.functionBar icon="edit" event="{event}"/>
</td>
<td>
<se:be.functionBar icon="recurring" event="{event}"/>
<f:if condition="{event.parent}">
<f:then>
<img title="<f:translate key='tx_slubevents_domain_model_event.recurring' />" src='../typo3conf/ext/slub_events/Resources/Public/Icons/fugue-icons/arrow-circle.png'/>
</f:then>
<f:else>
<f:if condition="{event.recurring}">
<img title="<f:translate key='tx_slubevents_domain_model_event.recurring_parent' />" src='../typo3conf/ext/slub_events/Resources/Public/Icons/fugue-icons/arrow-repeat.png'/>
</f:if>
</f:else>
</f:if>
<se:be.functionBar icon="geniusbar" event="{event}"/>
<span class="eventtitle"
title="{event.description -> f:format.stripTags()}">{event.title}</span><br/>
Expand Down
21 changes: 15 additions & 6 deletions Resources/Private/Backend/Templates76/Event/BeList.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,23 @@
</tr>
<f:for each="{events}" as="event" iteration="eventIterator">
<tr class="{f:if(condition: eventIterator.isEven, then: 'Even')} {f:if(condition: eventIterator.isOdd, then: 'Odd')} {f:if(condition: eventIterator.isFirst, then: 'First')} {f:if(condition: eventIterator.isLast, then: 'Last')}">
<td>
<td class="be-icon">
<f:format.raw>
<se:be.functionBar icon="edit" event="{event}"/>
</f:format.raw>
</td>
<td>
<f:format.raw>
<se:be.functionBar icon="recurring" event="{event}"/>
<f:if condition="{event.parent}">
<f:then>
<img title="<f:translate key='tx_slubevents_domain_model_event.recurring' />" src='../typo3conf/ext/slub_events/Resources/Public/Icons/fugue-icons/arrow-circle.png'/>
</f:then>
<f:else>
<f:if condition="{event.recurring}">
<img title="<f:translate key='tx_slubevents_domain_model_event.recurring_parent' />" src='../typo3conf/ext/slub_events/Resources/Public/Icons/fugue-icons/arrow-repeat.png'/>
</f:if>
</f:else>
</f:if>
<se:be.functionBar icon="geniusbar" event="{event}"/>
<span class="eventtitle"
title="{event.description -> f:format.stripTags()}">{event.title}
Expand Down Expand Up @@ -75,7 +84,7 @@
</f:else>
</f:if> / {event.maxSubscriber}
</td>
<td>
<td class="be-icon">
<f:if condition="{event.hidden} == 0">
<f:then>
<f:link.action action="beCopy" arguments="{event: event}">
Expand All @@ -84,12 +93,12 @@
</f:then>
</f:if>
</td>
<td>
<td class="be-icon">
<f:format.raw>
<se:be.functionBar icon="hide" event="{event}"/>
</f:format.raw>
</td>
<td>
<td class="be-icon">
<f:if condition="{event.hidden} == 0">
<f:then>
<f:link.action action="beIcsInvitation"
Expand All @@ -102,7 +111,7 @@
</f:then>
</f:if>
</td>
<td>
<td class="be-icon">
<f:if condition="{event.onlinesurvey}">
<f:then>
<f:if condition="<se:condition.IsPastEvent event='{event}' />">
Expand Down
Loading

0 comments on commit 9ee9c17

Please sign in to comment.