<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* tool/ajax/nrps.html.twig */
class __TwigTemplate_33aeff3b2185056c96ee1e8c80b3f05bfcc048af404f4c167db344f8f30c40da extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "tool/ajax/nrps.html.twig"));

        // line 1
        echo "<br/>
<div class=\"card bg-light\">
    <div class=\"card-header d-flex justify-content-between align-items-center\">
        <div>
            <i class=\"fas fa-users\"></i>&nbsp;NRPS service response
        </div>
        <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
            <button class=\"btn btn-info text-white\" data-toggle=\"modal\" data-target=\"#nrpsResponseDetailsModal\">
                <i class=\"fas fa-info-circle\"></i>&nbsp;Details
            </button>
        </div>
    </div>
    <div class=\"list-group list-group-flush\">
        ";
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 14, $this->source); })()), "members", [], "any", false, false, false, 14));
        $context['_iterated'] = false;
        foreach ($context['_seq'] as $context["_key"] => $context["member"]) {
            // line 15
            echo "            <a class=\"list-group-item list-group-item-action clickable\" data-toggle=\"modal\" data-target=\"#nrpsMemberModal\" data-nrps=\"";
            echo twig_escape_filter($this->env, json_encode(twig_get_attribute($this->env, $this->source, $context["member"], "properties", [], "any", false, false, false, 15), (twig_constant("JSON_PRETTY_PRINT") + twig_constant("JSON_UNESCAPED_SLASHES"))), "html", null, true);
            echo "\">
                ";
            // line 16
            if ((twig_get_attribute($this->env, $this->source, $context["member"], "status", [], "any", false, false, false, 16) == "Active")) {
                // line 17
                echo "                    <span class=\"badge badge-success\"><i class=\"fas fa-user-check\"></i></span>
                ";
            } else {
                // line 19
                echo "                    <span class=\"badge badge-secondary\"><i class=\"fas fa-user-times\"></i></span>
                ";
            }
            // line 21
            echo "                &nbsp;";
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["member"], "userIdentity", [], "any", false, false, false, 21), "name", [], "any", false, false, false, 21), "html", null, true);
            echo "
                <small class=\"text-muted\">
                    (<code>";
            // line 23
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["member"], "userIdentity", [], "any", false, false, false, 23), "identifier", [], "any", false, false, false, 23), "html", null, true);
            echo "</code> / ";
            echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["member"], "userIdentity", [], "any", false, true, false, 23), "email", [], "any", true, true, false, 23)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["member"], "userIdentity", [], "any", false, true, false, 23), "email", [], "any", false, false, false, 23), "no email")) : ("no email")), "html", null, true);
            echo ")
                </small>
            </a>
        ";
            $context['_iterated'] = true;
        }
        if (!$context['_iterated']) {
            // line 27
            echo "            <a class=\"list-group-item list-group-item-dark\">
                <i class=\"fas fa-ban\"></i>&nbsp;No members found
            </a>
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['member'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 31
        echo "    </div>
    <div class=\"card-footer text-muted\">
        <small>NRPS service response: ";
        // line 33
        echo twig_escape_filter($this->env, twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 33, $this->source); })()), "members", [], "any", false, false, false, 33)), "html", null, true);
        echo " member(s) found</small>
    </div>
