Fab před 4 roky
rodič
revize
cba9147daf
3 změnil soubory, kde provedl 23 přidání a 12 odebrání
  1. +1
    -0
      ShopBundle/Controller/Backend/AdminController.php
  2. +15
    -12
      ShopBundle/Resources/views/backend/default/block/action.html.twig
  3. +7
    -0
      ShopBundle/Resources/views/backend/default/block/action_duplicate_other_hub.html.twig

+ 1
- 0
ShopBundle/Controller/Backend/AdminController.php Zobrazit soubor

@@ -636,6 +636,7 @@ class AdminController extends EasyAdminController
$this->em->persist($newEntity) ;
$this->em->flush() ;

$this->utils->addFlash('warning', "Vous êtes maintenant sur le hub de ".$hub->getTitle());
$redirectUrl = $hub->getMerchantConfig('url').substr($this->generateUrl('easyadmin', ['entity' => $easyadmin['entity']['name'], 'action' => 'edit', 'id' =>$newEntity->getId(), 'referer' =>$refererUrl ]),1);

return $this->redirect($redirectUrl) ;

+ 15
- 12
ShopBundle/Resources/views/backend/default/block/action.html.twig Zobrazit soubor

@@ -1,12 +1,15 @@
{% if is_dropdown %}
<a class="btn dropdown-item {{ action.css_class|default('btn-default') }}" href="{{ action_href }}{{ action.extra_param is defined ? action.extra_param : '' }}" target="{{ action.target }}">
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}
</a>
{% else %}
<a class="btn {{ is_dropdown|default(false) ? 'dropdown-item' }} {{ action.css_class|default('btn-default') }}" data-toggle="tooltip"
title="{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}"
href="{{ action_href }}{{ action.extra_param is defined ? action.extra_param : '' }}" target="{{ action.target }}">
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
</a>
{% endif %}
{% if is_dropdown %}
<a class="btn dropdown-item {{ action.css_class|default('btn-default') }}"
href="{{ action_href }}{{ action.hub is defined ? '&hub='~action.hub : '' }}" target="{{ action.target }}">
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}
</a>
{% else %}
{% set trad = action.label~action.hub|uc_first %}
<a class="btn {{ is_dropdown|default(false) ? 'dropdown-item' }} {{ action.css_class|default('btn-default') }}"
data-toggle="tooltip"
title="{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}"
href="{{ action_href }}{{ action.hub is defined ? '&hub='~action.hub : '' }}" target="{{ action.target }}">
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
</a>
{% endif %}

+ 7
- 0
ShopBundle/Resources/views/backend/default/block/action_duplicate_other_hub.html.twig Zobrazit soubor

@@ -0,0 +1,7 @@
{% for merchant in get_merchants() %}
{% if merchant != merchantUtils.getMerchantUser %}

{% set action = action|merge({ 'hub': merchant.devAlias }) %}
{% include '@LcShop/backend/default/block/action.html.twig' %}
{% endif %}
{% endfor %}

Načítá se…
Zrušit
Uložit