<?php
$id = '';
if (!empty($this->zoneconfig['conf']['id'])) {
$id = ' id="' . $this->siteId . '_' . $this->zoneconfig['conf']['id'] . '"';
}
$data_melisKey = $this->melisKey;
?>
<?php if(!empty($this->siteId)) { ?>
<div data-melisKey='<?= $data_melisKey; ?>'<?= $id; ?> class="tab-pane widget-body-regular meliscms_center_tabs">
<div class="widget widget-tabs widget-tabs-double widget-tabs-responsive margin-none border-none">
<div class="widget-body innerAll inner-2x">
<div class="tab-header-title-container">
<div class="row">
<div class="col-md-12">
<h3 class="float-left"><?= $this->translate('tr_melis_cms_sites_properties'); ?></h3>
</div>
</div>
</div>
<div class="tab-pane active">
<div class="row">
<div class="col-md-4 col-lg-4 col-sm-12">
<?php
$form = $this->propertiesForm;
$form->prepare();
foreach($form->getElements() as $element => $attributes) {
$el = $form->get((string) $element);
if ($el->getName() == "site_id") {
$el->setValue($this->siteId);
}
if ($el->getName() == "site_id_disp") {
$el->setValue($this->siteId);
}
$el->setName("siteprop_".$el->getName());
$el->setAttribute('id', $el->getName());
}
$form->setAttribute('id', $form->getAttribute('id') . '_' . $this->siteId);
echo $this->form()->openTag($form);
echo $this->melisFieldCollection($form);
echo $this->form()->closeTag();
?>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="tab-header-title-container" style="margin-top:15px;">
<div class="row">
<div class="col-md-12">
<h3 class="float-left"><?= $this->translate('tr_melis_cms_sites_homepages'); ?></h3>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-2">
<div class="product-text-tab-container" >
<ul class="nav-tabs product-text-tab meliscms-site-language-homepage-list">
<?php foreach($this->activeSiteLangs as $lang) :?>
<li class="">
<a class="clearfix" data-toggle="tab" id="cms_homepages_lang_<?= $lang['slang_lang_id'] ?>" href="#<?= $lang['lang_cms_locale']; ?>-log-type-details-<?= $this->siteId; ?>" aria-expanded="true" data-env-id="<?= $lang['slang_lang_id'] ?>">
<span class="float-right">
<img src="<?= $this->serverUrl() . '/MelisCms/images/lang-flags/' . $lang['lang_cms_locale'] . '.png' ?>" class="float-right">
</span>
<span><?= $lang['lang_cms_name'] ?></span>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="col-xs-12 col-md-3">
<div class="tab-content">
<?php foreach ($this->activeSiteLangs as $lang) : ?>
<div id="<?= $lang['lang_cms_locale']; ?>-log-type-details-<?= $this->siteId; ?>" class="tab-pane product-text-tab-content">
<div class="bg-white">
<h4 class=""><i class="fa fa-map-marker"></i> <?= $lang['lang_cms_name']; ?></h4>
</div>
<div id="cms_sites_homepages_<?= $lang['slang_lang_id']; ?>">
<?php
$form = clone $this->homepageForm;
foreach ($form->getElements() as $element => $attributes) {
$el = $form->get((string) $element);
foreach ($this->siteLangHomepages as $siteLangHomepage) {
if ($siteLangHomepage['shome_lang_id'] == $lang['slang_lang_id']) {
$el->setValue($siteLangHomepage[$el->getName()]);
}
if ($el->getName() == 'shome_id') {
if ($siteLangHomepage['shome_lang_id'] == $lang['slang_lang_id']) {
$el->setValue($siteLangHomepage['shome_id']);
}
}
}
if ($el->getName() == 'shome_site_id') {
$el->setValue($this->siteId);
}
if ($el->getName() == 'shome_lang_id') {
$el->setValue($lang['slang_lang_id']);
}
$el->setAttribute('data-lang', $lang['lang_cms_name']);
$el->setName($lang['slang_lang_id']."_".$el->getName());
$el->setAttribute('id', $el->getName());
}
$form->setAttribute('id', $form->getAttribute('id') . '_' . $this->siteId);
echo $this->form()->openTag($form);
echo $this->melisFieldCollection($form);
echo $this->form()->closeTag();
?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
|