</div>
<div class=\"modal fade\" id=\"nrpsResponseDetailsModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"nrpsResponseDetailsModalLabel\" aria-hidden=\"true\">
    <div class=\"modal-dialog modal-lg\" role=\"document\">
        <div class=\"modal-content\">
            <div class=\"modal-header bg-light\">
                <h5 class=\"modal-title\" id=\"nrpsResponseDetailsModalLabel\">
                    <i class=\"fas fa-info-circle\"></i>&nbsp;NRPS service response
                </h5>
                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
                    <span aria-hidden=\"true\">&times;</span>
                </button>
            </div>
            <div class=\"modal-body bg-light\">
                <div class=\"row\">
                    <div class=\"col col-md6\">
                        <dl class=\"list-unstyled\">
                            <dt>Membership identifier</dt>
                            <dd><code>";
        // line 52
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 52, $this->source); })()), "identifier", [], "any", false, false, false, 52), "html", null, true);
        echo "</code></dd>
                        </dl>
                    </div>
                    <div class=\"col col-md6\">
                        <dl class=\"list-unstyled\">
                            <dt>Membership context</dt>
                            <dd>
                                <ul>
                                    <li>Identifier: <code>";
        // line 60
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 60, $this->source); })()), "context", [], "any", false, false, false, 60), "identifier", [], "any", false, false, false, 60), "html", null, true);
        echo "</code></li>
                                    <li>Label: ";
        // line 61
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 61, $this->source); })()), "context", [], "any", false, false, false, 61), "label", [], "any", false, false, false, 61), "html", null, true);
        echo "</li>
                                    <li>Title: ";
        // line 62
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 62, $this->source); })()), "context", [], "any", false, false, false, 62), "title", [], "any", false, false, false, 62), "html", null, true);
        echo "</li>
                                </ul>
                            </dd>
                        </dl>
                    </div>
                </div>
                <div class=\"row\">
                    <div class=\"col col-md12\">
                        <dl class=\"list-unstyled\">
                            <dt>Relation Link</dt>
                            <dd>
                                ";
        // line 73
        if (twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 73, $this->source); })()), "relationLink", [], "any", false, false, false, 73)) {
            // line 74
            echo "                                    <div class=\"input-group\">
                                        <div class=\"input-group-prepend\">
                                            <a class=\"btn btn-secondary\" href=\"#\" id=\"nrpsLinkUpdate\" data-link=\"";
            // line 76
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 76, $this->source); })()), "relationLinkUrl", [], "any", false, false, false, 76), "html", null, true);
            echo "\" title=\"Use url\">
                                                <i class=\"fas fa-external-link-alt\"></i>
                                            </a>
                                        </div>
                                        <input type=\"text\" class=\"form-control\" placeholder=\"token\" value=\"";
            // line 80
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 80, $this->source); })()), "relationLink", [], "any", false, false, false, 80), "html", null, true);
            echo "\" readonly>
                                    </div>
                                ";
        } else {
            // line 83
            echo "                                    <input type=\"text\" class=\"form-control\" placeholder=\"token\" value=\"n/a\" readonly>
                                ";
        }
        // line 85
        echo "                                <small id=\"nrpsLinkUpdate_user_help\" class=\"form-text text-muted\">
                                    Has next: <span class=\"badge badge-";
        // line 86
        echo ((twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 86, $this->source); })()), "hasNext", [], "any", false, false, false, 86)) ? ("success") : ("secondary"));
        echo "\">";
        echo ((twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 86, $this->source); })()), "hasNext", [], "any", false, false, false, 86)) ? ("yes") : ("no"));
        echo "</span>,&nbsp;
                                    has differences: <span class=\"badge badge-";
        // line 87
        echo ((twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 87, $this->source); })()), "hasDifferences", [], "any", false, false, false, 87)) ? ("success") : ("secondary"));
        echo "\">";
        echo ((twig_get_attribute($this->env, $this->source, (isset($context["membership"]) || array_key_exists("membership", $context) ? $context["membership"] : (function () { throw new RuntimeError('Variable "membership" does not exist.', 87, $this->source); })()), "hasDifferences", [], "any", false, false, false, 87)) ? ("yes") : ("no"));
        echo "</span>
                                </small>
                            </dd>
                        </dl>
                    </div>
                </div>
                <dl class=\"list-unstyled\">

            </div>
            <div class=\"modal-footer bg-light\">
                <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Close</button>
            </div>
        </div>
    </div>
</div>
<script>
    \$(\"#nrpsLinkUpdate\").click(function(){
        \$(\"#nrpsUrl\").val(\$(\"#nrpsLinkUpdate\").data(\"link\"));
        \$('#nrpsResponseDetailsModal').modal('hide')
    });
