Browse Source

Merge branch 'develop'

master
Fab 4 years ago
parent
commit
06740c49f7
4 changed files with 33 additions and 14 deletions
  1. +3
    -1
      ShopBundle/Repository/ProductFamilyRepository.php
  2. +1
    -0
      ShopBundle/Resources/views/backend/order/show-order.html.twig
  3. +19
    -13
      ShopBundle/Resources/views/backend/user/block/user-switch.html.twig
  4. +10
    -0
      ShopBundle/Resources/views/backend/user/list-fields/field-countordershops.html.twig

+ 3
- 1
ShopBundle/Repository/ProductFamilyRepository.php View File

@@ -105,9 +105,11 @@ class ProductFamilyRepository extends BaseRepository implements DefaultRepositor
$query = $this->joinRelations($query) ;

$query->andWhere('e.status = 1');
$query->andWhere('e.title LIKE :terms');
$query->andWhere('e.title LIKE :terms OR cat.title LIKE :terms');
$query->setParameter(':terms', '%'.$terms.'%') ;

$query->groupBy('e.id') ;

if($maxResults) {
$query->setMaxResults($maxResults) ;
}

+ 1
- 0
ShopBundle/Resources/views/backend/order/show-order.html.twig View File

@@ -108,6 +108,7 @@
{% if form_order_send_payment_link is defined %}
{% include '@LcShop/backend/order/form/modal_sendpaymentlink.html.twig' %}
{% endif %}
{% include '@LcShop/backend/order/form/modal_orderstatushistories.html.twig' %}

</div>
</div>

+ 19
- 13
ShopBundle/Resources/views/backend/user/block/user-switch.html.twig View File

@@ -1,15 +1,21 @@

{% if is_granted('ROLE_SUPER_ADMIN') %}
{% if is_dropdown %}
<a class="btn dropdown-item {{ action.css_class|default('btn-default') }}" href="{{ merchantUtils.merchantCurrent.getMerchantConfig('url') }}?_switch_user={{ item.username }}" target="_blank">
{%- 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 {{ 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="{{ merchant.getMerchantConfig('url') }}?_switch_user={{ val }}" target="_blank">
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
</a>
{% endif %}

{% if 'localhost' in app.request.getSchemeAndHttpHost() %}
{% set href = app.request.getSchemeAndHttpHost()~ '?_switch_user='~item.username %}
{% else %}
{% set href = merchantUtils.merchantCurrent.getMerchantConfig('url')~ '?_switch_user='~item.username %}
{% endif %}
{% if is_dropdown %}
<a class="btn dropdown-item {{ action.css_class|default('btn-default') }}" href="{{ href }}"
target="_blank">
{%- 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 {{ 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="{{ href }}" target="_blank">
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
</a>
{% endif %}
{% endif %}

+ 10
- 0
ShopBundle/Resources/views/backend/user/list-fields/field-countordershops.html.twig View File

@@ -0,0 +1,10 @@

{% if value|length > 0 %}
<span class="badge badge-success">
{{ value|length }} commandes
</span>
{% else %}
<span class="badge badge-danger">
0 commandes
</span>
{% endif %}

Loading…
Cancel
Save