-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path_detail.twig
181 lines (159 loc) · 5.49 KB
/
_detail.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{% extends '_layouts/cp' %}
{% import '_includes/forms' as forms %}
{% do view.registerAssetBundle("acclaro\\translations\\assetbundles\\OrderAsset") %}
{# For Export/Import and regenrate preview url's buttons #}
{% set exportImportStatus = '' %}
{% if not order.isExportImportAllowed %}
{% set exportImportStatus = 'disabled' %}
{% endif %}
{# For checking if form's input fields needs to be disabled #}
{% if not isEditable %}
{% set isEditable = "noClick" %}
{% endif %}
{% set title = (isSubmitted) ? order.title : 'Create a new order' %}
{% block actionButton %}
{% if not isProcessing %}
<div class="translations-loader hidden">
<p class="translations-loader-msg">
{{ 'Please wait and do not close this window until the page finishes loading.'|t }}</p>
</div>
<div class="item" data-position="left" data-colspan="1">
<div class="buttons">
<input type="hidden" id="order-attr" data-status="{{ orderRecentStatus|default('pending') }}" data-isUpdateable="{{ isUpdateable|default('') }}"
data-submitted="{{ isSubmitted }}" data-changed="{{ isChanged }}"
data-has-completed-file="{{ order.hasCompletedFiles }}"
data-is-tm-aligned = "{{ isTargetChanged is empty }}"
data-translator-services={{ translatorServices|json_encode|raw }}
data-translator="{{ order.translator.service|default('export_import') }}"/>
<div id="new-order-button-group" class="btngroup submit"></div>
</div>
</div>
{% endif %}
{% endblock %}
{% set crumbs = [
{ label: 'Translations'|t, url: url('translations') },
{ label: 'Orders'|t, url: url('translations/orders') },
] %}
{% if isSubmitted %}
{% if not isProcessing %}
{% if not isChanged %}
{% if order.requestQuote and (order.isGettingQuote or order.isAwaitingApproval) %}
{% set selectedTab = "quote" %}
{% else %}
{% set selectedTab = "files" %}
{% endif %}
{% endif %}
{% set tabs = {
"order": {label: "Order settings"|t, url: "#order"},
"files": {label: "Order details"|t, url: "#files"},
} %}
{% if order.requestQuote %}
{% set tabs = tabs|merge({
"quote": {label: "Order quote"|t, url: "#quote"}
}) %}
{% endif %}
{% endif %}
{% endif %}
{% block content %}
{% if isProcessing %}
{% if isProcessing == "draft" %}
{% set message = "Due to the large order size, we've added a job to the Queue Manager to create translation drafts" %}
{% elseif isProcessing == "publish" %}
{% set message = "Due to the large order size, we've added a job to the Queue Manager to publish translation drafts" %}
{% elseif isProcessing == "preview" %}
{% set message = "Due to the large order size, we've added a job to the Queue Manager to regenarate preview urls" %}
{% else %}
{% set message = "Due to the large file size, we've added a job to the Queue Manager to process the upload" %}
{% endif %}
<div class="translations-order-confirmation flex">
<div class="fullwidth readable">
<span style="font-size: 48px;line-height: 48px;">🚧</span>
<div class="thank-you">
<h2>Added job to queue</h2>
<p>{{ message }}</p>
</div>
<div class="instructions">
<p>This page should automatically refresh as soon as the job completes.</p>
</div>
</div>
</div>
{% else %}
{% include "translations/_components/orders/settings-tab" %}
{% include "translations/_components/orders/files-tab" %}
{% if order.requestQuote %}
{% include "translations/_components/orders/quote-tab" %}
{% endif %}
{% endif %}
{% endblock %}
{% block details %}
{% include "translations/_components/ads/sidebar" %}
{% include "translations/_components/orders/info-tab" %}
<div id="meta-details" class="meta">
<div class="field">
<div class="heading">
<label>Status</label>
</div>
<div class="value">
<span class="status {{ order.getStatusColour() }}"></span> {{ order.getStatusLabel()|t }}
</div>
</div>
<div class="field">
<div class="heading">
<span>Created At</span>
</div>
<div class="value">
<span> {{ order.dateOrdered ? order.dateOrdered|date('n/j/Y, H:i A') : 'N/A' }} </span>
</div>
</div>
<div class="field">
<div class="heading">
<span>Updated At</span>
</div>
<div class="value">
<span> {{ order.dateUpdated ? order.dateUpdated|date('n/j/Y, H:i A') : 'N/A' }} </span>
</div>
</div>
</div>
<hr>
<h3 class="heading"><b>{{ "Activity Log"|t('app') }}</b></h3>
<div class="data meta read-only activity-log">
<ul class="bullets">
{% if order.isPending() and not orderId %}
<li> {{ 'Pending submission'|t }} </li>
{% else %}
{% for log in order.activityLogs %}
<li>{{ log.created }} – {{ log.message }}</li>
{% endfor %}
{% endif %}
</ul>
</div>
{# Extra Form to facilitate files download using iframe #}
<div class="hidden" style="margin-top: 20px">
<form id="regenerate-preview-urls" class="utility" method="post" accept-charset="UTF-8">
{{ csrfInput() }}
{{ forms.hidden({
name: 'action',
value: 'translations/base/regenerate-preview-urls',
}) }}
{{ forms.hidden({
name: 'orderId',
value: order.id
}) }}
{{ forms.hidden({
name: 'isProcessing',
value: 'preview'
}) }}
</a>
</form>
</div>
{% endblock %}
{% set jsSettings = {
id: 'fields-tags',
name: 'tags',
tagGroupId: tagGroup.id,
sourceElementId: null,
targetSiteId: order.sourceSite
} %}
{% js %}
new Craft.TagSelectInput({{ jsSettings|json_encode|raw }});
{% endjs %}