Skip to content

Commit 8fd3a1c

Browse files
committed
Update Netgen Layouts tab templates to match new Ibexa Admin UI
1 parent 59ada05 commit 8fd3a1c

File tree

6 files changed

+63
-48
lines changed

6 files changed

+63
-48
lines changed

bundle/Resources/views/themes/admin/content/tab/nglayouts/component_layouts.html.twig

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<section class="ibexa-view-rawcontentview">
44
<div class="ibexa-raw-content-title">
5-
<h3>{{ 'component_layouts.title'|trans }}</h3>
5+
<div class="ibexa-raw-content-title__text">{{ 'component_layouts.title'|trans }}</div>
66
</div>
77

8-
<div class="bg-white p-3 mb-5">
9-
{% if component_layouts is not empty %}
8+
{% if component_layouts is not empty %}
9+
<div class="ibexa-content-preview">
1010
<ul class="layout-list">
1111
<li class="layout-list-head">
1212
<div class="layout-name">{{ 'component_layouts.layout_name'|trans }}</div>
@@ -25,8 +25,10 @@
2525
) }}
2626
{% endfor %}
2727
</ul>
28-
{% else %}
28+
</div>
29+
{% else %}
30+
<div class="bg-white p-3 mb-5">
2931
<p>{{ 'component_layouts.no_layouts'|trans }}</p>
30-
{% endif %}
31-
</div>
32+
</div>
33+
{% endif %}
3234
</section>

bundle/Resources/views/themes/admin/content/tab/nglayouts/layout.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
{% if can_edit %}
2121
<div class="layout-actions">
22-
<a href="{{ macros.layout_path(layout.id.toString) }}" class="btn btn-primary btn-sm js-open-ngl">{{ 'layouts.edit_layout'|trans }}</a>
22+
<a href="{{ macros.layout_path(layout.id.toString) }}" class="btn ibexa-btn ibexa-btn--primary ibexa-btn--small js-open-ngl">{{ 'layouts.edit_layout'|trans }}</a>
2323
</div>
2424
{% endif %}
2525

@@ -52,8 +52,8 @@
5252
<p>{{ 'layouts.cache_clear.question'|trans }}</p>
5353
</div>
5454
<div class="modal-footer">
55-
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'layouts.cache_clear.cancel'|trans }}</button>
56-
<button type="button" class="btn btn-primary js-modal-confirm">{{ 'layouts.cache_clear.submit'|trans }}</button>
55+
<button type="button" class="btn ibexa-btn ibexa-btn--secondary" data-dismiss="modal">{{ 'layouts.cache_clear.cancel'|trans }}</button>
56+
<button type="button" class="btn ibexa-btn ibexa-btn--primary js-modal-confirm">{{ 'layouts.cache_clear.submit'|trans }}</button>
5757
</div>
5858
</div>
5959
</div>

bundle/Resources/views/themes/admin/content/tab/nglayouts/layout_wizard.html.twig

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,18 @@
4545
<p class="chosen-group">
4646
{% if value is not empty %}{{ nglayouts_rule_group_name(value) }}{% endif %}
4747
</p>
48-
<button type="button" class="nl-btn nl-btn-primary choose-group">{{ 'layout_wizard.rule_group.button'|trans }}</button>
48+
49+
<button
50+
type="button"
51+
class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small ibexa-btn--prevented choose-group"
52+
>
53+
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--create">
54+
<use xlink:href="{{ ibexa_icon_path('create') }}"></use>
55+
</svg>
56+
<span class="ibexa-btn__label">
57+
{{ 'layout_wizard.rule_group.button'|trans }}
58+
</span>
59+
</button>
4960
</div>
5061
{% endblock %}
5162

@@ -64,6 +75,6 @@
6475
{% endblock %}
6576

6677
{% block buttons %}
67-
<button class="nl-btn action-cancel">{{ 'layout_wizard.button.cancel'|trans }}</button>
68-
<button type="submit" class="nl-btn nl-btn-primary action-apply">{{ 'layout_wizard.button.save'|trans }}</button>
78+
<button class="btn ibexa-btn ibexa-btn--secondary action-cancel">{{ 'layout_wizard.button.cancel'|trans }}</button>
79+
<button type="submit" class="btn ibexa-btn ibexa-btn--primary action-apply">{{ 'layout_wizard.button.save'|trans }}</button>
6980
{% endblock %}

bundle/Resources/views/themes/admin/content/tab/nglayouts/related_layouts.html.twig

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<section class="ibexa-view-rawcontentview">
44
<div class="ibexa-raw-content-title">
5-
<h3>{{ 'related_layouts.title'|trans }}</h3>
5+
<div class="ibexa-raw-content-title__text">{{ 'related_layouts.title'|trans }}</div>
66
</div>
77

8-
<div class="bg-white p-3 mb-5">
9-
{% if related_layouts is not empty %}
8+
{% if related_layouts is not empty %}
9+
<div class="ibexa-content-preview">
1010
<ul class="layout-list">
1111
<li class="layout-list-head">
1212
<div class="layout-name">{{ 'related_layouts.layout_name'|trans }}</div>
@@ -20,8 +20,10 @@
2020
{{ nglayouts_render_layout(related_layout, {}, 'ibexa_admin') }}
2121
{% endfor %}
2222
</ul>
23-
{% else %}
23+
</div>
24+
{% else %}
25+
<div class="bg-white p-3 mb-5">
2426
<p>{{ 'related_layouts.no_related_layouts'|trans }}</p>
25-
{% endif %}
26-
</div>
27+
</div>
28+
{% endif %}
2729
</section>

