<!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>
<body>
    <div class="backend elements">
        <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 name="reloadForm" action="{$current_page}" method="POST">
                            <input type="hidden" name="action" value="">
                            <input type="hidden" name="xtlive_elements_configuration" value="doAction">
                            <button type="button" data-action="reload" class="btn btn-default btn-action navbar-btn">
                                <span class="glyphicon glyphicon-refresh"></span> Neu laden
                            </button>

                            <button type="button" data-action="cleanCache" class="btn btn-default btn-action navbar-btn">
                                <span class="glyphicon glyphicon-repeat"></span> Cache leeren
                            </button>
                        </form>
                    </div>
                    <div class="navbar-right fix-nav">
                        {if $xtlive_manager_link}<a href="#" {$xtlive_manager_link} class="btn btn-primary">Manager</a>{/if}
                        {if $xtlive_template_link}<a href="#" {$xtlive_template_link} class="btn btn-primary">Template</a>{/if}
                        <form method="post" action="{$current_page}" id="merchantForm" style="display: inline-block;">
                            <input type="hidden" name="xtlive_elements_configuration" value="doAction">
                            <input type="hidden" name="action" value="switchMerchant">
                            <input type="hidden" name="newMerchant" value="">
                            <div class="btn-group navbar-btn">

                                {foreach name=aussen from=$stores item=store}
                                {if $store.id eq $currentStore}
                                {assign var=currentStoreName value=$store.shop_domain}
                                {/if}
                                {/foreach}
                                <button type="button" class="btn btn-primary">{if $currentStoreName neq ''}Mandant: {$currentStoreName} {else}Wählen Sie ihren Mandanten{/if}</button>
                                <button type="button" class="btn btn-primary dropdown-toggle" id="dropdownMerchants" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    <span class="caret"></span>
                                    <span class="sr-only">Menü ein-/ausblenden</span>
                                </button>
                                <ul class="dropdown-menu" aria-labelledby="dropdownMerchants">
                                    {foreach name=aussen from=$stores item=store}
                                    {if $store.id neq $currentStore}
                                    <li><a href="{$store.admin_link}" target="_blank">{$store.shop_domain}</a></li>
                                    {else}
                                    <li><a href="#">{$store.shop_domain}</a></li>
                                    {/if}
                                    {/foreach}
                                </ul>
                            </div>
                        </form>
                        <a href="//www.xtlive.at" target="_blank" class="btn btn-default">www.xtlive.at</a>
                        {*<a href="mailto: help@xtlive.at" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-info-sign"></span> Support</a>*}
                    </div>
                </div>
            </div>
            </form>
        </nav>
        <div class="container container-main">
            <div class="row">
                <div class="col-md-12">
                    <div class="jumbotron">
                        <h1>Willkommen bei xtlive Elements</h1>
                        {if $currentStoreName neq ''}
                        <h2 id="current-store">Ihr aktueller Mandant: {$currentStoreName}</h2>
                        {/if}
                        <p>Befüllen und warten Sie Ihren Shop im Handumdrehen – Seite anlegen – ein oder mehrere gewünschte xtlive Elemente auswählen – hinzufügen und befüllen – so einfach! Weitere Möglichkeiten und Features entnehmen Sie bitte dem Manual.<br><br>Viel Spaß!</p>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <h2>Inhalte:</h2>
                    <div class="panel panel-primary">
                        <div class="panel-heading">Hier finden Sie Ihre gesamten Shop-Inhalte.
                            <a href="#" {$newContentJs} class="btn btn-default btn-sm pull-right"> <span class="glyphicon glyphicon-plus-sign"></span> Weitere <strong>Seite</strong> hinzufügen</a>
                        </div>
                        <div id="panelXtLiveElements" class="panel-body elements control-active helper">
                            <div class="list-group">
                                {foreach name=contentloop from=$contentList item=content}
                                <div class="list-item-element">
                                    <a class="list-group-item" role="button" data-toggle="collapse" href="#collapseXtLifeElements{$content.content_id}" aria-expanded="false" aria-controls="collapseBeispiel"> <span class="badge">{if !$content.xtlive_elements}0{else}{$content.xtlive_elements|@count}{/if}</span> {$content.content_title} </a>
                                    <div class="nav-list-item">
                                        <form name="editParentForm{$content.id}" action="{$current_page}" method="POST">
                                        <input type="hidden" name="action" value="">
                                        <input type="hidden" name="cid" value="{$content.content_id}">
                                        <input type="hidden" name="xtlive_elements_configuration" value="doAction">
                                        <button type="button" class="btn {if $content.content_status eq '1'}btn-success{else}btn-warning{/if} btn-action btn-sm" data-action="toggleState" data-toggle="tooltip" data-placement="top" title="Element{if $content.content_status eq '1'} inaktiv{else} aktiv{/if} setzen"> <span class="glyphicon glyphicon-eye-{if $content.content_status eq '1'}open{else}close{/if}"></span></button>
                                        <a href="#" {$content.editJs} class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="Seite bearbeiten"> <span class="glyphicon glyphicon-cog"></span></a>
                                        <button type="button" class="btn btn-default btn-confirm btn-sm" data-action="delete" data-toggle="tooltip" data-placement="top" title="Seite löschen"> <span class="glyphicon glyphicon-trash"></span></button>
                                        </form>
                                    </div>
                                    <div class="collapse" id="collapseXtLifeElements{$content.content_id}">
                                        <div class="collapse-inner">
                                            <div class="table-responsive">
                                                <table class="table table-hover">
                                                    {if $content.xtlive_elements}
                                                    <caption>Ihre xtlive Elemente auf der Seite: <strong>{$content.content_title}</strong></caption>
                                                    <thead>
                                                    <tr>
                                                        <th>Titel </th>
                                                        <th>Sortieren </th>
                                                        <th>Bearbeiten   </th>
                                                    </tr>
                                                    </thead>
                                                    <tbody>
                                                    {foreach name=xtliveElementsLoop from=$content.xtlive_elements item=xtlive_elements}
                                                    <tr>
                                                        <th scope="row">
                                                            <a {if !$xtlive_elements.content_demo_mode}{$xtlive_elements.editJs}{/if} type="button" class="btn btn-default btn-xs" data-container="body" data-toggle="popover" data-placement="left" data-src="{img img=$xtlive_elements.content_type|cat:'.jpg' type=p plg=$xtlive_elements.plugin subdir=icons path_only=true}" data-alt="{$xtlive_elements.content_title}"> <span class="glyphicon glyphicon-search"></span> </a> <a href="#" {if $xtlive_elements.content_demo_mode}data-toggle="modal" data-target="#demoModal" {else}{$xtlive_elements.editJs}{/if}>{if $xtlive_elements.content_demo_mode eq '1'}DEMO {/if}{$xtlive_elements.content_title} {if $xtlive_elements.content_type}({$xtlive_elements.content_type}){/if}</a>
                                                        </th>
                                                        <td>
                                                            <form name="sortForm{$xtlive_elements.id}" action="{$current_page}" method="POST">
                                                            <input type="hidden" name="action" value="">
                                                            <input type="hidden" name="cid" value="{$xtlive_elements.content_id}">
                                                            <input type="hidden" name="parent" value="{$content.content_id}">
                                                            <input type="hidden" name="xtlive_elements_configuration" value="doAction">
                                                            <button type="button" class="btn btn-default btn-action btn-sm" data-action="sort-up" data-toggle="tooltip" data-placement="top" title="Element sortieren"{if $smarty.foreach.xtliveElementsLoop.first} disabled{/if}><span class="glyphicon glyphicon-chevron-up"></span></button>
                                                            <button type="button" class="btn btn-default btn-action btn-sm" data-action="sort-down" data-toggle="tooltip" data-placement="top" title="Element sortieren"{if $smarty.foreach.xtliveElementsLoop.last} disabled{/if}><span class="glyphicon glyphicon-chevron-down"></span></button>
                                                            </form>
                                                        </td>
                                                        <td>
                                                            <form name="editForm{$xtlive_elements.id}" action="{$current_page}" method="POST">
                                                            <input type="hidden" name="action" value="">
                                                            <input type="hidden" name="cid" value="{$xtlive_elements.content_id}">
                                                            <input type="hidden" name="parent" value="{$content.content_id}">
                                                            <input type="hidden" name="xtlive_elements_configuration" value="doAction">
                                                            <button type="button" class="btn {if $xtlive_elements.content_status eq '1'}btn-success{else}btn-warning{/if} btn-action btn-sm" data-action="toggleState" data-toggle="tooltip" data-placement="top" title="Element{if $xtlive_elements.content_status eq '1'} inaktiv{else} aktiv{/if} setzen"> <span class="glyphicon glyphicon-eye-{if $xtlive_elements.content_status eq '1'}open{else}close{/if}"></span></button>
                                                            <a href="#" {if $xtlive_elements.content_demo_mode}data-toggle="modal" data-target="#demoModal" {else}{$xtlive_elements.editJs}{/if} class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="Element bearbeiten"> <span class="glyphicon glyphicon-pencil"></span></a>
                                                            <button type="button" class="btn btn-default btn-confirm btn-sm" data-action="delete" data-toggle="tooltip" data-placement="top" title="Element löschen"> <span class="glyphicon glyphicon-trash"></span></button>
                                                            {hook key=xtlive_elements_configuration_content_options}
                                                            </form>
                                                        </td>
                                                    </tr>
                                                    {/foreach}
                                                    {else}
                                                    <caption>Derzeit sind keine xtlive Elemente auf der Seite <strong>{$content.content_title}</strong> vorhanden. <br>Diese Seite wird als normale Content-Seite im Webshop dargestellt.</caption>
                                                    {/if}
                                                    </tbody>
                                                </table>
                                            </div>
                                            <button type="button" class="btn btn-primary btn-insert-liveelement btn-md" data-toggle="modal" data-target="#contentElementsModal" data-parent="{$content.content_id}"> <span class="glyphicon glyphicon-plus-sign"></span> {if !$content.xtlive_elements}Neues{else}Weiteres{/if} <strong>xtlive Element</strong> hinzufügen</button>
	                                        <button type="button" class="btn btn-success btn-insert-liveelement btn-md" {$content.newContentJs}> <span class="glyphicon glyphicon-plus-sign"></span> {if !$content.subcontent}Neue{else}Weitere{/if} <strong>Unterseite</strong> hinzufügen</button>
	                                        {if $content.subcontent}
	                                        <hr>
	                                        <p class="sub-titel"> <span class="glyphicon glyphicon-folder-open"></span>  <strong>{$content.content_title}</strong> hat folgende Unterseiten:</p>
	                                        <div class="btn-group sub-group">
		                                        {foreach $content.subcontent as $subContent}
		                                        <button type="button" data-context=".helper" role="button" data-toggle="collapse" href="#collapse-subcontent-{$subContent.content_id}" aria-expanded="false" aria-controls="" class="btn btn-default"><span class="badge">{$subContent.xtlive_elements|count}</span> {$subContent.content_title}</button>
		                                        {/foreach}
	                                        </div>
	                                        {foreach $content.subcontent as $subContent}
	                                        <div class="collapse js-control-collapse" id="collapse-subcontent-{$subContent.content_id}">
		                                        <div class="collapse-inner sub">
			                                        <div class="titel-sub">{$subContent.content_title}
				                                        <div class="nav-list-item">
					                                        <form name="editParentForm{$subContent.id}" action="{$current_page}" method="POST">
						                                        <input type="hidden" name="action" value="">
						                                        <input type="hidden" name="cid" value="{$subContent.content_id}">
						                                        <input type="hidden" name="xtlive_elements_configuration" value="doAction">
						                                        <button type="button" class="btn {if $subContent.content_status eq '1'}btn-success{else}btn-warning{/if} btn-action btn-sm" data-action="toggleState" data-toggle="tooltip" data-placement="top" title="Element{if $subContent.content_status eq '1'} inaktiv{else} aktiv{/if} setzen"> <span class="glyphicon glyphicon-eye-{if $subContent.content_status eq '1'}open{else}close{/if}"></span></button>
						                                        <a href="#" {$subContent.editJs} class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="Seite bearbeiten"> <span class="glyphicon glyphicon-cog"></span></a>
						                                        <button type="button" class="btn btn-default btn-confirm btn-sm" data-action="delete" data-toggle="tooltip" data-placement="top" title="Seite löschen"> <span class="glyphicon glyphicon-trash"></span></button>
					                                        </form>
				                                        </div>
			                                        </div>
			                                        <div class="table-responsive">
				                                        <table class="table table-hover">
					                                        {if $subContent.xtlive_elements}
					                                        <caption>Ihre xtlive Elemente auf der Seite: <strong>{$subContent.content_title}</strong></caption>
					                                        <thead>
					                                        <tr>
						                                        <th>Titel </th>
						                                        <th>Sortieren </th>
						                                        <th>Bearbeiten   </th>
					                                        </tr>
					                                        </thead>
					                                        <tbody>
					                                        {foreach name=xtliveElementsLoop from=$subContent.xtlive_elements item=xtlive_elements}
					                                        <tr>
						                                        <th scope="row">
							                                        <a {if !$xtlive_elements.content_demo_mode}{$xtlive_elements.editJs}{/if} type="button" class="btn btn-default btn-xs" data-container="body" data-toggle="popover" data-placement="left" data-src="{img img=$xtlive_elements.content_type|cat:'.jpg' type=p plg=$xtlive_elements.plugin subdir=icons path_only=true}" data-alt="{$xtlive_elements.content_title}"> <span class="glyphicon glyphicon-search"></span> </a> <a href="#" {if $xtlive_elements.content_demo_mode}data-toggle="modal" data-target="#demoModal" {else}{$xtlive_elements.editJs}{/if}>{if $xtlive_elements.content_demo_mode eq '1'}DEMO {/if}{$xtlive_elements.content_title} {if $xtlive_elements.content_type}({$xtlive_elements.content_type}){/if}</a>
						                                        </th>
						                                        <td>
							                                        <form name="sortForm{$xtlive_elements.id}" action="{$current_page}" method="POST">
								                                        <input type="hidden" name="action" value="">
								                                        <input type="hidden" name="cid" value="{$xtlive_elements.content_id}">
								                                        <input type="hidden" name="parent" value="{$content.content_id}">
								                                        <input type="hidden" name="xtlive_elements_configuration" value="doAction">
								                                        <button type="button" class="btn btn-default btn-action btn-sm" data-action="sort-up" data-toggle="tooltip" data-placement="top" title="Element sortieren"{if $smarty.foreach.xtliveElementsLoop.first} disabled{/if}><span class="glyphicon glyphicon-chevron-up"></span></button>
								                                        <button type="button" class="btn btn-default btn-action btn-sm" data-action="sort-down" data-toggle="tooltip" data-placement="top" title="Element sortieren"{if $smarty.foreach.xtliveElementsLoop.last} disabled{/if}><span class="glyphicon glyphicon-chevron-down"></span></button>
							                                        </form>
						                                        </td>
						                                        <td>
							                                        <form name="editForm{$xtlive_elements.id}" action="{$current_page}" method="POST">
								                                        <input type="hidden" name="action" value="">
								                                        <input type="hidden" name="cid" value="{$xtlive_elements.content_id}">
								                                        <input type="hidden" name="parent" value="{$content.content_id}">
								                                        <input type="hidden" name="xtlive_elements_configuration" value="doAction">
								                                        <button type="button" class="btn {if $xtlive_elements.content_status eq '1'}btn-success{else}btn-warning{/if} btn-action btn-sm" data-action="toggleState" data-toggle="tooltip" data-placement="top" title="Element{if $xtlive_elements.content_status eq '1'} inaktiv{else} aktiv{/if} setzen"> <span class="glyphicon glyphicon-eye-{if $xtlive_elements.content_status eq '1'}open{else}close{/if}"></span></button>
								                                        <a href="#" {if $xtlive_elements.content_demo_mode}data-toggle="modal" data-target="#demoModal" {else}{$xtlive_elements.editJs}{/if} class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="Element bearbeiten"> <span class="glyphicon glyphicon-pencil"></span></a>
								                                        <button type="button" class="btn btn-default btn-confirm btn-sm" data-action="delete" data-toggle="tooltip" data-placement="top" title="Element löschen"> <span class="glyphicon glyphicon-trash"></span></button>
								                                        {hook key=xtlive_elements_configuration_content_options}
							                                        </form>
						                                        </td>
					                                        </tr>
					                                        {/foreach}
					                                        {else}
					                                        <caption>Derzeit sind keine xtlive Elemente auf der Seite <strong>{$subContent.content_title}</strong> vorhanden. <br>Diese Seite wird als normale Content-Seite im Webshop dargestellt.</caption>
					                                        {/if}
					                                        </tbody>
				                                        </table>
			                                        </div>
			                                        <button type="button" class="btn btn-primary btn-insert-liveelement btn-md" data-toggle="modal" data-target="#contentElementsModal" data-parent="{$subContent.content_id}"> <span class="glyphicon glyphicon-plus-sign"></span> {if !$subContent.xtlive_elements}Neues{else}Weiteres{/if} <strong>xtlive Element</strong> hinzufügen</button>
			                                        <button type="button" class="btn btn-success btn-insert-liveelement btn-md" {$subContent.newContentJs}> <span class="glyphicon glyphicon-plus-sign"></span> {if !$subContent.subcontent}Neue{else}Weitere{/if} <strong>Unterseite</strong> hinzufügen</button>

			                                        {if $subContent.subcontent}
			                                        <hr>
			                                        <p class="sub-titel"> <span class="glyphicon glyphicon-folder-open"></span>  <strong>{$subContent.content_title}</strong> hat folgende Unterseiten:</p>
			                                        <div class="btn-group sub-group">
				                                        {foreach $subContent.subcontent as $2ndSubContent}
				                                        <button type="button" data-context=".helper" role="button" data-toggle="collapse" href="#collapse-subcontent-{$2ndSubContent.content_id}" aria-expanded="false" aria-controls="" class="btn btn-default"><span class="badge">{$2ndSubContent.xtlive_elements|count}</span> {$2ndSubContent.content_title}</button>
				                                        {/foreach}
			                                        </div>
			                                        {foreach $subContent.subcontent as $2ndSubContent}
			                                        <div class="collapse js-control-collapse" id="collapse-subcontent-{$2ndSubContent.content_id}">
				                                        <div class="collapse-inner sub">
					                                        <div class="titel-sub">{$2ndSubContent.content_title}
						                                        <div class="nav-list-item">
							                                        <form name="editParentForm{$2ndSubContent.id}" action="{$current_page}" method="POST">
								                                        <input type="hidden" name="action" value="">
								                                        <input type="hidden" name="cid" value="{$2ndSubContent.content_id}">
								                                        <input type="hidden" name="xtlive_elements_configuration" value="doAction">
								                                        <button type="button" class="btn {if $2ndSubContent.content_status eq '1'}btn-success{else}btn-warning{/if} btn-action btn-sm" data-action="toggleState" data-toggle="tooltip" data-placement="top" title="Element{if $2ndSubContent.content_status eq '1'} inaktiv{else} aktiv{/if} setzen"> <span class="glyphicon glyphicon-eye-{if $2ndSubContent.content_status eq '1'}open{else}close{/if}"></span></button>
								                                        <a href="#" {$2ndSubContent.editJs} class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="Seite bearbeiten"> <span class="glyphicon glyphicon-cog"></span></a>
								                                        <button type="button" class="btn btn-default btn-confirm btn-sm" data-action="delete" data-toggle="tooltip" data-placement="top" title="Seite löschen"> <span class="glyphicon glyphicon-trash"></span></button>
							                                        </form>
						                                        </div>
					                                        </div>
					                                        <div class="table-responsive">
						                                        <table class="table table-hover">
							                                        {if $2ndSubContent.xtlive_elements}
							                                        <caption>Ihre xtlive Elemente auf der Seite: <strong>{$2ndSubContent.content_title}</strong></caption>
							                                        <thead>
							                                        <tr>
								                                        <th>Titel </th>
								                                        <th>Sortieren </th>
								                                        <th>Bearbeiten   </th>
							                                        </tr>
							                                        </thead>
							                                        <tbody>
							                                        {foreach name=xtliveElementsLoop from=$2ndSubContent.xtlive_elements item=xtlive_elements}
							                                        <tr>
								                                        <th scope="row">
									                                        <a {if !$xtlive_elements.content_demo_mode}{$xtlive_elements.editJs}{/if} type="button" class="btn btn-default btn-xs" data-container="body" data-toggle="popover" data-placement="left" data-src="{img img=$xtlive_elements.content_type|cat:'.jpg' type=p plg=$xtlive_elements.plugin subdir=icons path_only=true}" data-alt="{$xtlive_elements.content_title}"> <span class="glyphicon glyphicon-search"></span> </a> <a href="#" {if $xtlive_elements.content_demo_mode}data-toggle="modal" data-target="#demoModal" {else}{$xtlive_elements.editJs}{/if}>{if $xtlive_elements.content_demo_mode eq '1'}DEMO {/if}{$xtlive_elements.content_title} {if $xtlive_elements.content_type}({$xtlive_elements.content_type}){/if}</a>
								                                        </th>
								                                        <td>
									                                        <form name="sortForm{$xtlive_elements.id}" action="{$current_page}" method="POST">
										                                        <input type="hidden" name="action" value="">
										                                        <input type="hidden" name="cid" value="{$xtlive_elements.content_id}">
										                                        <input type="hidden" name="parent" value="{$content.content_id}">
										                                        <input type="hidden" name="xtlive_elements_configuration" value="doAction">
										                                        <button type="button" class="btn btn-default btn-action btn-sm" data-action="sort-up" data-toggle="tooltip" data-placement="top" title="Element sortieren"{if $smarty.foreach.xtliveElementsLoop.first} disabled{/if}><span class="glyphicon glyphicon-chevron-up"></span></button>
										                                        <button type="button" class="btn btn-default btn-action btn-sm" data-action="sort-down" data-toggle="tooltip" data-placement="top" title="Element sortieren"{if $smarty.foreach.xtliveElementsLoop.last} disabled{/if}><span class="glyphicon glyphicon-chevron-down"></span></button>
									                                        </form>
								                                        </td>
								                                        <td>
									                                        <form name="editForm{$xtlive_elements.id}" action="{$current_page}" method="POST">
										                                        <input type="hidden" name="action" value="">
										                                        <input type="hidden" name="cid" value="{$xtlive_elements.content_id}">
										                                        <input type="hidden" name="parent" value="{$content.content_id}">
										                                        <input type="hidden" name="xtlive_elements_configuration" value="doAction">
										                                        <button type="button" class="btn {if $xtlive_elements.content_status eq '1'}btn-success{else}btn-warning{/if} btn-action btn-sm" data-action="toggleState" data-toggle="tooltip" data-placement="top" title="Element{if $xtlive_elements.content_status eq '1'} inaktiv{else} aktiv{/if} setzen"> <span class="glyphicon glyphicon-eye-{if $xtlive_elements.content_status eq '1'}open{else}close{/if}"></span></button>
										                                        <a href="#" {if $xtlive_elements.content_demo_mode}data-toggle="modal" data-target="#demoModal" {else}{$xtlive_elements.editJs}{/if} class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="Element bearbeiten"> <span class="glyphicon glyphicon-pencil"></span></a>
										                                        <button type="button" class="btn btn-default btn-confirm btn-sm" data-action="delete" data-toggle="tooltip" data-placement="top" title="Element löschen"> <span class="glyphicon glyphicon-trash"></span></button>
										                                        {hook key=xtlive_elements_configuration_content_options}
									                                        </form>
								                                        </td>
							                                        </tr>
							                                        {/foreach}
							                                        {else}
							                                        <caption>Derzeit sind keine xtlive Elemente auf der Seite <strong>{$subContent.content_title}</strong> vorhanden. <br>Diese Seite wird als normale Content-Seite im Webshop dargestellt.</caption>
							                                        {/if}
							                                        </tbody>
						                                        </table>
					                                        </div>
					                                        <button type="button" class="btn btn-primary btn-insert-liveelement btn-md" data-toggle="modal" data-target="#contentElementsModal" data-parent="{$2ndSubContent.content_id}"> <span class="glyphicon glyphicon-plus-sign"></span> {if !$2ndSubContent.xtlive_elements}Neues{else}Weiteres{/if} <strong>xtlive Element</strong> hinzufügen</button>
					                                        {*<button type="button" class="btn btn-success btn-insert-liveelement btn-md" {$2ndSubContent.newContentJs}> <span class="glyphicon glyphicon-plus-sign"></span> {if !$subContent.subcontent}Neue{else}Weitere{/if} <strong>Unterseite</strong> hinzufügen</button>*}
				                                        </div>
			                                        </div>
			                                        {/foreach}
			                                        {/if}
		                                        </div>
	                                        </div>
	                                        {/foreach}
	                                        {/if}
                                        </div>
                                    </div>
                                </div>
                                {/foreach}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

	    <div class="modal modal--confirm fade" id="confirmModal" role="dialog" aria-labelledby="confirmModalLabel">
            <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="confirmModalLabel">Sind Sie sicher, dass Sie das Element löschen möchten?</h4>
                    </div>
                    <div class="modal-footer">
                        <button type="button" data-dismiss="modal" class="btn btn-default btn-action btn-confirm-target">Ja</button>
                        <button type="button" data-dismiss="modal" class="btn btn-default">Nein</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal modal--liveelements fade" id="contentElementsModal" tabindex="-1" role="dialog" aria-labelledby="contentElementsModalLabel">
            <div class="modal-dialog" role="document">
                <form name="insertLiveElementForm" action="{$current_page}" method="POST">
                    <input type="hidden" name="action" value="insert">
                    <input type="hidden" name="parent" value="">
                    <input type="hidden" name="xtlive_elements_configuration" value="doAction">
                    <input type="hidden" name="is_special_contentelement_status" value="1">
                    <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="contentElementsModalLabel">Wählen Sie Ihr gewünschtes xtlive Element</h4>
                        </div>
                        <div class="modal-body">
                            <div class="row">
                                {foreach name=contentElementsLoop from=$contentElements item=contentElement}
                                <div class="modal--liveelement--preview">
                                    <label class="label-ctype">
                                        <input type="radio" name="ctype" value="{$contentElement.type}">
                                        <figure>
                                            {if $contentElement.icon}
                                            <img src="{$contentElement.iconPath}/{$contentElement.icon}" class="img-responsive">
                                            {else}
                                            <img src="{$defaultIconPath}/t12.jpg" class="img-responsive">
                                            {/if}
                                            <figcaption>{$contentElement.name}</figcaption>
                                        </figure>
                                    </label>
                                </div>
                                {/foreach}
                            </div>
                            <div class="modal-footer">
                                <button type="submit" class="btn btn-primary btn-lg btn-no"> <span class="glyphicon glyphicon-plus-sign"></span> Hinzufügen</button>
                                <button type="button" class="btn btn-default btn-lg" data-dismiss="modal">Schließen</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="modal fade" id="messageModal" tabindex="-1" role="dialog" aria-labelledby="messageModalLabel" data-message="<div class='text-center'><i class='fa fa-refresh fa-spin'></i> {txt key=TEXT_XTLIVE_ELEMENTS_CONFIGURATOR_LOADING_MESSAGE}</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="messageModalLabel">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 class="modal fade" id="demoModal" tabindex="-1" role="dialog" aria-labelledby="demoModalLabel">
            <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="demoModalLabel">Information</h4>
                    </div>
                    <div class="modal-body">
                        <div id="demoMessage">
                            Dies ist ein xtlive Element zu Demonstrationszwecken, welches nur deaktiviert oder gelöscht werden kann.
                            Legen Sie bitte eigene xtlive Elemente an, um diese bearbeiten zu können.
                        </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>