private function pageBody(PageController $controller) { ?> <!-- ADMIN PAGE CONTENT --> <ol class="breadcrumb small"> <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?> </a></li> <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?> </a></li> <li class="active"><?php echo $controller->getPageTitle(); ?> </li> </ol> <h2><?php echo $controller->getPageTitle(); ?> </h2> <form class="form-inline" method="post"> <?php echo Filter::getCsrf(); ?> <input type="hidden" name="save" value="1"> <!-- SHOW PDF --> <div class="form-group"> <label class="control-label"> <?php echo I18N::translate('Access level'); ?> </label> <?php echo FunctionsEdit::editFieldAccessLevel('NEW_FTV_PDF_ACCESS_LEVEL', $this->getSetting('FTV_PDF_ACCESS_LEVEL'), 'class="form-control"'); ?> </div> <!-- BUTTONS --> <button class="btn btn-primary" type="submit"> <i class="fa fa-check"></i> <?php echo I18N::translate('save'); ?> </button> </form> <?php }
private function edit() { global $WT_TREE; if (webtrees\Filter::postBool('save') && webtrees\Filter::checkCsrf()) { $block_id = webtrees\Filter::post('block_id'); if ($block_id) { webtrees\Database::prepare("UPDATE `##block` SET gedcom_id=NULLIF(?, ''), block_order=? WHERE block_id=?")->execute(array(webtrees\Filter::post('gedcom_id'), (int) webtrees\Filter::post('block_order'), $block_id)); } else { webtrees\Database::prepare("INSERT INTO `##block` (gedcom_id, module_name, block_order) VALUES (NULLIF(?, ''), ?, ?)")->execute(array(webtrees\Filter::post('gedcom_id'), $this->getName(), (int) webtrees\Filter::post('block_order'))); $block_id = webtrees\Database::getInstance()->lastInsertId(); } $this->setBlockSetting($block_id, 'menu_title', webtrees\Filter::post('menu_title')); $this->setBlockSetting($block_id, 'menu_address', webtrees\Filter::post('menu_address')); $this->setBlockSetting($block_id, 'menu_access', webtrees\Filter::post('menu_access')); $languages = array(); foreach (webtrees\I18N::installedLocales() as $locale) { if (webtrees\Filter::postBool('lang_' . $locale->languageTag())) { $languages[] = $locale->languageTag(); } } $this->setBlockSetting($block_id, 'languages', implode(',', $languages)); $this->config(); } else { $block_id = webtrees\Filter::get('block_id'); $controller = new webtrees\Controller\PageController(); $controller->restrictAccess(webtrees\Auth::isEditor($WT_TREE)); if ($block_id) { $controller->setPageTitle(webtrees\I18N::translate('Edit menu')); $menu_title = $this->getBlockSetting($block_id, 'menu_title'); $menu_address = $this->getBlockSetting($block_id, 'menu_address'); $menu_access = $this->getBlockSetting($block_id, 'menu_access'); $block_order = webtrees\Database::prepare("SELECT block_order FROM `##block` WHERE block_id=?")->execute(array($block_id))->fetchOne(); $gedcom_id = webtrees\Database::prepare("SELECT gedcom_id FROM `##block` WHERE block_id=?")->execute(array($block_id))->fetchOne(); } else { $controller->setPageTitle(webtrees\I18N::translate('Add menu')); $menu_access = 1; $menu_title = ''; $menu_address = ''; $block_order = webtrees\Database::prepare("SELECT IFNULL(MAX(block_order)+1, 0) FROM `##block` WHERE module_name=?")->execute(array($this->getName()))->fetchOne(); $gedcom_id = $WT_TREE->getTreeId(); } $controller->pageHeader(); ?> <ol class="breadcrumb small"> <li><a href="admin.php"><?php echo webtrees\I18N::translate('Control panel'); ?> </a></li> <li><a href="admin_modules.php"><?php echo webtrees\I18N::translate('Module administration'); ?> </a></li> <li><a href="module.php?mod=<?php echo $this->getName(); ?> &mod_action=admin_config"><?php echo webtrees\I18N::translate($this->getTitle()); ?> </a></li> <li class="active"><?php echo $controller->getPageTitle(); ?> </li> </ol> <form class="form-horizontal" method="POST" action="#" name="menu" id="menuForm"> <?php echo webtrees\Filter::getCsrf(); ?> <input type="hidden" name="save" value="1"> <input type="hidden" name="block_id" value="<?php echo $block_id; ?> "> <h3><?php echo webtrees\I18N::translate('General'); ?> </h3> <div class="form-group"> <label class="control-label col-sm-3" for="menu_title"> <?php echo webtrees\I18N::translate('Title'); ?> </label> <div class="col-sm-9"> <input class="form-control" id="menu_title" size="90" name="menu_title" required type="text" value="<?php echo webtrees\Filter::escapeHtml($menu_title); ?> " > </div> <span class="help-block col-sm-9 col-sm-offset-3 small text-muted"> <?php echo webtrees\I18N::translate('Add your menu title here'); ?> </span> </div> <div class="form-group"> <label class="control-label col-sm-3" for="menu_address"> <?php echo webtrees\I18N::translate('Menu address'); ?> </label> <div class="col-sm-9"> <input class="form-control" id="menu_address" size="90" name="menu_address" required type="text" value="<?php echo webtrees\Filter::escapeHtml($menu_address); ?> " > </div> <span class="help-block col-sm-9 col-sm-offset-3 small text-muted"> <?php echo webtrees\I18N::translate('Add your menu address here'); ?> </span> </div> <h3><?php echo webtrees\I18N::translate('Languages'); ?> </h3> <div class="form-group"> <label class="control-label col-sm-3" for="lang_*"> <?php echo webtrees\I18N::translate('Show this menu for which languages?'); ?> </label> <div class="col-sm-9"> <?php $accepted_languages = explode(',', $this->getBlockSetting($block_id, 'languages')); foreach (webtrees\I18N::installedLocales() as $locale) { ?> <div class="checkbox"> <label title="<?php echo $locale->languageTag(); ?> "> <input type="checkbox" name="lang_<?php echo $locale->languageTag(); ?> " <?php echo in_array($locale->languageTag(), $accepted_languages) ? 'checked' : ''; ?> ><?php echo $locale->endonym(); ?> </label> </div> <?php } ?> </div> </div> <h3><?php echo webtrees\I18N::translate('Visibility and Access'); ?> </h3> <div class="form-group"> <label class="control-label col-sm-3" for="block_order"> <?php echo webtrees\I18N::translate('Menu position'); ?> </label> <div class="col-sm-9"> <input class="form-control" id="position" name="block_order" size="3" required type="number" value="<?php echo webtrees\Filter::escapeHtml($block_order); ?> " > </div> <span class="help-block col-sm-9 col-sm-offset-3 small text-muted"> <?php echo webtrees\I18N::translate('This field controls the order in which the menu items are displayed.'), '<br><br>', webtrees\I18N::translate('You do not have to enter the numbers sequentially. If you leave holes in the numbering scheme, you can insert other menu items later. For example, if you use the numbers 1, 6, 11, 16, you can later insert menu items with the missing sequence numbers. Negative numbers and zero are allowed, and can be used to insert menu items in front of the first one.'), '<br><br>', webtrees\I18N::translate('When more than one menu item has the same position number, only one of these menu items will be visible.'); ?> </span> </div> <div class="form-group"> <label class="control-label col-sm-3" for="block_order"> <?php echo webtrees\I18N::translate('Menu visibility'); ?> </label> <div class="col-sm-9"> <?php echo webtrees\Functions\FunctionsEdit::selectEditControl('gedcom_id', webtrees\Tree::getIdList(), webtrees\I18N::translate('All'), $WT_TREE->getTreeId(), 'class="form-control"'); ?> </div> <span class="help-block col-sm-9 col-sm-offset-3 small text-muted"> <?php echo webtrees\I18N::translate('You can determine whether this menu item will be visible regardless of family tree, or whether it will be visible only to the current family tree.'); ?> </span> </div> <div class="form-group"> <label class="control-label col-sm-3" for="menu_access"> <?php echo webtrees\I18N::translate('Access level'); ?> </label> <div class="col-sm-9"> <?php echo webtrees\Functions\FunctionsEdit::editFieldAccessLevel('menu_access', $menu_access, 'class="form-control"'); ?> </div> </div> <div class="row col-sm-9 col-sm-offset-3"> <button class="btn btn-primary" type="submit"> <i class="fa fa-check"></i> <?php echo webtrees\I18N::translate('save'); ?> </button> <button class="btn" type="button" onclick="window.location='<?php echo $this->getConfigLink(); ?> ';"> <i class="fa fa-close"></i> <?php echo webtrees\I18N::translate('cancel'); ?> </button> </div> </form> <?php } }
"></td> <td class="col-xs-5"> <table class="table"> <tbody> <?php foreach (Tree::getAll() as $tree) { ?> <tr> <td> <?php echo $tree->getTitleHtml(); ?> </td> <td> <?php echo FunctionsEdit::editFieldAccessLevel('access-' . $module->getName() . '-' . $tree->getTreeId(), $module->getAccessLevel($tree, 'sidebar')); ?> </td> </tr> <?php } ?> </tbody> </table> </td> </tr> <?php } ?> </tbody> </table>
/** * {@inhericDoc} * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() */ protected function renderContent() { if (Module::getModuleByName('ckeditor')) { CkeditorModule::enableEditor($this->ctrl); } /** @var AbstractModule $module */ $module = $this->data->get('module'); ?> <ol class="breadcrumb small"> <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?> </a></li> <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?> </a></li> <li class="active"><?php echo $this->data->get('title'); ?> </li> </ol> <h1><?php echo $this->data->get('title'); ?> </h1> <form method="post" class="form-horizontal"> <?php echo Filter::getCsrf(); ?> <input type="hidden" name="action" value="update"> <h3><?php echo I18N::translate('Titles'); ?> </h3> <!-- MAJ_TITLE_PREFIX --> <div class="form-group"> <label for="MAJ_TITLE_PREFIX" class="col-sm-3 control-label"> <?php echo I18N::translate('Title prefixes'); ?> </label> <div class="col-sm-9"> <input type="text" class="form-control" dir="auto" id="MAJ_TITLE_PREFIX" name="MAJ_TITLE_PREFIX" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_TITLE_PREFIX')); ?> " maxlength="255" placeholder="de |d'|du |of |von |vom |am |zur |van |del |della |t'|da |ten |ter |das |dos |af "> <p class="small text-muted"> <?php echo I18N::translate('Set possible aristocratic particles to separate titles from the land they refer to (e.g. Earl <strong>of</strong> Essex). Variants must be separated by the character |.'); ?> <br /> <?php echo I18N::translate('An example for this setting is : <strong>de |d\'|du |of |von |vom |am |zur |van |del |della |t\'|da |ten |ter |das |dos |af </strong> (covering some of French, English, German, Dutch, Italian, Spanish, Portuguese, Swedish common particles).'); ?> </p> </div> </div> <h3><?php echo I18N::translate('Header'); ?> </h3> <!-- MAJ_ADD_HTML_HEADER --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_ADD_HTML_HEADER"> <?php echo I18N::translate('Include additional HTML in header'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldYesNo('MAJ_ADD_HTML_HEADER', $module->getSetting('MAJ_ADD_HTML_HEADER', 0), 'class="radio-inline"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Enable this option to include raw additional HTML in the header of the page.'); ?> </p> </div> </div> <!-- MAJ_SHOW_HTML_HEADER --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_SHOW_HTML_HEADER"> <?php echo I18N::translate('Hide additional header'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldAccessLevel('MAJ_SHOW_HTML_HEADER', $module->getSetting('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE), 'class="form-control"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Select the access level until which the additional header should be displayed. The <em>Hide from everyone</em> should be used to show the header to everybody.'); ?> </p> </div> </div> <!-- MAJ_HTML_HEADER --> <div class="form-group"> <label for="MAJ_HTML_HEADER" class="col-sm-3 control-label"> <?php echo I18N::translate('Additional HTML in header'); ?> </label> <div class="col-sm-9"> <textarea class="form-control html-edit" rows="10" dir="auto" id="MAJ_HTML_HEADER" name="MAJ_HTML_HEADER" ><?php echo Filter::escapeHtml($module->getSetting('MAJ_HTML_HEADER')); ?> </textarea> <p class="small text-muted"> <?php echo I18N::translate('If the option has been enabled, the saved HTML will be inserted in the header.'); ?> <br> <?php echo I18N::translate('In edit mode, the HTML characters might have been transformed to their HTML equivalents (for instance &gt; for >), it is however possible to insert HTML characters, they will be automatically converted to their equivalent values.'); ?> </p> </div> </div> <h3><?php echo I18N::translate('Footer'); ?> </h3> <!-- MAJ_DISPLAY_CNIL --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_DISPLAY_CNIL"> <?php echo I18N::translate('Display French <em>CNIL</em> disclaimer'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldYesNo('MAJ_DISPLAY_CNIL', $module->getSetting('MAJ_DISPLAY_CNIL', 0), 'class="radio-inline"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Enable this option to display an information disclaimer in the footer required by the French <em>CNIL</em> for detaining personal information on users.'); ?> </p> </div> </div> <!-- MAJ_CNIL_REFERENCE --> <div class="form-group"> <label for="MAJ_CNIL_REFERENCE" class="col-sm-3 control-label"> <?php echo I18N::translate('<em>CNIL</em> reference'); ?> </label> <div class="col-sm-9"> <input type="text" class="form-control" dir="auto" id="MAJ_CNIL_REFERENCE" name="MAJ_CNIL_REFERENCE" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_CNIL_REFERENCE')); ?> " maxlength="255"> <p class="small text-muted"> <?php echo I18N::translate('If the website has been notified to the French <em>CNIL</em>, an authorisation number may have been delivered. Providing this reference will display a message in the footer visible to all users.'); ?> </p> </div> </div> <!-- MAJ_ADD_HTML_FOOTER --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_ADD_HTML_FOOTER"> <?php echo I18N::translate('Include additional HTML in footer'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldYesNo('MAJ_ADD_HTML_FOOTER', $module->getSetting('MAJ_ADD_HTML_FOOTER', 0), 'class="radio-inline"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Enable this option to include raw additional HTML in the footer of the page.'); ?> </p> </div> </div> <!-- MAJ_SHOW_HTML_FOOTER --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_SHOW_HTML_FOOTER"> <?php echo I18N::translate('Hide additional footer'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldAccessLevel('MAJ_SHOW_HTML_FOOTER', $module->getSetting('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE), 'class="form-control"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Select the access level until which the additional footer should be displayed. The <em>Hide from everyone</em> should be used to show the footer to everybody.'); ?> </p> </div> </div> <!-- MAJ_HTML_FOOTER --> <div class="form-group"> <label for="MAJ_HTML_FOOTER" class="col-sm-3 control-label"> <?php echo I18N::translate('Additional HTML in footer'); ?> </label> <div class="col-sm-9"> <textarea class="form-control html-edit" rows="10" dir="auto" id="MAJ_HTML_FOOTER" name="MAJ_HTML_FOOTER" ><?php echo Filter::escapeHtml($module->getSetting('MAJ_HTML_FOOTER')); ?> </textarea> <p class="small text-muted"> <?php echo I18N::translate('If the option has been enabled, the saved HTML will be inserted in the footer, before the logo.'); ?> <br> <?php echo I18N::translate('In edit mode, the HTML characters might have been transformed to their HTML equivalents (for instance &gt; for >), it is however possible to insert HTML characters, they will be automatically converted to their equivalent values.'); ?> </p> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <button type="submit" class="btn btn-primary"> <i class="fa fa-check"></i> <?php echo I18N::translate('save'); ?> </button> </div> </div> </form> <?php }
private function pageBody(PageController $controller) { $FTV_SETTINGS = unserialize($this->getSetting('FTV_SETTINGS')); ?> <!-- ADMIN PAGE CONTENT --> <ol class="breadcrumb small"> <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?> </a></li> <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?> </a></li> <li class="active"><?php echo $controller->getPageTitle(); ?> </li> </ol> <h2><?php echo $controller->getPageTitle(); ?> </h2> <!-- *** FORM 1 *** --> <form class="form-horizontal" method="post" name="form1"> <?php echo Filter::getCsrf(); ?> <!-- SELECT TREE --> <div class="form-group"> <label class="control-label col-sm-2" for="tree"> <?php echo I18N::translate('Family tree'); ?> </label> <div class="col-sm-4"> <select id="tree" name="NEW_FIB_TREE" class="form-control"> <?php foreach (Tree::getAll() as $tree) { ?> <?php if ($tree->getTreeId() == $this->tree_id) { ?> <option value="<?php echo $tree->getTreeId(); ?> " data-ged="<?php echo $tree->getNameHtml(); ?> " selected="selected"> <?php echo $tree->getTitleHtml(); ?> </option> <?php } else { ?> <option value="<?php echo $tree->getTreeId(); ?> " data-ged="<?php echo $tree->getNameHtml(); ?> "> <?php echo $tree->getTitleHtml(); ?> </option> <?php } ?> <?php } ?> </select> </div> </div> </form> <!-- PANEL GROUP ACCORDION --> <div class="panel-group" id="accordion"> <!-- PANEL 1 --> <div class="panel panel-default" id="panel1"> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" data-target="#collapseOne" href="#"> <?php echo I18N::translate('Pages'); ?> </a> </h4> </div> <div id="collapseOne" class="panel-collapse collapse in"> <div class="panel-body"> <?php if (empty($FTV_SETTINGS) || !empty($FTV_SETTINGS) && !$this->searchArray($FTV_SETTINGS, 'TREE', $this->tree_id)) { ?> <div class="alert alert-info alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="' . I18N::translate('close') . '"> <span aria-hidden="true">×</span> </button> <p class="small text-muted"> <?php echo I18N::translate('Use the search form below to search for a root person. After a successful search the Fancy Treeview page will be automatically created. You can add as many root persons as you want.'); ?> </p> </div> <?php } ?> <!-- *** FORM 2 *** --> <div id="ftv-search-form" class="form-group alert alert-info"> <form class="form-inline" method="post" name="form2"> <!-- SURNAME SEARCH FIELD --> <div class="form-group"> <label class="control-label"> <?php echo I18N::translate('Search root person'); ?> </label> <input class="form-control" data-autocomplete-type="SURN" id="surname-search" name="SURNAME" placeholder="<?php echo I18N::translate('Surname'); ?> " type="text" > <label class="checkbox-inline"> <?php echo FunctionsEdit::checkbox('soundex_std') . I18N::translate('Russell'); ?> </label> <label class="checkbox-inline"> <?php echo FunctionsEdit::checkbox('soudex_dm') . I18N::translate('Daitch-Mokotoff'); ?> </label> <button name="search" class="btn btn-primary" type="submit"> <i class="fa fa-search"></i> <?php echo I18N::translate('search'); ?> </button> </div> <!-- PID SEARCH FIELD --> <?php $class = I18N::direction() === 'rtl' ? 'pull-left' : 'pull-right'; ?> <div class="form-group <?php echo $class; ?> "> <label class="control-label" for="pid-search"> <?php echo I18N::translate('Or enter an ID'); ?> </label> <input class="form-control" data-autocomplete-type="INDI" id="pid-search" name="PID" placeholder="<?php echo I18N::translate('Search ID by name'); ?> " type="text" value="" > <button name="Ok" class="btn btn-primary" type="submit"> <i class="fa fa-check"></i> <?php echo I18N::translate('ok'); ?> </button> </div> </form> <!-- *** FORM 3 *** --> <form class="form-horizontal" method="post" name="form3"> <!-- TABLE --> <table id="search-result-table" class="table" style="display: none"> <thead> <tr> <th><?php echo I18N::translate('Root person'); ?> </th> <?php if (!$this->options('use_fullname')) { ?> <th><?php echo I18N::translate('Surname in page title'); ?> </th> <?php } ?> <th><?php echo I18N::translate('Page title'); ?> </th> <th><?php echo I18N::translate('Access level'); ?> </th> <th><?php echo I18N::translate('Add'); ?> </th> </tr> </thead> <tbody> <tr> <!-- ROOT PERSONS FULL NAME --> <td id="root"> <?php if ($this->options('use_fullname')) { ?> <input name="surname" type="hidden" value="" > <?php } ?> <input name="pid" type="hidden" value="" > <input name="sort" type="hidden" value="" > <span></span> </td> <?php if (!$this->options('use_fullname')) { ?> <!-- SURNAME IN PAGE TITLE --> <td id="surn"> <label class="showname"></label> <input class="form-control editname" name="surname" type="text" value="" > </td> <?php } ?> <!-- PAGE TITLE --> <td id="title"></td> <!-- ACCESS LEVEL --> <td> <?php echo FunctionsEdit::editFieldAccessLevel('access_level', 2, 'class="form-control"'); ?> </td> <!-- ADD BUTTON --> <td> <button type="submit" name="add" class="btn btn-success btn-sm" title="<?php I18N::translate('Add'); ?> "> <i class="fa fa-plus"></i> </button> </td> </tr> </tbody> </table> </form> </div> <?php echo $this->addMessage("error", "danger", true); ?> <?php echo $this->addMessage('update-settings', 'success', true, I18N::translate('The settings for this tree are succesfully updated')); ?> <div id="fancy-treeview-form" class="form-group"> <?php if (!empty($FTV_SETTINGS) && $this->searchArray($FTV_SETTINGS, 'TREE', $this->tree_id)) { ?> <form class="form-horizontal" method="post" name="form4"> <!-- TABLE --> <table id="fancy-treeview-table" class="table table-hover"> <thead> <tr> <th><?php echo I18N::translate('Root person'); ?> </th> <?php if (!$this->options('use_fullname')) { ?> <th><?php echo I18N::translate('Surname in page title'); ?> </th> <?php } ?> <th><?php echo I18N::translate('Page title'); ?> </th> <th><?php echo I18N::translate('Access level'); ?> </th> <th><?php echo I18N::translate('Delete'); ?> </th> </tr> </thead> <tbody> <?php foreach ($FTV_SETTINGS as $key => $this_ITEM) { ?> <?php if ($this_ITEM['TREE'] == $this->tree_id) { ?> <?php if (Individual::getInstance($this_ITEM['PID'], $this->tree)) { ?> <tr class="sortme"> <!-- ROOT PERSONS FULL NAME --> <td> <input name="pid[<?php echo $key; ?> ]" type="hidden" value="<?php echo $this_ITEM['PID']; ?> " > <input name="sort[<?php echo $key; ?> ]" type="hidden" value="<?php echo $this_ITEM['SORT']; ?> " > <?php echo Individual::getInstance($this_ITEM['PID'], $this->tree)->getFullName() . ''; ?> (<?php echo Individual::getInstance($this_ITEM['PID'], $this->tree)->getLifeSpan(); ?> ) </td> <?php if (!$this->options('use_fullname')) { ?> <!-- SURNAME IN PAGE TITLE --> <td> <label class="showname"> <?php echo $this_ITEM['SURNAME']; ?> </label> <input class="form-control editname" name="surname[<?php echo $key; ?> ]" type="text" value="<?php echo $this_ITEM['SURNAME']; ?> " > </td> <?php } ?> <!-- PAGE TITLE --> <td> <a href="module.php?mod=<?php echo $this->getName(); ?> &mod_action=page&ged=<?php echo $this->tree->getNameHtml(); ?> &rootid=<?php echo $this_ITEM['PID']; ?> " target="_blank"> <?php if ($this->options('use_fullname') == true) { echo I18N::translate('Descendants of %s', Individual::getInstance($this_ITEM['PID'], $this->tree)->getFullName()); } else { echo I18N::translate('Descendants of the %s family', $this_ITEM['SURNAME']); } ?> </a> </td> <!-- ACCESS LEVEL --> <td> <?php echo FunctionsEdit::editFieldAccessLevel('access_level[' . $key . ']', $this_ITEM['ACCESS_LEVEL'], 'class="form-control"'); ?> </td> <!-- DELETE BUTTON --> <td> <button type="button" name="delete" class="btn btn-danger btn-sm" data-key="<?php echo $key; ?> " title="<?php I18N::translate('Delete'); ?> "> <i class="fa fa-trash-o"></i> </button> </td> </tr> <?php } else { ?> <tr> <!-- SURNAME --> <td class="error"> <input name="pid[<?php echo $key; ?> ]" type="hidden" value="<?php echo $this_ITEM['PID']; ?> " > <?php echo $this_ITEM['SURNAME']; ?> </td> <!-- ERROR MESSAGE --> <td colspan="4" class="error"> <?php echo I18N::translate('The person with root id %s doesn’t exist anymore in this tree', $this_ITEM['PID']); ?> </td> <!-- DELETE BUTTON --> <td> <button name="delete" type="button" class="btn btn-danger btn-sm" title="<?php I18N::translate('Delete'); ?> "> <i class="fa fa-trash-o"></i> </button> </td> </tr> <?php } ?> <?php } ?> <?php } ?> </tbody> </table> <!-- BUTTONS --> <button name="update" class="btn btn-primary" type="submit"> <i class="fa fa-check"></i> <?php echo I18N::translate('update'); ?> </button> </form> <?php } ?> </div> </div> </div> </div> <!-- PANEL 2 --> <div class="panel panel-default" id="panel2"> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" data-target="#collapseTwo" href="#" class="collapsed"> <?php echo I18N::translate('Options for %s', $this->tree->getTitleHtml()); ?> </a> </h4> </div> <div id="collapseTwo" class="panel-collapse collapse"> <div class="panel-body"> <?php echo $this->addMessage('save-options', 'success', true, I18N::translate('The options for this tree are succesfully saved')); ?> <?php echo $this->addMessage('reset-options', 'success', true, I18N::translate('The options for this tree are succesfully reset to the default settings')); ?> <div id="ftv-options-form" class="form-group"> <form class="form-horizontal" method="post" name="form5"> <!-- USE FULLNAME IN MENU --> <div class="form-group fullname"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Use fullname in menu'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::editFieldYesNo('NEW_FTV_OPTIONS[USE_FULLNAME]', $this->options('use_fullname'), 'class="radio-inline"'); ?> </div> </div> <!-- GENERATION BLOCKS --> <div class="form-group"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Number of generation blocks to show'); ?> </label> <div class="col-sm-4"> <?php echo FunctionsEdit::selectEditControl('NEW_FTV_OPTIONS[NUMBLOCKS]', array(I18N::translate('All'), '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'), null, $this->options('numblocks'), 'class="form-control"'); ?> </div> <p class="col-sm-8 col-sm-offset-4 small text-muted"> <?php echo I18N::translate('This option is especially usefull for large trees. When you notice a slow page load, here you can set the number of generation blocks to load at once to a lower level. Below the last generation block a button will appear to add the next set of generation blocks. The new blocks will be added to the blocks already loaded. Clicking on a “follow” link in the last visible generation block, will also load the next set of generation blocks.'); ?> </p> </div> <!-- SHOW SINGLES --> <div class="form-group"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Show single persons'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::editFieldYesNo('NEW_FTV_OPTIONS[SHOW_SINGLES]', $this->options('show_singles'), 'class="radio-inline"'); ?> </div> <p class="col-sm-8 col-sm-offset-4 small text-muted"> <?php echo I18N::translate('Turn this option on if you want to show single persons in the generation blocks. Single persons are persons without partner and children. With this option turned on, every child of a family will be shown in a detailed way in the next generation block.'); ?> </p> </div> <!-- CHECK RELATIONSHIP --> <div class="form-group"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Check relationship between partners'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::editFieldYesNo('NEW_FTV_OPTIONS[CHECK_RELATIONSHIP]', $this->options('check_relationship'), 'class="radio-inline"'); ?> </div> <p class="col-sm-8 col-sm-offset-4 small text-muted"> <?php echo I18N::translate('With this option turned on, the script checks if a (married) couple has the same ancestors. If a relationship between the partners is found, a text will appear between brackets after the spouses’ name to indicate the blood relationship.'); ?> </p> <p class="col-sm-8 col-sm-offset-4 small text-muted"> <?php echo I18N::translate('<strong>Note</strong>: this option can be time and/or memory consuming, especially on large trees. It can cause very slow page loading or an ’execution time out error’ on your server. If you notice such a behavior, reduce the number of generation blocks to load at once or don’t use it in combination with the option to show singles (see the previous options). If you still experience any problems, don’t use this option at all.'); ?> </p> </div> <!-- SHOW PLACES --> <div id="places" class="form-group"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Show places?'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::editFieldYesNo('NEW_FTV_OPTIONS[SHOW_PLACES]', $this->options('show_places'), 'class="radio-inline"'); ?> </div> </div> <!-- USE GEDCOM PLACE SETTING --> <div id="gedcom_places" class="form-group<?php if (!$this->options('show_places')) { echo ' collapse'; } ?> "> <label class="control-label col-sm-4"> <?php echo I18N::translate('Use default GEDCOM settings to abbreviate place names?'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::editFieldYesNo('NEW_FTV_OPTIONS[USE_GEDCOM_PLACES]', $this->options('use_gedcom_places'), 'class="radio-inline"'); ?> </div> <p class="col-sm-8 col-sm-offset-4 small text-muted"> <?php echo I18N::translate('If you have ticked the “Show places” option, you can choose to use the default GEDCOM settings to abbreviate placenames. If you don’t set this option, full place names will be shown.'); ?> </p> </div> <!-- GET COUNTRYLIST --> <?php if ($this->getCountrylist()) { ?> <div id="country_list" class="form-group<?php if (!$this->options('show_places') || $this->options('use_gedcom_places')) { echo ' collapse'; } ?> "> <label class="control-label col-sm-4"> <?php echo I18N::translate('Select your country'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::selectEditControl('NEW_FTV_OPTIONS[COUNTRY]', $this->getCountryList(), '', $this->options('country'), 'class="form-control"'); ?> </div> <p class="col-sm-8 col-sm-offset-4 small text-muted"> <?php echo I18N::translate('If you have ticked the “Show places” option but NOT the option to abbreviate placenames, you can set your own country here. Full places will be listed on the Fancy Treeview pages, but when a place includes the name of your own country, this name will be left out. If you don’t select a country then all countries will be shown, including your own.'); ?> </p> </div> <?php } ?> <!-- SHOW OCCUPATIONS --> <div class="form-group"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Show occupations'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::editFieldYesNo('NEW_FTV_OPTIONS[SHOW_OCCU]', $this->options('show_occu'), 'class="radio-inline"'); ?> </div> </div> <!-- RESIZE THUMBS --> <div id="resize_thumbs" class="form-group"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Resize thumbnails'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::editFieldYesNo('NEW_FTV_OPTIONS[RESIZE_THUMBS]', $this->options('resize_thumbs'), 'class="radio-inline"'); ?> </div> <p class="col-sm-8 col-sm-offset-4 small text-muted"> <?php echo I18N::translate('Here you can choose to resize the default webtrees thumbnails especially for the Fancy Treeview pages. You can set a custom size in percentage or in pixels. If you choose “no” the default webtrees thumbnails will be used with the formats you have set on the tree configuration page.'); ?> </p> </div> <!-- THUMB SIZE --> <div id="thumb_size" class="form-group<?php if (!$this->options('resize_thumbs')) { echo ' collapse'; } ?> "> <label class="control-label col-sm-4"> <?php echo I18N::translate('Thumbnail size'); ?> </label> <div class="row"> <div class="col-sm-1"> <input class="form-control" id="NEW_FTV_OPTIONS[THUMB_SIZE]" name="NEW_FTV_OPTIONS[THUMB_SIZE]" type="text" value="<?php echo $this->options('thumb_size'); ?> " > </div> <div class="col-sm-2"> <?php echo FunctionsEdit::selectEditControl('NEW_FTV_OPTIONS[THUMB_RESIZE_FORMAT]', array('1' => I18N::translate('percent'), '2' => I18N::translate('pixels')), null, $this->options('thumb_resize_format'), 'class="form-control"'); ?> </div> </div> </div> <!-- SQUARE THUMBS --> <div id="square_thumbs" class="form-group<?php if (!$this->options('resize_thumbs')) { echo ' collapse'; } ?> "> <label class="control-label col-sm-4"> <?php echo I18N::translate('Use square thumbnails'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::editFieldYesNo('NEW_FTV_OPTIONS[USE_SQUARE_THUMBS]', $this->options('use_square_thumbs'), 'class="radio-inline"'); ?> </div> </div> <!-- SHOW USERFORM --> <div class="form-group"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Show form to change start person'); ?> </label> <div class="col-sm-4"> <?php echo FunctionsEdit::editFieldAccessLevel('NEW_FTV_OPTIONS[SHOW_USERFORM]', $this->options('show_userform'), 'class="form-control"'); ?> </div> </div> <!-- SHOW PDF --> <div class="form-group"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Show PDF icon?'); ?> </label> <div class="col-sm-4"> <?php echo FunctionsEdit::editFieldAccessLevel('NEW_FTV_OPTIONS[SHOW_PDF_ICON]', $this->options('show_pdf_icon'), 'class="form-control"'); ?> </div> </div> <!-- SHOW FANCY TREEVIEW ON INDI PAGE --> <div class="form-group fullname"> <label class="control-label col-sm-4"> <?php echo I18N::translate('Show a Fancy Treeview tab on the individual page'); ?> </label> <div class="col-sm-8"> <?php echo FunctionsEdit::editFieldYesNo('NEW_FTV_OPTIONS[FTV_TAB]', $this->options('ftv_tab'), 'class="radio-inline"'); ?> </div> </div> <!-- BUTTONS --> <button name="save-options" class="btn btn-primary" type="submit"> <i class="fa fa-check"></i> <?php echo I18N::translate('save'); ?> </button> <button name="reset-options" class="btn btn-primary" type="reset"> <i class="fa fa-recycle"></i> <?php echo I18N::translate('reset'); ?> </button> </form> </div> </div> </div> </div> </div> <?php }
/** * {@inhericDoc} * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() */ protected function renderContent() { /** @var AbstractModule $module */ $module = $this->data->get('module'); ?> <ol class="breadcrumb small"> <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?> </a></li> <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?> </a></li> <li class="active"><?php echo $this->data->get('title'); ?> </li> </ol> <h1><?php echo $this->data->get('title'); ?> </h1> <form method="post" class="form-horizontal"> <?php echo Filter::getCsrf(); ?> <input type="hidden" name="action" value="update"> <h3><?php echo I18N::translate('General'); ?> </h3> <!-- MAJ_CERT_ROOTDIR --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_CERT_ROOTDIR"> <?php echo I18N::translate('Certificates directory'); ?> </label> <div class="col-sm-9"> <div class="input-group"> <span class="input-group-addon"> <?php echo WT_DATA_DIR; ?> </span> <input class="form-control" dir="ltr" id="MAJ_CERT_ROOTDIR" maxlength="255" name="MAJ_CERT_ROOTDIR" type="text" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_CERT_ROOTDIR', 'certificates/')); ?> " required > </div> <p class="small text-muted"> <?php echo I18N::translate('This folder will be used to store the certificate files.'); ?> <?php echo I18N::translate('If you select a different folder, you must also move any certificate files from the existing folder to the new one.'); ?> </p> </div> </div> <!-- MAJ_SHOW_CERT --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_SHOW_CERT"> <?php echo I18N::translate('Show certificates'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldAccessLevel('MAJ_SHOW_CERT', $module->getSetting('MAJ_SHOW_CERT', Auth::PRIV_HIDE), 'class="form-control"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Define access level required to display certificates in facts sources. By default, nobody can see the certificates.'); ?> </p> </div> </div> <h3><?php echo I18N::translate('Watermarks'); ?> </h3> <!-- MAJ_SHOW_NO_WATERMARK --> <div class="form-group"> <label class="control-label col-sm-3" for="MAJ_SHOW_NO_WATERMARK"> <?php echo I18N::translate('Show certificates without watermark'); ?> </label> <div class="col-sm-9"> <?php echo FunctionsEdit::editFieldAccessLevel('MAJ_SHOW_NO_WATERMARK', $module->getSetting('MAJ_SHOW_NO_WATERMARK', Auth::PRIV_HIDE), 'class="form-control"'); ?> <p class="small text-muted"> <?php echo I18N::translate('Define access level of users who can see certificates without any watermark. By default, everybody will see the watermark.'); ?> </p> <p class="small text-muted"> <?php echo I18N::translate('When displayed, the watermark is generated from the name of the repository and of the sources, if they exist. Otherwise, a default text is displayed.'); ?> </p> </div> </div> <!-- MAJ_WM_DEFAULT --> <div class="form-group"> <label for="MAJ_WM_DEFAULT" class="col-sm-3 control-label"> <?php echo I18N::translate('Default watermark'); ?> </label> <div class="col-sm-9"> <input type="text" class="form-control" dir="ltr" id="MAJ_WM_DEFAULT" name="MAJ_WM_DEFAULT" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_WM_DEFAULT')); ?> " maxlength="255" placeholder="<?php echo I18N::translate('This image is protected under copyright law.'); ?> "> <p class="small text-muted"> <?php echo I18N::translate('Text to be displayed by default if no source has been associated with the certificate.'); ?> </p> </div> </div> <!-- MAJ_WM_FONT_COLOR --> <div class="form-group"> <label for="MAJ_WM_FONT_COLOR" class="col-sm-3 control-label"> <?php echo I18N::translate('Watermark font color'); ?> </label> <div class="col-sm-9"> <div class="row"> <!-- MAJ_WM_FONT_COLOR --> <div class="col-sm-3"> <div class="input-group"> <label class="input-group-addon" for="MAJ_WM_FONT_COLOR"> <?php echo I18N::translate('Color'); ?> </label> <input type="color" class="form-control" dir="ltr" id="MAJ_WM_FONT_COLOR" name="MAJ_WM_FONT_COLOR" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_WM_FONT_COLOR', '#4D6DF3')); ?> " maxlength="11"> </div> </div> </div> <p class="small text-muted"> <?php echo I18N::translate('Font color for the watermark. By default, <span style="color:#4d6df3;">the color #4D6DF3</span> is used.'); ?> </p> </div> </div> <div class="form-group"> <legend class="control-label col-sm-3"> <?php echo I18N::translate('Watermark font size'); ?> </legend> <div class="col-sm-9"> <div class="row"> <!-- MAJ_WM_FONT_MAXSIZE --> <div class="col-sm-5"> <div class="input-group"> <label class="input-group-addon" for="MAJ_WM_FONT_MAXSIZE"> <?php echo I18N::translate('Maximum font size'); ?> </label> <input class="form-control" dir="ltr" id="MAJ_WM_FONT_MAXSIZE" maxlength="2" name="MAJ_WM_FONT_MAXSIZE" type="number" placeholder="18" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_WM_FONT_MAXSIZE')); ?> " > <span class="input-group-addon"> <?php echo I18N::translate('pixels'); ?> </span> </div> </div> </div> <p class="small text-muted"> <?php echo I18N::translate('Watermark font size'); ?> </p> </div> </div> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <button type="submit" class="btn btn-primary"> <i class="fa fa-check"></i> <?php echo I18N::translate('save'); ?> </button> </div> </div> </form> <?php }