LanguageColumns.html 7.76 KB
Newer Older
1
<f:if condition="{context.newLanguageOptions}">
2
3
    <div class="row-cols-auto row form-inline-spaced">
        <div class="col">
4
            <select class="form-select form-select-sm" name="createNewLanguage" data-global-event="change" data-action-navigate="$value">
5
                <f:for each="{context.newLanguageOptions}" as="languageName" key="url">
6
7
8
9
10
11
12
13
14
                    <option value="{url}">{languageName}</option>
                </f:for>
            </select>
        </div>
    </div>
</f:if>
<div class="t3-grid-container">
    <table cellpadding="0" cellspacing="0" class="t3-page-columns t3-grid-table t3js-page-columns">
        <tr>
15
            <f:for each="{languageColumns}" as="languageColumn">
16
17
                <td valign="top"
                    class="t3-page-column t3-page-column-lang-name"
18
19
20
                    data-language-uid="{languageColumn.context.siteLanguage.languageId}"
                    data-language-title="{languageColumn.context.siteLanguage.title}"
                    data-flag-identifier="{languageColumn.context.siteLanguage.flagIdentifier}"
21
                >
22
23
24
                    <h2>{languageColumn.context.siteLanguage.title}</h2>
                    <f:if condition="{languageColumn.context.languageMode}">
                        <span class="label label-{languageColumn.context.languageModeLabelClass}">{languageColumn.context.languageMode}</span>
25
26
27
28
29
                    </f:if>
                </td>
            </f:for>
        </tr>
        <tr>
30
            <f:for each="{languageColumns}" as="languageColumn">
31
32
33
                <td class="t3-page-column t3-page-lang-label nowrap">
                    <div class="btn-group">
                        <f:if condition="{languageColumn.allowViewPage}">
34
                            <a href="#" class="btn btn-default btn-sm" {languageColumn.previewUrlAttributes -> f:format.raw()} title="{languageColumn.viewPageLinkTitle}">
35
36
37
38
39
40
41
42
                                <core:icon identifier="actions-view" />
                            </a>
                        </f:if>
                        <f:if condition="{languageColumn.allowEditPage}">
                            <a href="{languageColumn.pageEditUrl}" class="btn btn-default btn-sm" title="{languageColumn.pageEditTitle}">
                                <core:icon identifier="actions-open" />
                            </a>
                        </f:if>
43
                        <f:if condition="{allowEditContent} && {languageColumn.context.siteLanguage.languageId} && {languageColumn.translationData.untranslatedRecordUids}">
44
                            <a href="#" class="btn btn-default btn-sm t3js-localize disabled"
45
46
                                title="{languageColumn.context.translatePageTitle}"
                                data-page="{languageColumn.context.localizedPageRecord.title}"
47
48
49
50
                                data-has-elements="{languageColumn.translationData.hasTranslations as integer}"
                                data-allow-copy="{languageColumn.allowTranslateCopy as integer}"
                                data-allow-translate="{languageColumn.allowTranslate as integer}"
                                data-table="tt_content"
51
52
53
                                data-page-id="{context.pageId}"
                                data-language-id="{languageColumn.context.siteLanguage.languageId}"
                                data-language-name="{languageColumn.context.siteLanguage.title}">
54
55
56
57
58
59
                                <core:icon identifier="actions-localize" />
                                {languageColumn.translatePageTitle}
                            </a>
                        </f:if>
                    </div>
                    {languageColumn.pageIcon -> f:format.raw()}
60
                    {languageColumn.context.localizedPageTitle}
61
62
63
                </td>
            </f:for>
        </tr>
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
        <f:if condition="{context.drawingConfiguration.defaultLanguageBinding}">
            <f:then>
                <f:variable name="grid" value="{languageColumns.0.grid}" />
                <f:for each="{context.drawingConfiguration.activeColumns}" as="columnNumber">
                    <f:variable name="column" value="{be:languageColumn(languageColumn: languageColumns.0, columnNumber: columnNumber)}" />
                    <tr>
                        <f:for each="{languageColumns}" as="languageColumn">
                            <td data-colpos="{column.columnNumber}">
                                <f:render partial="PageLayout/Grid/ColumnHeader" arguments="{_all}" />
                            </td>
                        </f:for>
                    </tr>
                    <f:for each="{column.items}" as="item" iteration="itemIterator">
                        <tr>
                            <td class="t3-grid-cell" data-colpos="{column.columnNumber}">
                                <f:render partial="PageLayout/Record" arguments="{_all}" />
                            </td>
                            <f:for each="{languageColumns}" as="languageColumn">
                                <f:if condition="{languageColumn.context.siteLanguage.languageId} > 0">
                                    <td class="t3-grid-cell" data-colpos="{column.columnNumber}">
                                        <f:variable name="languageId" value="{languageColumn.context.siteLanguage.languageId}" />
                                        <f:if condition="{languageColumn.translationData.mode} == 'connected'">
                                            <f:then>
                                                <f:if condition="{item.translations.{languageId}}">
                                                    <f:variable name="item" value="{item.translations.{languageId}}" />
                                                    <f:render partial="PageLayout/Record" arguments="{_all}" />
                                                </f:if>
                                            </f:then>
                                            <f:else>
                                                <f:if condition="{itemIterator.isFirst}">
                                                    <f:variable name="languageColumnNonConnected">{languageColumns.{languageId}}</f:variable>
                                                    <f:variable name="column" value="{be:languageColumn(languageColumn: languageColumnNonConnected, columnNumber: columnNumber)}" />
                                                    <f:for each="{column.items}" as="item">
                                                        <f:render partial="PageLayout/Record" arguments="{_all}" />
                                                    </f:for>
                                                </f:if>
                                            </f:else>
                                        </f:if>
                                    </td>
                                </f:if>
                            </f:for>
                        </tr>
                    </f:for>
                </f:for>
            </f:then>
            <f:else>
                <f:for each="{context.drawingConfiguration.activeColumns}" as="columnNumber">
                    <tr>
                        <f:for each="{languageColumns}" as="languageColumn">
                            <f:if condition="{languageColumn.grid.columns}">
                                <f:variable name="grid" value="{languageColumn.grid}" />
                                <f:variable name="column" value="{be:languageColumn(languageColumn: languageColumn, columnNumber: columnNumber)}" />
                                <f:render partial="PageLayout/Grid/Column" arguments="{_all}" />
                            </f:if>
                        </f:for>
                    </tr>
120
                </f:for>
121
122
            </f:else>
        </f:if>
123
124
    </table>
</div>