Skip to content

Commit

Permalink
Merge pull request #70 from slub/use-f-spaceless
Browse files Browse the repository at this point in the history
Use f:spaceless instead of own trim-ViewHelper
  • Loading branch information
Alexander Bigga authored Jun 30, 2021
2 parents 0fc6326 + 06c8c04 commit ece0476
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 81 deletions.
72 changes: 0 additions & 72 deletions Classes/ViewHelpers/Format/TrimViewHelper.php

This file was deleted.

6 changes: 3 additions & 3 deletions Resources/Private/Partials/Event/Item.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ <h4>
</f:if>
</h4>

<strong><se:format.trim><f:render partial="Event/DateFromTo" arguments="{event : event}"/></se:format.trim></strong>,
<se:format.trim>
<strong><f:spaceless><f:render partial="Event/DateFromTo" arguments="{event : event}"/></f:spaceless></strong>,
<f:spaceless>
<f:render partial="Location/Link" arguments="{location: event.location, doLink: 'false', onlyParent: 'true'}" />
</se:format.trim>, {event.contact.name}
</f:spaceless>, {event.contact.name}

<div class="clear"></div>
<div class="teaser">
Expand Down
3 changes: 2 additions & 1 deletion Resources/Private/Partials/Location/Link.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{namespace se=Slub\SlubEvents\ViewHelpers}
<f:section name="locationLink">
<f:debug>{_all}</f:debug>
<f:if condition="{doLink}">
<f:then>
<f:if condition="{location.link}">
Expand Down Expand Up @@ -35,7 +36,7 @@
<f:then>
<f:for each="{location.parent}" as="parentLocation" iteration="i">
<f:if condition='{i.isFirst}'>
<se:format.trim><f:render section="locationLink" arguments="{location: parentLocation, doLink: doLink}" /></se:format.trim><f:if condition="{onlyParent}"><f:else>,</f:else></f:if>
<f:spaceless><f:render section="locationLink" arguments="{location: parentLocation, doLink: doLink}" /></f:spaceless><f:if condition="{onlyParent}"><f:else>,</f:else></f:if>
</f:if>
</f:for>
<f:if condition="{onlyParent}">
Expand Down
6 changes: 3 additions & 3 deletions Resources/Private/Templates/Event/Show.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<f:if condition="{event}">
<f:then>
<h3>{event.title}</h3>
<strong><se:format.trim><f:render partial="Event/DateFromTo" arguments="{event : event}" /></se:format.trim></strong>,
<se:format.trim>
<strong><f:spaceless><f:render partial="Event/DateFromTo" arguments="{event : event}" /></f:spaceless></strong>,
<f:spaceless>
<f:render partial="Location/Link" arguments="{location: event.location, doLink: 'false', onlyParent: 'true'}" />
</se:format.trim>, {event.contact.name}
</f:spaceless>, {event.contact.name}

<f:format.html>{event.description}</f:format.html>

Expand Down
3 changes: 1 addition & 2 deletions Resources/Private/Templates/Subscriber/New.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{namespace se=Slub\SlubEvents\ViewHelpers}
<f:layout name="Default" />

<f:section name="main">
Expand All @@ -14,7 +13,7 @@ <h4><f:translate key="tx_slubevents_domain_model_event.individual_appointment" /
<h4><f:translate key="tx_slubevents_domain_model_event" />: {event.title}</h4>
</f:else>
</f:if>
<strong><se:format.trim><f:render partial="Event/DateFromTo" arguments="{event : event}" /></se:format.trim></strong>
<strong><f:spaceless><f:render partial="Event/DateFromTo" arguments="{event : event}" /></f:spaceless></strong>

<div class="location">
<f:translate key="tx_slubevents_domain_model_location" />:
Expand Down

0 comments on commit ece0476

Please sign in to comment.