diff --git a/src/Resources/config/app/config.yaml b/src/Resources/config/app/config.yaml
index c5a034db..a28de2bb 100644
--- a/src/Resources/config/app/config.yaml
+++ b/src/Resources/config/app/config.yaml
@@ -1,6 +1,7 @@
imports:
- { resource: "@SetonoSyliusFeedPlugin/Resources/config/grids/setono_sylius_feed_admin_feed.yaml" }
- { resource: "@SetonoSyliusFeedPlugin/Resources/config/grids/setono_sylius_feed_admin_violation.yaml" }
+ - { resource: "@SetonoSyliusFeedPlugin/Resources/config/twig_hooks/*/*.yaml" }
flysystem:
storages:
diff --git a/src/Resources/config/routing/admin.yaml b/src/Resources/config/routing/admin.yaml
index bf9fa8d7..d66f8695 100644
--- a/src/Resources/config/routing/admin.yaml
+++ b/src/Resources/config/routing/admin.yaml
@@ -21,7 +21,7 @@ setono_sylius_feed_admin_feed_show:
_sylius:
section: admin
permission: true
- template: "@SetonoSyliusFeedPlugin/Admin/Feed/show.html.twig"
+ template: "@SyliusAdmin/shared/crud/show.html.twig"
setono_sylius_feed_admin_feed_process:
path: /feeds/{id}/process
diff --git a/src/Resources/config/twig_hooks/feed/show.yaml b/src/Resources/config/twig_hooks/feed/show.yaml
new file mode 100644
index 00000000..5ad9f3fe
--- /dev/null
+++ b/src/Resources/config/twig_hooks/feed/show.yaml
@@ -0,0 +1,42 @@
+sylius_twig_hooks:
+ hooks:
+ sylius_admin.feed.show.content:
+ sections:
+ template: '@SetonoSyliusFeedPlugin/Admin/Feed/Show/content/sections.html.twig'
+ priority: 0
+
+ 'sylius_admin.feed.show.content.header':
+ breadcrumbs:
+ template: '@SyliusAdmin/shared/crud/show/content/header/breadcrumbs.html.twig'
+ priority: 0
+
+ sylius_admin.feed.show.content.header.title_block:
+ actions:
+ template: '@SetonoSyliusFeedPlugin/Admin/Feed/Show/content/header/title_block/actions.html.twig'
+ priority: 0
+
+ 'sylius_admin.feed.show.content.header.title_block.actions':
+ generate_feed:
+ template: '@SetonoSyliusFeedPlugin/Admin/Feed/Show/content/header/title_block/actions/generate_feed.html.twig'
+ priority: 200
+ edit:
+ template: '@SetonoSyliusFeedPlugin/Admin/Feed/Show/content/header/title_block/actions/edit.html.twig'
+ priority: 100
+
+ sylius_admin.feed.show.content.sections:
+ state_info:
+ template: '@SetonoSyliusFeedPlugin/Admin/Feed/Show/content/sections/state_info.html.twig'
+ priority: 100
+ details:
+ template: '@SetonoSyliusFeedPlugin/Admin/Feed/Show/content/sections/details.html.twig'
+ priority: 0
+
+ sylius_admin.feed.show#javascripts:
+ scripts:
+ template: '@SetonoSyliusFeedPlugin/Admin/Feed/Show/scripts.html.twig'
+ priority: 0
+
+ sylius_admin.feed.show#stylesheets:
+ seo:
+ template: '@SetonoSyliusFeedPlugin/Admin/Feed/Show/stylesheets.html.twig'
+ priority: 0
diff --git a/src/Resources/views/Admin/Feed/Show/_breadcrumb.html.twig b/src/Resources/views/Admin/Feed/Show/_breadcrumb.html.twig
deleted file mode 100644
index 076a72ce..00000000
--- a/src/Resources/views/Admin/Feed/Show/_breadcrumb.html.twig
+++ /dev/null
@@ -1,10 +0,0 @@
-{% import '@SyliusAdmin/shared/helper/breadcrumbs.html.twig' as breadcrumb %}
-
-{% set breadcrumbs = [
- { name: 'sylius.ui.administration'|trans, url: path('sylius_admin_dashboard') },
- { name: 'setono_sylius_feed.ui.feeds'|trans, url: path('setono_sylius_feed_admin_feed_index') },
- { name: '#'~feed.id }
-]
-%}
-
-{{ breadcrumb.breadcrumbs(breadcrumbs) }}
diff --git a/src/Resources/views/Admin/Feed/Show/content/header/title_block/actions.html.twig b/src/Resources/views/Admin/Feed/Show/content/header/title_block/actions.html.twig
new file mode 100644
index 00000000..f50fa764
--- /dev/null
+++ b/src/Resources/views/Admin/Feed/Show/content/header/title_block/actions.html.twig
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/Resources/views/Admin/Feed/Show/content/header/title_block/actions/edit.html.twig b/src/Resources/views/Admin/Feed/Show/content/header/title_block/actions/edit.html.twig
new file mode 100644
index 00000000..1ee802d7
--- /dev/null
+++ b/src/Resources/views/Admin/Feed/Show/content/header/title_block/actions/edit.html.twig
@@ -0,0 +1,4 @@
+
+ {{ ux_icon('tabler:pencil', {'class': 'icon dropdown-item-icon'}) }}
+ {{ 'sylius.ui.edit'|trans }}
+
diff --git a/src/Resources/views/Admin/Feed/Show/content/header/title_block/actions/generate_feed.html.twig b/src/Resources/views/Admin/Feed/Show/content/header/title_block/actions/generate_feed.html.twig
new file mode 100644
index 00000000..0683d795
--- /dev/null
+++ b/src/Resources/views/Admin/Feed/Show/content/header/title_block/actions/generate_feed.html.twig
@@ -0,0 +1,4 @@
+
+ {{ ux_icon('tabler:reload', {'class': 'icon dropdown-item-icon'}) }}
+ {{ 'setono_sylius_feed.ui.generate_feed'|trans }}
+
diff --git a/src/Resources/views/Admin/Feed/Show/_header.html.twig b/src/Resources/views/Admin/Feed/Show/content/header/title_block/title.html.twig
similarity index 63%
rename from src/Resources/views/Admin/Feed/Show/_header.html.twig
rename to src/Resources/views/Admin/Feed/Show/content/header/title_block/title.html.twig
index cce09349..0b2abcdf 100644
--- a/src/Resources/views/Admin/Feed/Show/_header.html.twig
+++ b/src/Resources/views/Admin/Feed/Show/content/header/title_block/title.html.twig
@@ -1,13 +1,15 @@
-{# @var \Setono\SyliusFeedPlugin\Model\FeedInterface feed #}
+{% import '@SyliusAdmin/shared/helper/header.html.twig' as header %}
-