echo '<li class="xSection-' . $sN . '">'; echo '<div class="csHandle"><span class="handle"></span></div>'; echo '<div class="csTitle"><span class="' . $xEditSelectorSimple . ' xProperty-title xNoHTMLEntities xSection-' . $sN . ' xSectionField">' . (!empty($s['title']['value']) ? htmlspecialchars($s['title']['value']) : '') . '</span></div>'; echo '<div class="csBehaviour"><span class="' . $xEditSelectorSelectRC . ' xProperty-type xSection-' . $sN . ' xSectionField" x_options="' . $possibleTypes . '">' . htmlspecialchars($typeTitle) . '</span></div>'; echo '<div class="csDetails">'; if (!empty($typeParams[$type])) { //remove responsive section settings if ($berta->template->settings->get('pageLayout', 'responsive') != 'yes') { unset($typeParams['default']['columns'], $typeParams['default']['entryMaxWidth'], $typeParams['default']['entryPadding'], $typeParams['shop']['columns'], $typeParams['shop']['entryMaxWidth'], $typeParams['shop']['entryPadding']); } foreach ($typeParams[$type] as $pName => $p) { $value = !empty($s[$pName]['value']) ? $s[$pName]['value'] : ''; if (!$value && $p['default']) { $value = $p['default']; } echo BertaEditor::getSettingsItemEditHTML($pName, $p, $value, array('xSection' => $sN, 'xSectionField')); } } echo '</div>'; echo '<div class="csPub"><span class="' . $xEditSelectorYesNo . ' xProperty-published xSection-' . $sN . ' xSectionField">' . (!empty($s['@attributes']['published']) ? '1' : '0') . '</span></div>'; echo '<div class="csClone"><a href="#" class="xSectionClone">' . I18n::_('clone') . '</a></div>'; echo '<div class="csDelete"><a href="#" class="xSectionDelete">' . I18n::_('delete') . '</a></div>'; echo '</li>'; } ?> </ul><br class="clear" /> <a id="xCreateNewSection" class="xPanel" href="#" class="xAction-sectionCreateNew"><span><?php echo I18n::_('create new section'); ?> </span></a>
<p>2. <?php echo I18n::_('What is your name?'); ?> </p> <p class="subInfo"><?php echo I18n::_('It will appear in the copyright notice in the footer. You may leave it blank.'); ?> </p> <?php /* OLD: <p class="xFirstTimeField <?php echo $xEditSelectorSimple ?> xProperty-texts/ownerName xRequired-<?php echo $berta->settings->isRequired('texts', 'ownerName') ? '1': '0' ?>"><?php echo $berta->settings->get('texts', 'ownerName', true) ?></p>*/ ?> <?php echo BertaEditor::getSettingsItemEditHTML('texts/ownerName', $berta->settings->getDefinition('texts', 'ownerName'), $berta->settings->get('texts', 'ownerName', false), array('xCaption' => str_replace(' ', '+', $berta->settings->getDefinitionParam('texts', 'ownerName', 'title'))), "p"); ?> <p>3. <?php echo I18n::_('What is this website about?'); ?> </p> <p class="subInfo"><?php echo I18n::_('It will appear under your site name in search engine results.'); ?> </p> <p class="subInfo"><?php echo I18n::_('Note: the fields that already have value appear yellow only when you roll over them with your mouse. Click on the text below to edit.'); ?> </p>
$returnUpdate = ''; $returnUpdate .= '<div class="csHandle"><span class="handle"></span></div>'; $returnUpdate .= '<div class="csTitle"><span class="' . $xEditSelectorSimple . ' xProperty-title xNoHTMLEntities xSection-' . $sName . '">' . ($isClone ? htmlspecialchars($sTitle) : BertaEditor::getXEmpty('sectionTitle')) . '</span></div>'; $returnUpdate .= '<div class="csBehaviour"><span class="' . $xEditSelectorSelectRC . ' xProperty-type xSection-' . $sName . ' xSectionField" x_options="' . $possibleTypes . '">' . htmlspecialchars($typeValue) . '</span></div>'; $returnUpdate .= '<div class="csDetails">'; if (!empty($typeParams[$defaultType])) { //remove responsive section settings if ($berta->template->settings->get('pageLayout', 'responsive') != 'yes') { unset($typeParams['default']['columns'], $typeParams['default']['entryMaxWidth'], $typeParams['default']['entryPadding'], $typeParams['shop']['columns'], $typeParams['shop']['entryMaxWidth'], $typeParams['shop']['entryPadding']); } foreach ($typeParams[$defaultType] as $pName => $p) { $value = isset($cloneSection[$pName]['value']) && !empty($cloneSection[$pName]['value']) ? $cloneSection[$pName]['value'] : ''; if (!$value && $p['default']) { $value = $p['default']; } $returnUpdate .= BertaEditor::getSettingsItemEditHTML($pName, $p, $value, array('xSection' => $sName, 'xSectionField')); } } $returnUpdate .= '</div>'; $returnUpdate .= '<div class="csPub"><span class="' . $xEditSelectorYesNo . ' xProperty-published xSection-' . $sName . '">' . $published . '</span></div>'; $returnUpdate .= '<div class="csClone"><a href="#" class="xSectionClone">clone</a></div>'; $returnUpdate .= '<div class="csDelete"><a href="#" class="xSectionDelete">delete</a></div>'; $returnReal = $sName; if (!$isClone) { $sectionsList[$sName] = array('@attributes' => array('tags_behavior' => 'invisible', 'published' => 1), 'name' => $sName, 'title' => array('value' => '')); } BertaEditor::saveSections($sectionsList); if ($isClone) { BertaEditor::populateTags($sName, $cloneContent); } }
unset($settings->settingsDefinition['shop']); foreach ($settings->settingsDefinition as $sSectionKey => $sSection) { if (empty($sSection['_']['invisible'])) { $tabCaption = !empty($sSection['_']['title']) ? htmlspecialchars($sSection['_']['title']) : "<em>{$sSectionKey}</em>"; $tabsHTML .= "<li><a href=\"#\" class=\"settingsTab\"" . ($sSectionKey == 'shop' ? ' id="shopSettings"' : '') . ">{$tabCaption}</a></li>"; $contentHTML .= "<div class=\"settingsContent\">\n"; foreach ($sSection as $sKey => $s) { // Dont render keys that start with an underscore if (substr($sKey, 0, 1) != '_') { $contentHTML .= ' <div class="entry">' . "\n"; // caption $contentHTML .= ' <div class="caption">' . ($s['title'] ? $s['title'] : "<em>{$sKey}</em>") . '</div>'; // value $value = $settings->get($sSectionKey, $sKey, false, false); // don't use empty + don't inherit from base $contentHTML .= BertaEditor::getSettingsItemEditHTML($propertyPrefix . $sSectionKey . '/' . $sKey, $s, $value) . "\n"; // description if (!empty($s['description'])) { $contentHTML .= ' <div class="description">' . $s['description'] . '</div>' . "\n"; } $contentHTML .= ' <br class="clear" />' . "\n"; $contentHTML .= "\t</div>\n"; } } $contentHTML .= "</div>\n"; } } echo "<div id=\"settingsContentContainer\" class=\"settingsContentContainer\">\n\t\t\t\t{$contentHTML}\n\n\t\t\t\t<ul id=\"settingsTabs\" class=\"settingsTabs\">{$tabsHTML}<br class=\"clear\" /></ul>\n\n\t\t\t</div>\n"; ?> <br class="clear" /> <hr />