diff --git a/src/bundle/Resources/encore/ez.js.config.js b/src/bundle/Resources/encore/ez.js.config.js index 9f264e4e47..6edef51b0d 100644 --- a/src/bundle/Resources/encore/ez.js.config.js +++ b/src/bundle/Resources/encore/ez.js.config.js @@ -109,11 +109,13 @@ module.exports = (Encore) => { path.resolve(__dirname, '../public/js/scripts/button.state.toggle.js'), path.resolve(__dirname, '../public/js/scripts/button.content.edit.js'), path.resolve(__dirname, '../public/js/scripts/admin.version.edit.conflict.js'), + path.resolve(__dirname, '../public/js/scripts/admin.content.tree.js'), ]) .addEntry('ezplatform-admin-ui-content-draft-list-js', [ path.resolve(__dirname, '../public/js/scripts/button.state.toggle.js'), path.resolve(__dirname, '../public/js/scripts/button.content.edit.js'), path.resolve(__dirname, '../public/js/scripts/admin.version.edit.conflict.js'), + path.resolve(__dirname, '../public/js/scripts/admin.content.tree.js'), ]) .addEntry('ezplatform-admin-ui-content-type-create-js', [ path.resolve(__dirname, '../public/js/scripts/admin.contenttype.selection.js'), @@ -155,17 +157,21 @@ module.exports = (Encore) => { path.resolve(__dirname, '../public/js/scripts/button.content.edit.js'), path.resolve(__dirname, '../public/js/scripts/admin.search.filters.js'), path.resolve(__dirname, '../public/js/scripts/udw/select.location.js'), + path.resolve(__dirname, '../public/js/scripts/admin.content.tree.js'), ]) .addEntry('ezplatform-admin-ui-section-list-js', [ path.resolve(__dirname, '../public/js/scripts/admin.section.list.js'), path.resolve(__dirname, '../public/js/scripts/button.state.toggle.js'), ]) .addEntry('ezplatform-admin-ui-section-view-js', [path.resolve(__dirname, '../public/js/scripts/admin.section.view.js')]) - .addEntry('ezplatform-admin-ui-trash-list-js', [path.resolve(__dirname, '../public/js/scripts/admin.trash.list.js')]) + .addEntry('ezplatform-admin-ui-trash-list-js', [ + path.resolve(__dirname, '../public/js/scripts/admin.trash.list.js'), + path.resolve(__dirname, '../public/js/scripts/admin.content.tree.js'), + ]) .addEntry('ezplatform-admin-ui-content-preview-js', [path.resolve(__dirname, '../public/js/scripts/admin.preview.js')]) .addEntry('ezplatform-admin-ui-location-view-js', [ path.resolve(__dirname, '../public/js/scripts/admin.location.change.language.js'), - path.resolve(__dirname, '../public/js/scripts/admin.location.content.tree.js'), + path.resolve(__dirname, '../public/js/scripts/admin.content.tree.js'), path.resolve(__dirname, '../public/js/scripts/admin.location.view.js'), path.resolve(__dirname, '../public/js/scripts/admin.location.tab.js'), path.resolve(__dirname, '../public/js/scripts/admin.location.visibility.js'), diff --git a/src/bundle/Resources/public/js/scripts/admin.location.content.tree.js b/src/bundle/Resources/public/js/scripts/admin.content.tree.js similarity index 100% rename from src/bundle/Resources/public/js/scripts/admin.location.content.tree.js rename to src/bundle/Resources/public/js/scripts/admin.content.tree.js diff --git a/src/bundle/Resources/public/scss/_view-content.scss b/src/bundle/Resources/public/scss/_content-tree.scss similarity index 82% rename from src/bundle/Resources/public/scss/_view-content.scss rename to src/bundle/Resources/public/scss/_content-tree.scss index ddb643c866..16e297fa7d 100644 --- a/src/bundle/Resources/public/scss/_view-content.scss +++ b/src/bundle/Resources/public/scss/_content-tree.scss @@ -1,6 +1,9 @@ -.ez-content-view { +.ez-content-view, +.ez-bookmark-list-view, +.ez-search-view, +.ez-trash-list-view, +.ez-drafts-list-view { .ez-content-container { - display: flex; min-width: 0; } @@ -12,7 +15,6 @@ background: $ez-white; color: inherit; transition: max-width 0.2s $ez-admin-transition; - margin-bottom: calculateRem(-24px); &--expanded { display: initial; @@ -27,7 +29,7 @@ } } - .ez-location-view-container { + .ez-view-container { flex: 1 1 auto; min-width: 0; } diff --git a/src/bundle/Resources/public/scss/_main-row.scss b/src/bundle/Resources/public/scss/_main-row.scss index c2ae2ba341..6598def848 100644 --- a/src/bundle/Resources/public/scss/_main-row.scss +++ b/src/bundle/Resources/public/scss/_main-row.scss @@ -1,38 +1,13 @@ .ez-main-row { - display: grid; - grid-template-columns: 1fr calculateRem(80px); - grid-template-rows: auto; - grid-template-areas: 'ez-content-container ez-context-menu'; - - .ez-content-container { - grid-area: ez-content-container; - } + display: flex; + flex-wrap: nowrap; + .ez-side-menu, .ez-context-menu { - grid-area: ez-context-menu; - } - - .ez-has-two-sidebars & { - grid-template-columns: calculateRem(80px) 1fr calculateRem(80px); - grid-template-areas: 'ez-side-menu ez-content-container ez-context-menu'; - - .ez-side-menu { - grid-area: ez-side-menu; - } + flex: 0 0 calculateRem(80px); } - .ez-has-no-sidebars & { - grid-template-columns: 1fr; - grid-template-areas: 'ez-content-container'; - - .ez-context-menu, - .ez-side-menu { - display: none; - } - } - - &.ez-dashboard-row { - grid-template-columns: 1fr; - grid-template-areas: 'ez-content-container'; + .ez-content-container { + flex: 1 1 auto; } } diff --git a/src/bundle/Resources/public/scss/ezplatform.scss b/src/bundle/Resources/public/scss/ezplatform.scss index 7b103c5df6..6795079e87 100644 --- a/src/bundle/Resources/public/scss/ezplatform.scss +++ b/src/bundle/Resources/public/scss/ezplatform.scss @@ -71,4 +71,4 @@ @import 'admin.section-view'; @import 'admin.content-type-view'; @import 'main-row'; -@import 'view-content'; +@import 'content-tree'; diff --git a/src/bundle/Resources/views/admin/bookmark/list.html.twig b/src/bundle/Resources/views/admin/bookmark/list.html.twig index 7522d62b0a..371d895169 100644 --- a/src/bundle/Resources/views/admin/bookmark/list.html.twig +++ b/src/bundle/Resources/views/admin/bookmark/list.html.twig @@ -22,72 +22,74 @@ 'attr': { 'class': 'ez-toggle-btn-state', 'data-toggle-button-id': '#bookmark_remove_remove' } }) }} {% include '@ezdesign/parts/table_header.html.twig' with { - ground: 'mt-3', - headerText: 'bookmark.table.header'|trans|desc('Bookmarks') ~ ' (' ~ pager.count ~ ')', - tools: form_widget(form_remove.remove, {'attr': {'class': 'btn btn-danger', 'disabled': true}}) - } %} -
- | - | {{ 'bookmark.list.name'|trans|desc('Name') }} | -{{ 'bookmark.list.content_type'|trans|desc('Content Type') }} | -{{ 'bookmark.list.path'|trans|desc('Path') }} | -- | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
- {{ 'bookmark.list.empty'|trans|desc('The bookmark list is empty. Any Content item you bookmark will end up here.') }} - | -
{{ form_widget(form_remove.bookmarks[bookmark.id]) }} | -- - | -{{ ez_content_name(bookmark.contentInfo) }} | -{{ bookmark.contentType.name }} | -- {% if bookmark.pathLocations|length > 1 %} - {% for location in bookmark.pathLocations %} - {% if loop.revindex > 1 %} - - {{ ez_content_name(location.contentInfo) }} - - {% if loop.revindex > 2 %}/{% endif %} - {% endif %} - {% endfor %} - {% else %} - - - {% endif %} - | -- {% if bookmark.userCanEdit %} - - {% endif %} + | + | + | {{ 'bookmark.list.name'|trans|desc('Name') }} | +{{ 'bookmark.list.content_type'|trans|desc('Content Type') }} | +{{ 'bookmark.list.path'|trans|desc('Path') }} | ++ |
---|---|---|---|---|---|---|---|---|---|---|---|
+ {{ 'bookmark.list.empty'|trans|desc('The bookmark list is empty. Any Content item you bookmark will end up here.') }} |
- | - | {{ 'drafts.list.name'|trans|desc('Name') }} | -{{ 'drafts.list.content_type'|trans|desc('Content Type') }} | -{{ 'drafts.list.modified_language'|trans|desc('Modified Language') }} | -{{ 'drafts.list.version'|trans|desc('Version') }} | -{{ 'drafts.list.last_saved'|trans|desc('Last Saved') }} | -- | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- - {{ 'drafts.list.empty'|trans|desc('The draft list is empty. Any Content draft you create will end up here.') }} - - | -
- {{ form_widget(form_remove.versions[row.id ~ '']) }} - | -- - | -{{ row.name }} | -{{ row.content_type.name }} | -{{ admin_ui_config.languages.mappings[row.language].name }} | -{{ row.version }} | -{{ row.modified|ez_full_datetime }} | -- + | + | + | {{ 'drafts.list.name'|trans|desc('Name') }} | +{{ 'drafts.list.content_type'|trans|desc('Content Type') }} | +{{ 'drafts.list.modified_language'|trans|desc('Modified Language') }} | +{{ 'drafts.list.version'|trans|desc('Version') }} | +{{ 'drafts.list.last_saved'|trans|desc('Last Saved') }} | ++ |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+ + {{ 'drafts.list.empty'|trans|desc('The draft list is empty. Any Content draft you create will end up here.') }} + |
@@ -44,8 +44,8 @@
{% else %}
-
-
-
- {{ 'pagination.viewing'|trans({
- '%viewing%': pager.currentPageResults|length,
- '%total%': pager.nbResults}, 'pagination')|desc('Viewing %viewing% out of %total% items')|raw }}
-
-
-
- {{ pagerfanta(pager, 'ez', {'pageParameter': '[search][page]'}) }}
-
- {% endif %}
+
+ {{ 'pagination.viewing'|trans({
+ '%viewing%': pager.currentPageResults|length,
+ '%total%': pager.nbResults}, 'pagination')|desc('Viewing %viewing% out of %total% items')|raw }}
+
+
+
+ {{ pagerfanta(pager, 'ez', {'pageParameter': '[search][page]'}) }}
+
+ {% endif %}
{% endif %}
{% form_theme form_edit '@ezdesign/parts/form/flat_widgets.html.twig' %}
@@ -91,6 +91,10 @@
{% endblock %}
+{% block react_modules %}
+ {{ encore_entry_script_tags('ezplatform-admin-ui-modules-content-tree-js', null, 'ezplatform') }}
+{% endblock %}
+
{% block javascripts %}
{{ encore_entry_script_tags('ezplatform-admin-ui-search-js', null, 'ezplatform') }}
{% endblock %}
diff --git a/src/bundle/Resources/views/admin/search/search_form.html.twig b/src/bundle/Resources/views/admin/search/search_form.html.twig
index b934d79646..bed8e10c5d 100644
--- a/src/bundle/Resources/views/admin/search/search_form.html.twig
+++ b/src/bundle/Resources/views/admin/search/search_form.html.twig
@@ -3,7 +3,7 @@
{% trans_default_domain 'search' %}
{{ form_start(form) }}
-
+
-
{{ form_widget(form.query) }}
diff --git a/src/bundle/Resources/views/admin/trash/list.html.twig b/src/bundle/Resources/views/admin/trash/list.html.twig
index 4107fe718d..2156e0a528 100644
--- a/src/bundle/Resources/views/admin/trash/list.html.twig
+++ b/src/bundle/Resources/views/admin/trash/list.html.twig
@@ -62,54 +62,56 @@
{% endif %}
+ {{ form_widget(form, {attr: {
+ 'data-is-parent-in-trash': is_parent_in_trash ? '1': '0'
+ }}) }}
+ |
+
+
+ |
+ {{ ez_content_name(trash_item.location.contentInfo) }} |
+ {{ trash_item.contentType.name }} |
+
+ {% if not is_parent_in_trash %}
+ {% include '@ezdesign/parts/path.html.twig' with {'locations': trash_item.ancestors, 'link_last_element': true} %}
+ {% else %}
+ {{ 'trash.item.ancesor_in_trash'|trans|desc('Ancestor is in the Trash') }}
+ {% endif %}
+ |
+
+
+
{% endblock left_sidebar %}
{% endblock content %}
|