custom/plugins/TopdataTopFinderProSW6/src/Resources/views/storefront/component/device/box.html.twig line 1

Open in your IDE?
  1. <div class="top-finder-device-box {% if device.id == currentDeviceId %}top-finder-device-box-current{% endif %}">
        <a class="top-finder-device-href" href="{{ path('frontend.top_finder.device', {deviceCode:device.code}) }}">
            <div class="top-finder-device-box-header">
                <span class="top-finder-device-list-icon top-finder-device-list-icon-{{ device.id }}"
                      style="{% if not device.inDeviceList %}display:none;{% endif %}"
                      title="{{ 'topdata-topfinder.inDeviceList'|trans|replace({'"':''}) }}"
                      >
                    {% sw_icon 'checkmark-circle' style { 'pack':'solid', 'class':'success' } %}
                </span>
                {% if device.brand %}
                    {{ device.brand.name~' ' }}
                {% endif %}
                {{ device.model }}
            </div>
            <div class="top-finder-device-box-image">
                {% set cover = device.media %}
    
                {% if cover.url %}
                    {% set attributes = {
                        'class': 'product-image is-standart',
                        'alt': device.model,
                        'title': device.model
                    } %}
    
                    {% sw_thumbnails 'product-image-thumbnails' with {
                        media: cover,
                        sizes: {
                            'xs': '501px',
                            'sm': '315px',
                            'md': '427px',
                            'lg': '333px',
                            'xl': '284px'
                        }
                    } %}
                {% else %}
                    <div class="product-image-placeholder">
                        {% sw_icon 'placeholder' style {
                            'size': 'fluid'
                        } %}
                    </div>
                {% endif %}
            </div>
        </a>
            <div class="top-finder-device-box-buttons">
                <div class="top-finder-device-box-buttons-inner">
                    {% if showDevicelistButtons %}
                    {% if customer and (not customer.guest) %}
                        <button 
                            class="btn btn-primary top-finder-add-device top-finder-add-device-{{ device.id }}" 
                            data-deviceid="{{ device.id }}"
                            data-path="{{ path('frontend.top_finder.add-device', {deviceId: device.id}) }}"
                            data-loading="false"
                            title="{{ 'topdata-topfinder.deviceListAddButton'|trans|replace({'"':''}) }}"
                            {% if device.inDeviceList %}style="display:none;"{% endif %}
                        >
                            {% sw_icon 'plus-block' %}&nbsp;&nbsp;{{ "topdata-topfinder.deviceListLink"|trans }}
                        </button>
                        <a href="{{ path('frontend.account.devicelist.page') }}#top-finder-device-{{ device.id }}"
                            class="btn btn-primary top-finder-devicelist-device top-finder-devicelist-device-{{ device.id }}"
                            title="{{ "topdata-topfinder.showDeviceInDeviceListText"|trans|sw_sanitize }}"
                            {% if not device.inDeviceList %}
                                style="display:none;"
                            {% endif %}
                        >
                            {{ "topdata-topfinder.showDeviceInDeviceListTitle"|trans|sw_sanitize }}
                        </a>
                        <button 
                            class="btn btn-light top-finder-remove-device top-finder-remove-device-{{ device.id }}" 
                            data-deviceid="{{ device.id }}"
                            data-path="{{ path('frontend.top_finder.remove-device', {deviceId: device.id}) }}"
                            data-loading="false"
                            title="{{ 'topdata-topfinder.deviceListRemoveButton'|trans|replace({'"':''}) }}"
                            {% if not device.inDeviceList %}
                                style="display:none;"
                            {% else %}
                                data-confirm="{{ "topdata-topfinder.confirmDeleteFromDeviceList"|trans|sw_sanitize }}"
                            {% endif %}
                        >
                            {% sw_icon 'minus-block' %}
                        </button>
                    {%  else %}
                        <button class="btn btn-primary"
                            type="button"
                            data-toggle="modal"
                            data-target="#devicelist-needlogin-popup">
                            {% sw_icon 'plus-block' %}&nbsp;&nbsp;{{ "topdata-topfinder.deviceListLink"|trans|sw_sanitize }}
                        </button>
                    {% endif %}
                    {% endif %}
                    {% if historyButton %}
                        <a class="btn btn-light"
                           href="{{ path('frontend.top_finder.history-remove', {deviceId: device.id}) }}"
                           title="{{ 'topdata-topfinder.historyRemove'|trans|replace({'"':''}) }}"
                           >
                            {% sw_icon 'x' %}
                        </a>
                    {% endif %}
                </div>
            </div>
    </div>