{#**
 * 2007-2020 PrestaShop and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2020 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *#}

{% extends app.request.isxmlhttprequest ? '@Modules/ps_mbo/views/templates/admin/layout-ajax.html.twig' : '@PrestaShop/Admin/layout.html.twig' %}

{% block content %}
  {% if recommendedModulesNotInstalled is not empty or recommendedModulesInstalled is not empty %}
  <ul class="nav nav-tabs" role="tablist">
    {% if recommendedModulesNotInstalled is not empty %}
      <li class="nav-item active">
        <a class="nav-link active" data-toggle="tab" href="#tab_modules_list_not_installed" role="tab">
          {{ 'Not Installed'|trans({}) }}
        </a>
      </li>
    {% endif %}
    {% if recommendedModulesInstalled is not empty %}
      <li class="nav-item{% if recommendedModulesNotInstalled is empty %} active{% endif %}">
        <a class="nav-link{% if recommendedModulesNotInstalled is empty %} active{% endif %}" data-toggle="tab" href="#tab_modules_list_installed" role="tab">
          {{ 'Installed'|trans({}) }}
        </a>
      </li>
    {% endif %}
  </ul>
  <div id="modules_list_container_content" class="tab-content">
    {% if recommendedModulesNotInstalled is not empty %}
      <div class="tab-pane active" id="tab_modules_list_not_installed" role="tabpanel">
        <table class="table">
          {% for recommendedModuleNotInstalled in recommendedModulesNotInstalled %}
            {{ include('@PrestaShop/Admin/Module/Includes/tab-module-line.html.twig',{'module': recommendedModuleNotInstalled}) }}
          {% endfor %}
        </table>
      </div>
    {% endif %}
    {% if recommendedModulesInstalled is not empty %}
      <div class="tab-pane {% if recommendedModulesNotInstalled is empty %}active{% endif %}" id="tab_modules_list_installed" role="tabpanel">
        <table class="table">
          {% for recommendedModuleInstalled in recommendedModulesInstalled %}
            {{ include('@PrestaShop/Admin/Module/Includes/tab-module-line.html.twig',{'module': recommendedModuleInstalled}) }}
          {% endfor %}
        </table>
      </div>
    {% endif %}
  </div>
  {% endif %}

  <div class="alert alert-addons row-margin-top" role="alert">
    <p class="alert-text">
      <a href="https://addons.prestashop.com/?utm_source=back-office&amp;utm_medium=dispatch&amp;utm_campaign=back-office-{{ app.request.locale }}&amp;utm_content=download{% if adminListFromSource is defined %}&amp;utm_term={{ adminListFromSource }}{% endif %}" onclick="return !window.open(this.href);">
        {{ 'More modules on addons.prestashop.com'|trans({}) }}
      </a>
    </p>
  </div>
{% endblock %}