</script>
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "tool/ajax/nrps.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  192 => 87,  186 => 86,  183 => 85,  179 => 83,  173 => 80,  166 => 76,  162 => 74,  160 => 73,  146 => 62,  142 => 61,  138 => 60,  127 => 52,  105 => 33,  101 => 31,  92 => 27,  81 => 23,  75 => 21,  71 => 19,  67 => 17,  65 => 16,  60 => 15,  55 => 14,  40 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<br/>
<div class=\"card bg-light\">
    <div class=\"card-header d-flex justify-content-between align-items-center\">
        <div>
            <i class=\"fas fa-users\"></i>&nbsp;NRPS service response
        </div>
        <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
            <button class=\"btn btn-info text-white\" data-toggle=\"modal\" data-target=\"#nrpsResponseDetailsModal\">
                <i class=\"fas fa-info-circle\"></i>&nbsp;Details
            </button>
        </div>
    </div>
    <div class=\"list-group list-group-flush\">
        {% for member in membership.members %}
            <a class=\"list-group-item list-group-item-action clickable\" data-toggle=\"modal\" data-target=\"#nrpsMemberModal\" data-nrps=\"{{ member.properties|json_encode(constant('JSON_PRETTY_PRINT') + constant('JSON_UNESCAPED_SLASHES')) }}\">
                {% if member.status == \"Active\" %}
                    <span class=\"badge badge-success\"><i class=\"fas fa-user-check\"></i></span>
                {% else %}
                    <span class=\"badge badge-secondary\"><i class=\"fas fa-user-times\"></i></span>
                {% endif %}
                &nbsp;{{ member.userIdentity.name }}
                <small class=\"text-muted\">
                    (<code>{{ member.userIdentity.identifier }}</code> / {{ member.userIdentity.email|default('no email') }})
                </small>
            </a>
        {% else %}
            <a class=\"list-group-item list-group-item-dark\">
                <i class=\"fas fa-ban\"></i>&nbsp;No members found
            </a>
        {% endfor %}
    </div>
    <div class=\"card-footer text-muted\">
        <small>NRPS service response: {{ membership.members|length }} member(s) found</small>
    </div>
</div>
<div class=\"modal fade\" id=\"nrpsResponseDetailsModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"nrpsResponseDetailsModalLabel\" aria-hidden=\"true\">
    <div class=\"modal-dialog modal-lg\" role=\"document\">
        <div class=\"modal-content\">
            <div class=\"modal-header bg-light\">
                <h5 class=\"modal-title\" id=\"nrpsResponseDetailsModalLabel\">
                    <i class=\"fas fa-info-circle\"></i>&nbsp;NRPS service response
                </h5>
                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
                    <span aria-hidden=\"true\">&times;</span>
                </button>
            </div>
            <div class=\"modal-body bg-light\">
                <div class=\"row\">
                    <div class=\"col col-md6\">
                        <dl class=\"list-unstyled\">
                            <dt>Membership identifier</dt>
                            <dd><code>{{ membership.identifier }}</code></dd>
                        </dl>
                    </div>
                    <div class=\"col col-md6\">
                        <dl class=\"list-unstyled\">
                            <dt>Membership context</dt>
                            <dd>
                                <ul>
                                    <li>Identifier: <code>{{ membership.context.identifier }}</code></li>
                                    <li>Label: {{ membership.context.label }}</li>
                                    <li>Title: {{ membership.context.title }}</li>
                                </ul>
                            </dd>
                        </dl>
                    </div>
                </div>
                <div class=\"row\">
                    <div class=\"col col-md12\">
                        <dl class=\"list-unstyled\">
                            <dt>Relation Link</dt>
                            <dd>
                                {% if membership.relationLink %}
                                    <div class=\"input-group\">
                                        <div class=\"input-group-prepend\">
                                            <a class=\"btn btn-secondary\" href=\"#\" id=\"nrpsLinkUpdate\" data-link=\"{{ membership.relationLinkUrl }}\" title=\"Use url\">
                                                <i class=\"fas fa-external-link-alt\"></i>
                                            </a>
                                        </div>
                                        <input type=\"text\" class=\"form-control\" placeholder=\"token\" value=\"{{ membership.relationLink }}\" readonly>
                                    </div>
                                {% else %}
                                    <input type=\"text\" class=\"form-control\" placeholder=\"token\" value=\"n/a\" readonly>
                                {% endif %}
                                <small id=\"nrpsLinkUpdate_user_help\" class=\"form-text text-muted\">
                                    Has next: <span class=\"badge badge-{{ membership.hasNext ? 'success' : 'secondary' }}\">{{ membership.hasNext ? 'yes' : 'no' }}</span>,&nbsp;
                                    has differences: <span class=\"badge badge-{{ membership.hasDifferences ? 'success' : 'secondary' }}\">{{ membership.hasDifferences ? 'yes' : 'no' }}</span>
                                </small>
                            </dd>
                        </dl>
                    </div>
                </div>
                <dl class=\"list-unstyled\">

            </div>
            <div class=\"modal-footer bg-light\">
                <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Close</button>
            </div>
        </div>
    </div>
</div>
<script>
    \$(\"#nrpsLinkUpdate\").click(function(){
        \$(\"#nrpsUrl\").val(\$(\"#nrpsLinkUpdate\").data(\"link\"));
        \$('#nrpsResponseDetailsModal').modal('hide')
    });
</script>
", "tool/ajax/nrps.html.twig", "C:\\wamp64\\www\\devkit-lti1p3-master-tool\\templates\\tool\\ajax\\nrps.html.twig");
    }
}
