<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<title>STV ADMIN {% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="/images/favicon.png">
{% block stylesheets %}
{{ encore_entry_link_tags('index') }}
{% endblock %}
<script>
var sspmgr = {
roles: {% if app.user %}{{ app.user.roles | json_encode | raw}}{% else %}[]{% endif %}
}
</script>
{% block javascripts %}
{{ encore_entry_script_tags('index') }}
{% endblock %}
</head>
<body>
<nav class="stv-grey" role="navigation">
<div class="nav-wrapper">
<a id="logo-container" href="/" class="brand-logo">
<img src="/images/logo.png" /><span>SSP</span>
</a>
<a class="user right tooltipped {{ app.user ? : 'empty' }}" href="/logout" data-position="bottom" data-margin="20" data-tooltip="Logout {{ app.user }}">
<svg style="width:24px;height:24px" viewBox="0 0 24 24">
<path fill="currentColor" d="M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" />
</svg>
</a>
<ul class="right hide-on-med-and-down">
{% if is_granted('ROLE_USER') %}
<li><a href="/publisher" {% if app.request.get('_route') starts with 'app_publisher' or app.request.get('_route') starts with 'app_inventory'%}class="stv-pink-text"{%endif%}>Inventory</a></li>
<li><a class="dropdown-trigger {% if app.request.get('_route') starts with 'app_demand' %}stv-pink-text{%endif%}" href="#!" data-target="dsp-dropdown">
Demand
<span class="white-text">
<svg style="width:15px;height:15px;" viewBox="5 4 12 12">
<path fill="currentColor" d="M7,10L12,15L17,10H7Z" />
</svg>
</span>
</a></li>
{% endif %}
</ul>
<ul id="nav-mobile" class="sidenav stv-grey">
{% if is_granted('ROLE_USER') %}
{# <li><a href="/dashboard" class="{% if app.request.get('_route') starts with 'app_dashboard' %}stv-pink-text{%else%}white-text{%endif%}">Dashboard</a></li>#}
<li><a href="/publisher" {% if app.request.get('_route') starts with 'app_publisher' or app.request.get('_route') starts with 'app_inventory'%}class="stv-pink-text"{%endif%}>Inventory</a></li>
{% for item in dsp.getList %}
<li><a href="/demand/{{ item.id }}/general" class="{% if app.request.attributes.get('_route_params')['slug'] is defined and app.request.attributes.get('_route_params')['slug'] is same as(item.id) %}stv-pink-text{%else%}white-text{%endif%}">{{ item.name }}</a></li>
{% endfor %}
{% endif %}
</ul>
<a href="#" data-target="nav-mobile" class="sidenav-trigger">
<svg style="" viewBox="0 0 24 24">
<path fill="currentColor" d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" />
</svg>
</a>
</div>
</nav>
<ul id="dsp-dropdown" class="dropdown-content stv-grey">
{% if dsps is defined %}
{% for dsp in dsps%}
{% if is_granted('ROLE_ADMIN') %}
<li><a href="/demand/{{ dsp.id }}/general" class=" white-text" style="font-size:15px">{{ dsp.name }}</a></li>
{% else %}
<li><a href="/demand/{{ dsp.id }}/deals" class=" white-text" style="font-size:15px">{{ dsp.name }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
<section id="stv-content">
{% if app.request.get('_route') starts with 'app_publisher' or app.request.get('_route') starts with 'app_inventory'%}
<div class="subnavigation" style="box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14)">
<div class="items" ref="items">
<a href="/publisher">Publisher</a>
<a href="/inventory">Inventory Groups</a>
</div>
<div class="indicator" style="left: {{ app.request.get('_route') starts with 'app_publisher' ? 0 : 50 }}%; width: 50%;"></div>
</div>
{% endif %}
{% block content %}{% endblock %}
</section>
<div class="stv-separator"></div>
<footer class="stv-grey right-align">
© {{ "now"|date("Y") }} <a class="stv-pink-text" href="https://smartstream.tv" target="_blank">SMARTSTREAM.TV</a>
</footer>
</body>
</html>