<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="{$link_base}plugins/xtlive_manager/templates/admin/css/vendor.css" />
    <link rel="stylesheet" type="text/css" href="{$link_base}plugins/xtlive_manager/templates/admin/css/backend.css" />
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
    <script src="{$link_base}plugins/xtlive_manager/templates/admin/javascript/vendor.js"></script>
    <script src="{$link_base}plugins/xtlive_manager/templates/admin/javascript/configurator.js"></script>

	{if $message}
        {literal}
        <script type="text/javascript">
            $(window).load(function(){
                $('#messageModal').modal('show');
            });
        </script>
        {/literal}
    {/if}
	
</head>
{$smarty.session.info_handler}

{assign var=success_message value=true}
{foreach name=aussen from=$configuration item=config}
{if $config.state neq 'ok'}{assign var=success_message value=false}{/if}
{/foreach}

<body>
    <div class="backend manager">
        <nav class="navbar navbar-default navbar-fixed-top">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        <span class="sr-only">Navigation ein-/ausblenden</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="https://www.xtlive.at/" target="_blank">
                        <img alt="logo" src="{$link_base}plugins/xtlive_manager/templates/admin/images/xtlive5.svg">
                    </a>
                </div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <div class="nav navbar-nav">
                        <form method="post" action="{$current_page}">
                            <input type="hidden" name="save" value="1">
                            <input type="hidden" name="action" value="">
                            <button type="button" class="btn btn-default navbar-btn btn-action" data-action="reload"><span class="glyphicon glyphicon-refresh"></span> Neu laden</button>
                            <button type="button" class="btn btn-default navbar-btn btn-action" data-action="cleanCache"><span class="glyphicon glyphicon-repeat"></span> Cache leeren</button>
                        </form>
                    </div>
                    <div class="navbar-right fix-nav navbar-btn">
                        {if $xtlive_template_link}<a href="#" {$xtlive_template_link} class="btn btn-primary">Template</a>{/if}
                        {if $xtlive_elements_link}<a href="#" {$xtlive_elements_link} class="btn btn-primary">Elements</a>{/if}
                        <a href="//www.xtlive.at" target="_blank" class="btn btn-default">www.xtlive.at</a>
                        {*<a href="//xtlive.helpdocs.com" target="_blank" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-info-sign"></span> Support</a>*}
                    </div>
                </div>
            </div>
        </nav>
        <div id="content1" class="container container-main">
            <div class="row">
                <div class="col-md-12">
                    <div class="jumbotron">
                        <h1>Willkommen beim xtlive Manager</h1>
                        {*assign var=currentStoreName value=''}
                        {foreach name=aussen from=$stores item=store}
                        {if $store.id eq $currentStore}
                        {assign var=currentStore value=$store.shop_domain}
                        {/if}
                        {/foreach}
                        <h2 id="current-store">Ihr aktueller Mandant: {$currentStore}</h2>*}
                        <p>Danke, dass Sie sich für xtlive entschieden haben. Sie finden hier unseren <strong>Konfigurationsassistenten</strong>, welcher alle nötigen Abhängigkeiten prüft, damit xtlive reibungslos bei Ihnen funktioniert. Weiters können Sie im <strong>Plugin-Manager</strong> alle gekauften & aktiven Produkte einsehen.<br><br>
                        Es freut uns, Sie in der xtlive Family begrüßen zu dürfen und wünschen Ihnen nun viel Erfolg bei Ihrem neuen Online Shop. Bei Fragen, Wünsche oder Kritik stehen wir Ihnen gerne unter <a href="mailto: help@xtlive.at">help@xtlive.at</a> zur Verfügung.<br><br>
                        Im <a href="http://www.xtlive.at/" target="_blank">xtlive store</a> finden Sie noch weitere interessante Inhaltselemente, die Ihren Shop bereichern könnten.

                        </p>
                        <div class="state-box">
                            {if $success_message}
                            <p><span class="glyphicon glyphicon-ok"></span> Wunderbar alles läuft perfekt! Weiter geht´s! </p>
                            {if $xtlive_template_link}<a href="#" {$xtlive_template_link} class="btn btn-primary"><strong>Template</strong> bearbeiten</a>{/if}
                            {if $xtlive_elements_link}<a href="#" {$xtlive_elements_link} class="btn btn-primary"><strong>Inhalte</strong> befüllen</a>{/if}
                            {else}
                            <p> <span class="glyphicon glyphicon-remove"></span> Bitte überprüfen Sie die Konfiguration, es scheint ein Problem zu geben, unter Informationen finden Sie die nötigen Infos.</p>
                            {/if}
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <iframe id="iframe-news" src="https://www.xtlive.at/news/news5.html" frameborder="0" scrolling="no"></iframe>
        <div id="content2" class="container">
            <div class="row">
                <div id="configurationOverview" class="col-md-12">
                    <h2>xtlive-Konfigurationsassistent:</h2>
                    <div class="panel panel-primary">
                        <div class="panel-heading">Es werden alle nötigen Abhänigkeiten geprüft.</div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-hover">
                                    <thead>
                                    <tr>
                                        <th></th>
                                        <th>Plugin</th>
                                        <th>Version</th>
                                        <th>Hersteller</th>
                                        <th>Information</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {foreach name=aussen from=$configuration item=config}
                                    <tr class="">
                                        <th scope="row"><span class="glyphicon glyphicon-{$config.state}"></span></th>
                                        <td>{$config.name}</td>
                                        <td>{$config.version}</td>
                                        <td><a href="{$config.manufacturer}" target="_blank">{$config.manufacturer}</a></td>
                                        <td>{$config.additionalInfos}</td>
                                    </tr>
                                    {/foreach}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div id="licenseInfo" class="col-md-12">
                    <h2>xtlive-Plugin-Manager:</h2>
                    <div class="panel panel-primary">
                        <div class="panel-heading">Gekaufte und aktive Produkte. </div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-hover">
                                    <thead>
                                    <tr>
                                        <th></th>
                                        <th>Produkt</th>
                                        <th>Version</th>
                                        <th>Lizenz für Shop</th>
                                        <th>Lizenz gültig bis</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {foreach name=aussen from=$xtliveProducts item=xtliveProduct}
                                    <tr class="">
                                        <th scope="row"><span class="glyphicon glyphicon-ok"></span></th>
                                        <td>{$xtliveProduct.name}</td>
                                        <td>{$xtliveProduct.version}</td>
                                        <td>{if $xtliveProduct.licenseInformation.licenseShopType}{$xtliveProduct.licenseInformation.licenseShopType}{else}{txt key=TEXT_XTLIVE_MANAGER_NO_LICENSE_RESTRICTION}{/if}</td>
                                        <td>{if $xtliveProduct.licenseInformation.licenseValidUntil}{$xtliveProduct.licenseInformation.licenseValidUntil}{else}{txt key=TEXT_XTLIVE_MANAGER_NO_LICENSE_RESTRICTION}{/if}</td>
                                    </tr>
                                    {foreach name=innen from=$xtliveProduct.addons item=xtliveProductAddon}
                                        <tr class="">
                                            <th scope="row"><span class="glyphicon glyphicon-ok"></span></th>
                                            <td>{$xtliveProductAddon.name}</td>
                                            <td>{$xtliveProduct.version}</td>
                                            <td>{if $xtliveProductAddon.licenseInformation.licenseShopType}{$xtliveProductAddon.licenseInformation.licenseShopType}{else}{txt key=TEXT_XTLIVE_MANAGER_NO_LICENSE_RESTRICTION}{/if}</td>
                                            <td>{if $xtliveProductAddon.licenseInformation.licenseValidUntil}{$xtliveProductAddon.licenseInformation.licenseValidUntil}{else}{txt key=TEXT_XTLIVE_MANAGER_NO_LICENSE_RESTRICTION}{/if}</td>
                                        </tr>
                                    {/foreach}
                                    {/foreach}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="messageModal" tabindex="-1" role="dialog" aria-labelledby="meinModalLabel" data-message="<div class='text-center'><i class='fa fa-refresh fa-spin'></i> {txt key=TEXT_XTLIVE_MANAGER_WAITING_FOR_RESPONSE}</div>">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Schließen"><span aria-hidden="true">×</span></button>
                        <h4 class="modal-title" id="meinModalLabel">Status</h4>
                    </div>
                    <div class="modal-body">
                        <div id="message">
                            {if $message}
                            {$message}
                            {/if}
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default btn-no-loader" data-dismiss="modal">Schließen</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>