Skip to content

Commit

Permalink
[TASK] Migrate to core link ViewHelpers in backend module
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Haupt committed Jul 15, 2020
1 parent e161e0a commit bcdfd9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 51 deletions.
44 changes: 0 additions & 44 deletions Classes/ViewHelpers/EditRecordViewHelper.php

This file was deleted.

7 changes: 4 additions & 3 deletions Resources/Private/Partials/Backend/Row.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
xmlns:c="http://typo3.org/ns/HDNET/Calendarize/ViewHelpers"
data-namespace-typo3-fluid="true">
Expand All @@ -21,10 +22,10 @@
{index.foreignUid}
</td>
<td>
<a class="btn btn-default"
href="{c:editRecord(parameters: 'edit[{index.configuration.tableName}][{index.foreignUid}]=edit')}">
<be:link.editRecord class="btn btn-default" uid="{index.foreignUid}" table="{index.configuration.tableName}"
returnUrl="{f:be.uri(route: 'web_CalendarizeCalendarize')}">
<core:icon identifier="actions-document-open"/>
</a>
</be:link.editRecord>
</td>
</tr>
</html>
9 changes: 5 additions & 4 deletions Resources/Private/Templates/Backend/List.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
xmlns:c="http://typo3.org/ns/HDNET/Calendarize/ViewHelpers"
data-namespace-typo3-fluid="true">
Expand Down Expand Up @@ -33,20 +34,20 @@ <h1>Calendarize</h1>
<f:form.submit value="Save options" class="btn btn-secondary" />
</f:form>
</fieldset>

<fieldset class="form-group">
<f:if condition="{typeLocations}">
<f:then>
<p>
<f:for each="{typeLocations}" key="table" as="pids">
<f:for each="{pids}" key="pid" as="value">
<a class="btn btn-primary"
href="{c:editRecord(parameters: 'edit[{table}][{pid}]=new')}">
<be:link.newRecord class="btn btn-primary" table="{table}" pid="{pid}"
returnUrl="{f:be.uri(route: 'web_CalendarizeCalendarize')}">
<core:icon identifier="actions-document-new"/>
{value} on "
<c:backend.pageTitle uid="{pid}"/>
" (#{pid})
</a>
</be:link.newRecord>
</f:for>
</f:for>
</p>
Expand Down

0 comments on commit bcdfd9a

Please sign in to comment.