bundle/Resources/views/themes/admin/content/tab/nglayouts/rule.html.twig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
{% if can_edit %}
4949
<div class="layout-actions">
50-
<a href="{{ macros.layout_path(rule.layout.id.toString) }}" class="btn btn-primary btn-sm js-open-ngl" data-value-id="{{ location.id }}" data-value-type="ibexa_location">{{ 'layouts.edit_layout'|trans }}</a>
50+
<a href="{{ macros.layout_path(rule.layout.id.toString) }}" class="btn ibexa-btn ibexa-btn--primary ibexa-btn--small js-open-ngl" data-value-id="{{ location.id }}" data-value-type="ibexa_location">{{ 'layouts.edit_layout'|trans }}</a>
5151
</div>
5252
{% endif %}
5353

@@ -85,8 +85,8 @@
8585
<p>{{ 'layouts.cache_clear.question'|trans }}</p>
8686
</div>
8787
<div class="modal-footer">
88-
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'layouts.cache_clear.cancel'|trans }}</button>
89-
<button type="button" class="btn btn-primary js-modal-confirm">{{ 'layouts.cache_clear.submit'|trans }}</button>
88+
<button type="button" class="btn ibexa-btn ibexa-btn--secondary" data-dismiss="modal">{{ 'layouts.cache_clear.cancel'|trans }}</button>
89+
<button type="button" class="btn ibexa-btn ibexa-btn--primary js-modal-confirm">{{ 'layouts.cache_clear.submit'|trans }}</button>
9090
</div>
9191
</div>
9292
</div>
@@ -109,8 +109,8 @@
109109
<p>{{ 'layouts.rule.delete_rule.question'|trans }}</p>
110110
</div>
111111
<div class="modal-footer">
112-
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'layouts.rule.delete_rule.cancel'|trans }}</button>
113-
<button type="button" class="btn btn-primary js-modal-confirm">{{ 'layouts.rule.delete_rule.submit'|trans }}</button>
112+
<button type="button" class="btn ibexa-btn ibexa-btn--secondary" data-dismiss="modal">{{ 'layouts.rule.delete_rule.cancel'|trans }}</button>
113+
<button type="button" class="btn ibexa-btn ibexa-btn--primary js-modal-confirm">{{ 'layouts.rule.delete_rule.submit'|trans }}</button>
114114
</div>
115115
</div>
116116
</div>

bundle/Resources/views/themes/admin/content/tab/nglayouts/rules.html.twig

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<section class="ibexa-view-rawcontentview">
44
<div class="ibexa-raw-content-title">
5-
<h3>{{ 'rules.title'|trans }}</h3>
5+
<div class="ibexa-raw-content-title__text">{{ 'rules.title'|trans }}</div>
66

77
{% block extras %}
88
<button
@@ -19,31 +19,31 @@
1919
{% endblock %}
2020
</div>
2121

22-
<div class="ibexa-content-preview">
23-
<div class="bg-white p-3 mb-5">
24-
{% if rules is not empty %}
25-
<ul class="layout-list">
26-
<li class="layout-list-head">
27-
<div class="layout-name">{{ 'rules.mapped_layout'|trans }}</div>
28-
<div class="layout-target">{{ 'rules.targets'|trans }}</div>
29-
<div class="layout-conditions">{{ 'rules.conditions'|trans }}</div>
30-
<div class="layout-actions"></div>
31-
<div class="layout-dropdown"></div>
32-
</li>
22+
{% if rules is not empty %}
23+
<div class="ibexa-content-preview">
24+
<ul class="layout-list">
25+
<li class="layout-list-head">
26+
<div class="layout-name">{{ 'rules.mapped_layout'|trans }}</div>
27+
<div class="layout-target">{{ 'rules.targets'|trans }}</div>
28+
<div class="layout-conditions">{{ 'rules.conditions'|trans }}</div>
29+
<div class="layout-actions"></div>
30+
<div class="layout-dropdown"></div>
31+
</li>
3332

34-
{% for rule in rules %}
35-
<div class="rule{% if not (rules_one_on_one[rule.id.toString] ?? false) %} rule-non-direct{% endif %}" {% if rules_one_on_one is empty %} style="display: block"{% endif %}>
36-
{{ nglayouts_render_rule(rule, { location: location }, 'ibexa_admin') }}
37-
</div>
38-
{% endfor %}
39-
</ul>
33+
{% for rule in rules %}
34+
<div class="rule{% if not (rules_one_on_one[rule.id.toString] ?? false) %} rule-non-direct{% endif %}" {% if rules_one_on_one is empty %} style="display: block"{% endif %}>
35+
{{ nglayouts_render_rule(rule, { location: location }, 'ibexa_admin') }}
36+
</div>
37+
{% endfor %}
38+
</ul>
4039

41-
<div class="show-all-rules">
42-
<label><input type="checkbox" name="show-all-rules" class="rules-checkbox" {% if rules_one_on_one is empty %} checked="checked" {% endif %} /> {{ 'rules.show_all_rules'|trans }}</label>
43-
</div>
44-
{% else %}
45-
<p>{{ 'rules.no_rules'|trans }}</p>
46-
{% endif %}
40+
<div class="show-all-rules">
41+
<label><input type="checkbox" name="show-all-rules" class="rules-checkbox" {% if rules_one_on_one is empty %} checked="checked" {% endif %} /> {{ 'rules.show_all_rules'|trans }}</label>
42+
</div>
4743
</div>
48-
</div>
44+
{% else %}
45+
<div class="bg-white p-3 mb-5">
46+
<p>{{ 'rules.no_rules'|trans }}</p>
47+
</div>
48+
{% endif %}
4949
</section>

0 commit comments

Comments
 (0)