1<?php 2 3use Fisharebest\Webtrees\Auth; 4use Fisharebest\Webtrees\Contracts\UserInterface; 5use Fisharebest\Webtrees\Date; 6use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 7use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees; 8use Fisharebest\Webtrees\Http\RequestHandlers\TreePreferencesAction; 9use Fisharebest\Webtrees\I18N; 10use Fisharebest\Webtrees\Individual; 11use Fisharebest\Webtrees\Tree; 12use Illuminate\Support\Collection; 13 14/** 15 * @var array<string,string> $all_fam_facts 16 * @var array<string,string> $all_indi_facts 17 * @var array<string,string> $all_name_facts 18 * @var array<string,string> $all_plac_facts 19 * @var array<string,string> $all_repo_facts 20 * @var array<string,string> $all_sour_facts 21 * @var array<string,string> $all_surname_traditions 22 * @var array<int,string> $calendar_formats 23 * @var string $data_folder 24 * @var array<int,string> $formats 25 * @var Date $french_calendar_end 26 * @var Date $french_calendar_start 27 * @var Date $gregorian_calendar_start 28 * @var Collection<UserInterface> $members 29 * @var Individual|null $pedigree_individual 30 * @var array<int,string> $privacy_options 31 * @var array<int,string> $relatives_events 32 * @var array<int,string> $source_types 33 * @var array<string,string> $surname_list_styles 34 * @var string $title 35 * @var Tree $tree 36 * @var int $tree_count 37 */ 38 39?> 40 41<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?> 42 43<h1><?= $title ?></h1> 44 45<form method="post" action="<?= e(route(TreePreferencesAction::class, ['tree' => $tree->name()])) ?>" class="form-horizontal"> 46 <?= csrf_field() ?> 47 48 <h3><?= I18N::translate('General') ?></h3> 49 50 <!-- TREE TITLE --> 51 <div class="row form-group"> 52 <label class="col-sm-3 col-form-label" for="title"> 53 <?= I18N::translate('Family tree title') ?> 54 </label> 55 <div class="col-sm-9"> 56 <input 57 class="form-control" 58 dir="auto" 59 id="title" 60 maxlength="255" 61 name="title" 62 required 63 type="text" 64 value="<?= e($tree->getPreference('title')) ?>" 65 > 66 </div> 67 </div> 68 69 <!-- TREE URL / FILENAME --> 70 <?php if (Auth::isAdmin()) : ?> 71 <div class="row form-group"> 72 <label class="col-sm-3 col-form-label" for="gedcom"> 73 <?= I18N::translate('URL') ?> 74 </label> 75 <div class="col-sm-9"> 76 <div class="input-group" dir="ltr"> 77 <span class="input-group-text" dir="ltr"> 78 <?= e(explode('{tree}', rawurldecode(route('example')))[0]) ?> 79 </span> 80 81 <input class="form-control" dir="ltr" id="gedcom" maxlength="255" name="gedcom" required="required" type="text" value="<?= e($tree->name()) ?>"> 82 83 <span class="input-group-text" dir="ltr"> 84 <?= e(explode('{tree}', rawurldecode(route('example')))[1]) ?> 85 </span> 86 </div> 87 88 <div class="form-text"> 89 <?= /* I18N: help text for family tree / GEDCOM file names */ I18N::translate('Avoid spaces and punctuation. A family name might be a good choice.') ?> 90 </div> 91 </div> 92 </div> 93 <?php endif ?> 94 95 <!-- PEDIGREE_ROOT_ID --> 96 <div class="row form-group"> 97 <label class="col-sm-3 col-form-label" for="PEDIGREE_ROOT_ID"> 98 <?= /* I18N: A configuration setting */ I18N::translate('Default individual') ?> 99 </label> 100 <div class="col-sm-9"> 101 <?= view('components/select-individual', ['name' => 'PEDIGREE_ROOT_ID', 'individual' => $pedigree_individual, 'tree' => $tree]) ?> 102 <div class="form-text"> 103 <?= /* I18N: Help text for the “Default individual” configuration setting */ I18N::translate('This individual will be selected by default when viewing charts and reports.') ?> 104 </div> 105 </div> 106 </div> 107 108 <!-- CALENDAR_FORMAT --> 109 <fieldset class="row form-group"> 110 <legend class="col-form-label col-sm-3"> 111 <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> 112 <label class="visually-hidden" for="CALENDAR_FORMAT0"> 113 <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> 1 114 </label> 115 <label class="visually-hidden" for="CALENDAR_FORMAT1"> 116 <?= /* I18N: A configuration setting */ I18N::translate('Calendar conversion') ?> 2 117 </label> 118 </legend> 119 <div class="col-sm-9"> 120 <div class="row"> 121 <div class="col-sm-6"> 122 <?= view('components/select', ['name' => 'CALENDAR_FORMAT0', 'selected' => $calendar_formats[0], 'options' => ['none' => I18N::translate('No calendar conversion')] + Date::calendarNames()]) ?> 123 </div> 124 <div class="col-sm-6"> 125 <?= view('components/select', ['name' => 'CALENDAR_FORMAT1', 'selected' => $calendar_formats[1], 'options' => ['none' => I18N::translate('No calendar conversion')] + Date::calendarNames()]) ?> 126 </div> 127 </div> 128 <div class="form-text"> 129 <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('Different calendar systems are used in different parts of the world, and many other calendar systems have been used in the past. Where possible, you should enter dates using the calendar in which the event was originally recorded. You can then specify a conversion, to show these dates in a more familiar calendar. If you regularly use two calendars, you can specify two conversions and dates will be converted to both the selected calendars.') ?> 130 </div> 131 <div class="form-text"> 132 <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('Dates are only converted if they are valid for the calendar. For example, only dates between %1$s and %2$s will be converted to the French calendar and only dates after %3$s will be converted to the Gregorian calendar.', $french_calendar_start->display(false, null, false), $french_calendar_end->display(false, null, false), $gregorian_calendar_start->display(false, null, false)) ?> 133 </div> 134 <div class="form-text"> 135 <?= /* I18N: Help text for the “Calendar conversion” configuration setting */ I18N::translate('In some calendars, days start at midnight. In other calendars, days start at sunset. The conversion process does not take account of the time, so for any event that occurs between sunset and midnight, the conversion between these types of calendar will be one day out.') ?> 136 </div> 137 </div> 138 </fieldset> 139 140 <!-- GENERATE_UIDS --> 141 <fieldset class="row form-group"> 142 <legend class="col-form-label col-sm-3"> 143 <?= /* I18N: A configuration setting */ I18N::translate('Add unique identifiers') ?> 144 </legend> 145 <div class="col-sm-9"> 146 <?= view('components/radios-inline', ['name' => 'GENERATE_UIDS', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('GENERATE_UIDS')]) ?> 147 <div class="form-text"> 148 <?= /* I18N: Help text for the “Add unique identifiers” configuration setting */ I18N::translate('Unique identifiers allow the same record to be found in different family trees and in different systems. They will be added whenever records are created or updated. If you do not want unique identifiers to be displayed, you can hide them using the privacy rules.') ?> 149 </div> 150 </div> 151 </fieldset> 152 153 <h3><?= I18N::translate('Contact information') ?></h3> 154 155 <!-- CONTACT_USER_ID --> 156 <div class="row form-group"> 157 <label class="col-sm-3 col-form-label" for="CONTACT_USER_ID"> 158 <?= /* I18N: A configuration setting */ I18N::translate('Genealogy contact') ?> 159 </label> 160 <div class="col-sm-9"> 161 <select id="CONTACT_USER_ID" name="CONTACT_USER_ID" class="form-control"> 162 <option value=""> </option> 163 <?php foreach ($members as $member) : ?> 164 <option value="<?= $member->id() ?>" <?= (int) $tree->getPreference('CONTACT_USER_ID') === $member->id() ? 'selected' : '' ?>> 165 <?= e($member->realName()) ?> - <?= e($member->userName()) ?> 166 </option> 167 <?php endforeach ?> 168 </select> 169 <div class="form-text"> 170 <?= /* I18N: Help text for the “Genealogy contact” configuration setting */ I18N::translate('The individual to contact about the genealogy data on this website.') ?> 171 </div> 172 </div> 173 </div> 174 175 <!-- WEBMASTER_USER_ID --> 176 <div class="row form-group"> 177 <label class="col-sm-3 col-form-label" for="WEBMASTER_USER_ID"> 178 <?= /* I18N: A configuration setting */ I18N::translate('Technical help contact') ?> 179 </label> 180 <div class="col-sm-9"> 181 <select id="WEBMASTER_USER_ID" name="WEBMASTER_USER_ID" class="form-control"> 182 <option value=""> </option> 183 <?php foreach ($members as $member) : ?> 184 <option value="<?= $member->id() ?>" <?= (int) $tree->getPreference('WEBMASTER_USER_ID') === $member->id() ? 'selected' : '' ?>> 185 <?= e($member->realName()) ?> - <?= e($member->userName()) ?> 186 </option> 187 <?php endforeach ?> 188 </select> 189 <div class="form-text"> 190 <?= /* I18N: Help text for the “Technical help contact” configuration setting */ I18N::translate('The individual to be contacted about technical questions or errors encountered on your website.') ?> 191 </div> 192 </div> 193 </div> 194 195 <h3><?= I18N::translate('Website') ?></h3> 196 197 <!-- META_TITLE --> 198 <div class="row form-group"> 199 <label class="col-sm-3 col-form-label" for="META_TITLE"> 200 <?= /* I18N: A configuration setting */ I18N::translate('Add to TITLE header tag') ?> 201 </label> 202 <div class="col-sm-9"> 203 <input 204 class="form-control" 205 id="META_TITLE" 206 maxlength="255" 207 name="META_TITLE" 208 type="text" 209 value="<?= e($tree->getPreference('META_TITLE')) ?>" 210 > 211 <div class="form-text"> 212 <?= /* I18N: Help text for the “Add to TITLE header tag” configuration setting */ I18N::translate('This text will be appended to each page title. It will be shown in the browser’s title bar, bookmarks, etc.') ?> 213 </div> 214 </div> 215 </div> 216 217 <!-- META_DESCRIPTION --> 218 <div class="row form-group"> 219 <label class="col-sm-3 col-form-label" for="META_DESCRIPTION"> 220 <?= /* I18N: A configuration setting */ I18N::translate('Description META tag') ?> 221 </label> 222 <div class="col-sm-9"> 223 <input 224 class="form-control" 225 id="META_DESCRIPTION" 226 maxlength="255" 227 name="META_DESCRIPTION" 228 type="text" 229 value="<?= e($tree->getPreference('META_DESCRIPTION')) ?>" 230 > 231 <div class="form-text"> 232 <?= /* I18N: Help text for the “Description META tag” configuration setting */ I18N::translate('Search engines may use this description of your site in their search results.') ?> 233 </div> 234 </div> 235 </div> 236 237 <?php if (Auth::isAdmin()) : ?> 238 <h3><?= I18N::translate('Media folders') ?></h3> 239 240 <!-- MEDIA_DIRECTORY --> 241 <div class="row form-group"> 242 <label class="col-sm-3 col-form-label" for="MEDIA_DIRECTORY"> 243 <?= /* I18N: A configuration setting */ I18N::translate('Media folder') ?> 244 </label> 245 <div class="col-sm-9"> 246 <div class="input-group" dir="ltr"> 247 <span class="input-group-text" dir="ltr"> 248 <?= e($data_folder) ?> 249 </span> 250 251 <input class="form-control" dir="ltr" id="MEDIA_DIRECTORY" maxlength="255" name="MEDIA_DIRECTORY" type="text" value="<?= e($tree->getPreference('MEDIA_DIRECTORY')) ?>"> 252 </div> 253 254 <div class="form-text"> 255 <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('This folder will be used to store the media files for this family tree.') ?> 256 <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('If you select a different folder, you must also move any media files from the existing folder to the new one.') ?> 257 <?= /* I18N: Help text for the “Media folder” configuration setting */ I18N::translate('If two family trees use the same media folder, then they will be able to share media files. If they use different media folders, then their media files will be kept separate.') ?> 258 </div> 259 </div> 260 </div> 261 <?php endif ?> 262 263 <h3><?= I18N::translate('Media files') ?></h3> 264 265 <!-- MEDIA_UPLOAD --> 266 <div class="row form-group"> 267 <label class="col-sm-3 col-form-label" for="MEDIA_UPLOAD"> 268 <?= /* I18N: A configuration setting */ I18N::translate('Who can upload new media files') ?> 269 </label> 270 <div class="col-sm-9"> 271 <?= view('components/select', ['name' => 'MEDIA_UPLOAD', 'selected' => $tree->getPreference('MEDIA_UPLOAD'), 'options' => $privacy_options]) ?> 272 <div class="form-text"> 273 <?= /* I18N: Help text for the “Who can upload new media files” configuration setting */ I18N::translate('If you are concerned that users might upload inappropriate images, you can restrict media uploads to managers only.') ?> 274 </div> 275 </div> 276 </div> 277 278 <!-- SHOW_MEDIA_DOWNLOAD --> 279 <fieldset class="row form-group"> 280 <legend class="col-form-label col-sm-3"> 281 <?= /* I18N: A configuration setting */ I18N::translate('Show a download link in the media viewer') ?> 282 </legend> 283 <div class="col-sm-9"> 284 <?= view('components/select', ['name' => 'SHOW_MEDIA_DOWNLOAD', 'selected' => $tree->getPreference('SHOW_MEDIA_DOWNLOAD'), 'options' => Auth::accessLevelNames()]) ?> 285 <div class="form-text"> 286 <?= /* I18N: Help text for the “Show a download link in the media viewer” configuration setting */ I18N::translate('This option will make it easier for users to download images.') ?> 287 </div> 288 </div> 289 </fieldset> 290 291 <h3><?= I18N::translate('Thumbnail images') ?></h3> 292 293 <!-- SHOW_HIGHLIGHT_IMAGES --> 294 <fieldset class="row form-group"> 295 <legend class="col-form-label col-sm-3"> 296 <?= I18N::translate('Thumbnail images') ?> 297 </legend> 298 <div class="col-sm-9"> 299 <?= view('components/radios-inline', ['name' => 'SHOW_HIGHLIGHT_IMAGES', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_HIGHLIGHT_IMAGES')]) ?> 300 <div class="form-text"> 301 <?= I18N::translate('Show thumbnail images in charts and family groups.') ?> 302 </div> 303 </div> 304 </fieldset> 305 306 <!-- USE_SILHOUETTE --> 307 <fieldset class="row form-group"> 308 <legend class="col-form-label col-sm-3"> 309 <?= /* I18N: A configuration setting */ I18N::translate('Use silhouettes') ?> 310 </legend> 311 <div class="col-sm-9"> 312 <?= view('components/radios-inline', ['name' => 'USE_SILHOUETTE', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('USE_SILHOUETTE')]) ?> 313 <div class="form-text"> 314 <?= /* I18N: Help text for the “Use silhouettes” configuration setting */ I18N::translate('Use silhouette images when no highlighted image for that individual has been specified. The images used are specific to the gender of the individual in question.') ?> 315 </div> 316 </div> 317 </fieldset> 318 319 <h3><?= I18N::translate('Watermarks') ?></h3> 320 321 <!-- SHOW_NO_WATERMARK --> 322 <div class="row form-group"> 323 <label class="col-sm-3 col-form-label" for="SHOW_NO_WATERMARK"> 324 <?= I18N::translate('Images without watermarks') ?> 325 </label> 326 <div class="col-sm-9"> 327 <?= view('components/select', ['name' => 'SHOW_NO_WATERMARK', 'selected' => $tree->getPreference('SHOW_NO_WATERMARK'), 'options' => Auth::accessLevelNames()]) ?> 328 <div class="form-text"> 329 <?= /* I18N: Help text for the “Images without watermarks” configuration setting */ I18N::translate('Watermarks are optional and normally shown just to visitors.') ?> 330 </div> 331 </div> 332 </div> 333 334 <h3><?= I18N::translate('Lists') ?></h3> 335 336 <!-- SURNAME_LIST_STYLE --> 337 <div class="row form-group"> 338 <label class="col-sm-3 col-form-label" for="SURNAME_LIST_STYLE"> 339 <?= I18N::translate('Surname list style') ?> 340 </label> 341 <div class="col-sm-9"> 342 <?= view('components/select', ['name' => 'SURNAME_LIST_STYLE', 'selected' => $tree->getPreference('SURNAME_LIST_STYLE'), 'options' => $surname_list_styles]) ?> 343 <div class="form-text"> 344 </div> 345 </div> 346 </div> 347 348 <!-- SUBLIST_TRIGGER_I --> 349 <div class="row form-group"> 350 <label class="col-sm-3 col-form-label" for="SUBLIST_TRIGGER_I"> 351 <?= /* I18N: A configuration setting */ I18N::translate('Maximum number of surnames on individual list') ?> 352 </label> 353 <div class="col-sm-9"> 354 <input 355 class="form-control" 356 id="SUBLIST_TRIGGER_I" 357 maxlength="5" 358 name="SUBLIST_TRIGGER_I" 359 required 360 type="text" 361 value="<?= e($tree->getPreference('SUBLIST_TRIGGER_I')) ?>" 362 > 363 <div class="form-text"> 364 <?= /* I18N: Help text for the “Maximum number of surnames on individual list” configuration setting */ I18N::translate('Long lists of individuals with the same surname can be broken into smaller sub-lists according to the first letter of the individual’s given name.<br><br>This option determines when sub-listing of surnames will occur. To disable sub-listing completely, set this option to zero.') ?> 365 </div> 366 </div> 367 </div> 368 369 <!-- SHOW_EST_LIST_DATES --> 370 <fieldset class="row form-group"> 371 <legend class="col-form-label col-sm-3"> 372 <?= /* I18N: A configuration setting */ I18N::translate('Estimated dates for birth and death') ?> 373 </legend> 374 <div class="col-sm-9"> 375 <?= view('components/radios-inline', ['name' => 'SHOW_EST_LIST_DATES', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_EST_LIST_DATES')]) ?> 376 <div class="form-text"> 377 <?= /* I18N: Help text for the “Estimated dates for birth and death” configuration setting */ I18N::translate('This option controls whether or not to show estimated dates for birth and death instead of leaving blanks on individual lists and charts for individuals whose dates are not known.') ?> 378 </div> 379 </div> 380 </fieldset> 381 382 <!-- SHOW_LAST_CHANGE --> 383 <fieldset class="row form-group"> 384 <legend class="col-form-label col-sm-3"> 385 <?= I18N::translate('The date and time of the last update') ?> 386 </legend> 387 <div class="col-sm-9"> 388 <?= view('components/radios-inline', ['name' => 'SHOW_LAST_CHANGE', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_LAST_CHANGE')]) ?> 389 <div class="form-text"> 390 </div> 391 </div> 392 </fieldset> 393 394 <h3><?= I18N::translate('Charts') ?></h3> 395 396 <!-- SHOW_PARENTS_AGE --> 397 <fieldset class="row form-group"> 398 <legend class="col-form-label col-sm-3"> 399 <?= /* I18N: A configuration setting */ I18N::translate('Age of parents next to child’s birthdate') ?> 400 </legend> 401 <div class="col-sm-9"> 402 <?= view('components/radios-inline', ['name' => 'SHOW_PARENTS_AGE', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_PARENTS_AGE')]) ?> 403 <div class="form-text"> 404 <?= /* I18N: Help text for the “Age of parents next to child’s birthdate” configuration setting */ I18N::translate('This option controls whether or not to show age of father and mother next to child’s birthdate on charts.') ?> 405 </div> 406 </div> 407 </fieldset> 408 409 <!-- CHART_BOX_TAGS --> 410 <div class="row form-group"> 411 <label class="col-sm-3 col-form-label" for="CHART_BOX_TAGS"> 412 <?= I18N::translate('Other facts to show in charts') ?> 413 </label> 414 <div class="col-sm-9"> 415 <div class="input-group"> 416 <?= view('components/select', ['name' => 'CHART_BOX_TAGS[]', 'id' => 'CHART_BOX_TAGS', 'selected' => explode(',', $tree->getPreference('CHART_BOX_TAGS')), 'options' => $all_indi_facts, 'class' => 'select2']) ?> 417 </div> 418 <div class="form-text"> 419 <?= /* I18N: Help text for the “Other facts to show in charts” configuration setting */ I18N::translate('This should be a comma or space separated list of facts, in addition to birth and death, that you want to appear in chart boxes such as the pedigree chart. This list requires you to use fact tags as defined in the GEDCOM 5.5.1 standard. For example, if you wanted the occupation to show up in the box, you would add “OCCU” to this field.') ?> 420 </div> 421 </div> 422 </div> 423 424 <h3><?= I18N::translate('Individual pages') ?></h3> 425 426 <!-- SHOW_RELATIVES_EVENTS --> 427 <fieldset class="row form-group"> 428 <legend class="col-form-label col-sm-3"> 429 <?= I18N::translate('Show the events of close relatives on the individual page') ?> 430 </legend> 431 <div class="col-sm-3"> 432 <div class="form-check"> 433 <label for="_BIRT_GCHI"> 434 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_GCHI" value="_BIRT_GCHI" <?= in_array('_BIRT_GCHI', $relatives_events, true) ? 'checked' : '' ?>> 435 <?= I18N::translate('Birth of a grandchild') ?> 436 </label> 437 </div> 438 <div class="form-check"> 439 <label for="_BIRT_CHIL"> 440 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_CHIL" value="_BIRT_CHIL" <?= in_array('_BIRT_CHIL', $relatives_events, true) ? 'checked' : '' ?>> 441 <?= I18N::translate('Birth of a child') ?> 442 </label> 443 </div> 444 <div class="form-check"> 445 <label for="_BIRT_SIBL"> 446 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_BIRT_SIBL" value="_BIRT_SIBL" <?= in_array('_BIRT_SIBL', $relatives_events, true) ? 'checked' : '' ?>> 447 <?= I18N::translate('Birth of a sibling') ?> 448 </label> 449 </div> 450 </div> 451 <div class="col-sm-3"> 452 <div class="form-check"> 453 <label for="_MARR_GCHI"> 454 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_GCHI" value="_MARR_GCHI" <?= in_array('_MARR_GCHI', $relatives_events, true) ? 'checked' : '' ?>> 455 <?= I18N::translate('Marriage of a grandchild') ?> 456 </label> 457 </div> 458 <div class="form-check"> 459 <label for="_MARR_CHIL"> 460 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_CHIL" value="_MARR_CHIL" <?= in_array('_MARR_CHIL', $relatives_events, true) ? 'checked' : '' ?>> 461 <?= I18N::translate('Marriage of a child') ?> 462 </label> 463 </div> 464 <div class="form-check"> 465 <label for="_MARR_SIBL"> 466 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_SIBL" value="_MARR_SIBL" <?= in_array('_MARR_SIBL', $relatives_events, true) ? 'checked' : '' ?>> 467 <?= I18N::translate('Marriage of a sibling') ?> 468 </label> 469 </div> 470 <div class="form-check"> 471 <label for="_MARR_PARE"> 472 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_MARR_PARE" value="_MARR_PARE" <?= in_array('_MARR_PARE', $relatives_events, true) ? 'checked' : '' ?>> 473 <?= I18N::translate('Marriage of a parent') ?> 474 </label> 475 </div> 476 </div> 477 <div class="col-sm-3"> 478 <div class="form-check"> 479 <label for="_DEAT_GCHI"> 480 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_GCHI" value="_DEAT_GCHI" <?= in_array('_DEAT_GCHI', $relatives_events, true) ? 'checked' : '' ?>> 481 <?= I18N::translate('Death of a grandchild') ?> 482 </label> 483 </div> 484 <div class="form-check"> 485 <label for="_DEAT_CHIL"> 486 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_CHIL" value="_DEAT_CHIL" <?= in_array('_DEAT_CHIL', $relatives_events, true) ? 'checked' : '' ?>> 487 <?= I18N::translate('Death of a child') ?> 488 </label> 489 </div> 490 <div class="form-check"> 491 <label for="_DEAT_SIBL"> 492 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_SIBL" value="_DEAT_SIBL" <?= in_array('_DEAT_SIBL', $relatives_events, true) ? 'checked' : '' ?>> 493 <?= I18N::translate('Death of a sibling') ?> 494 </label> 495 </div> 496 <div class="form-check"> 497 <label for="_DEAT_PARE"> 498 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_PARE" value="_DEAT_PARE" <?= in_array('_DEAT_PARE', $relatives_events, true) ? 'checked' : '' ?>> 499 <?= I18N::translate('Death of a parent') ?> 500 </label> 501 </div> 502 <div class="form-check"> 503 <label for="_DEAT_SPOU"> 504 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_SPOU" value="_DEAT_SPOU" <?= in_array('_DEAT_SPOU', $relatives_events, true) ? 'checked' : '' ?>> 505 <?= I18N::translate('Death of a spouse') ?> 506 </label> 507 </div> 508 <div class="form-check"> 509 <label for="_DEAT_GPAR"> 510 <input name="SHOW_RELATIVES_EVENTS[]" type="checkbox" id="_DEAT_GPAR" value="_DEAT_GPAR" <?= in_array('_DEAT_GPAR', $relatives_events, true) ? 'checked' : '' ?>> 511 <?= I18N::translate('Death of a grandparent') ?> 512 </label> 513 </div> 514 </div> 515 </fieldset> 516 517 <!-- SHOW_FACT_ICONS --> 518 <fieldset class="row form-group"> 519 <legend class="col-form-label col-sm-3"> 520 <?= /* I18N: A configuration setting */ I18N::translate('Fact icons') ?> 521 </legend> 522 <div class="col-sm-9"> 523 <?= view('components/radios-inline', ['name' => 'SHOW_FACT_ICONS', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_FACT_ICONS')]) ?> 524 <div class="form-text"> 525 <?= /* I18N: Help text for the “Fact icons” configuration setting */ I18N::translate('Some themes can display icons on the “Facts and events” tab.') ?> 526 </div> 527 </div> 528 </fieldset> 529 530 <!-- EXPAND_NOTES --> 531 <fieldset class="row form-group"> 532 <legend class="col-form-label col-sm-3"> 533 <?= /* I18N: A configuration setting */ I18N::translate('Automatically expand notes') ?> 534 </legend> 535 <div class="col-sm-9"> 536 <?= view('components/radios-inline', ['name' => 'EXPAND_NOTES', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('EXPAND_NOTES')]) ?> 537 <div class="form-text"> 538 <?= /* I18N: Help text for the “Automatically expand notes” configuration setting */ 539 I18N::translate('This option controls whether or not to automatically display content of a <i>Note</i> record on the Individual page.') ?> 540 </div> 541 </div> 542 </fieldset> 543 544 <!-- EXPAND_SOURCES --> 545 <fieldset class="row form-group"> 546 <legend class="col-form-label col-sm-3"> 547 <?= /* I18N: A configuration setting */ I18N::translate('Automatically expand sources') ?> 548 </legend> 549 <div class="col-sm-9"> 550 <?= view('components/radios-inline', ['name' => 'EXPAND_SOURCES', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('EXPAND_SOURCES')]) ?> 551 <div class="form-text"> 552 <?= /* I18N: Help text for the “Automatically expand sources” configuration setting */ 553 I18N::translate('This option controls whether or not to automatically display content of a <i>Source</i> record on the Individual page.') ?> 554 </div> 555 </div> 556 </fieldset> 557 558 <h3><?= I18N::translate('Places') ?></h3> 559 560 <!-- SHOW_PEDIGREE_PLACES --> 561 <fieldset class="row form-group"> 562 <legend class="col-form-label col-sm-3"> 563 <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?> 564 <label class="visually-hidden" for="SHOW_PEDIGREE_PLACES_SUFFIX"> 565 <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?> 566 <?= I18N::translate('first') ?> / <?= I18N::translate('last') ?> 567 </label> 568 <label class="visually-hidden" for="SHOW_PEDIGREE_PLACES"> 569 <?= /* I18N: A configuration setting */ I18N::translate('Abbreviate place names') ?> 570 </label> 571 </legend> 572 <div class="col-sm-9"> 573 <?= /* I18N: The placeholders are edit controls. Show the [first/last] [1/2/3/4/5] parts of a place name */ I18N::translate( 574 'Show the %1$s %2$s parts of a place name.', 575 view('components/select', ['name' => 'SHOW_PEDIGREE_PLACES_SUFFIX', 'selected' => $tree->getPreference('SHOW_PEDIGREE_PLACES_SUFFIX'), 'options' => ['0' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'first'), '1' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'last')]]), 576 view('components/select-number', ['name' => 'SHOW_PEDIGREE_PLACES', 'selected' => $tree->getPreference('SHOW_PEDIGREE_PLACES'), 'options' => range(1, 9)]) 577 ) ?> 578 <div class="form-text"> 579 <?= /* I18N: Help text for the “Abbreviate place names” configuration setting */ I18N::translate('Place names are frequently too long to fit on charts, lists, etc. They can be abbreviated by showing just the first few parts of the name, such as <i>village, county</i>, or the last few part of it, such as <i>region, country</i>.') ?> 580 </div> 581 </div> 582 </fieldset> 583 584 <h3><?= I18N::translate('Text') ?></h3> 585 586 <!-- FORMAT_TEXT --> 587 <fieldset class="row form-group"> 588 <legend class="col-form-label col-sm-3"> 589 <?= /* I18N: A configuration setting */ I18N::translate('Format text and notes') ?> 590 </legend> 591 <div class="col-sm-9"> 592 <?= view('components/radios-inline', ['name' => 'FORMAT_TEXT', 'options' => $formats, 'selected' => $tree->getPreference('FORMAT_TEXT')]) ?> 593 <div class="form-text"> 594 <?= /* I18N: Help text for the “Format text and notes” configuration setting */ I18N::translate('To ensure compatibility with other genealogy applications, notes, text, and transcripts should be recorded in simple, unformatted text. However, formatting is often desirable to aid presentation, comprehension, etc.') ?> 595 <br> 596 <?= /* I18N: Help text for the “Format text and notes” configuration setting */ I18N::translate('Markdown is a simple system of formatting, used on websites such as Wikipedia. It uses unobtrusive punctuation characters to create headings and sub-headings, bold and italic text, lists, tables, etc.') ?> 597 </div> 598 </div> 599 </fieldset> 600 601 <h3><?= I18N::translate('General') ?></h3> 602 603 <!-- SHOW_GEDCOM_RECORD --> 604 <fieldset class="row form-group"> 605 <legend class="col-form-label col-sm-3"> 606 <?= /* I18N: A configuration setting */ I18N::translate('Allow users to see raw GEDCOM records') ?> 607 </legend> 608 <div class="col-sm-9"> 609 <?= view('components/radios-inline', ['name' => 'SHOW_GEDCOM_RECORD', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('SHOW_GEDCOM_RECORD')]) ?> 610 <div class="form-text"> 611 <?= /* I18N: Help text for the “Allow users to see raw GEDCOM records” configuration setting */ I18N::translate('Setting this to <b>Yes</b> will place links on individuals, sources, and families to let users bring up another window containing the raw data taken right out of the GEDCOM file.') ?> 612 </div> 613 </div> 614 </fieldset> 615 616 <!-- HIDE_GEDCOM_ERRORS --> 617 <fieldset class="row form-group"> 618 <legend class="col-form-label col-sm-3"> 619 <?= /* I18N: A configuration setting */ I18N::translate('GEDCOM errors') ?> 620 </legend> 621 <div class="col-sm-9"> 622 <?= view('components/radios-inline', ['name' => 'HIDE_GEDCOM_ERRORS', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('HIDE_GEDCOM_ERRORS')]) ?> 623 <div class="form-text"> 624 <?= /* I18N: Help text for the “GEDCOM errors” configuration setting */ I18N::translate('Many genealogy programs create GEDCOM files with custom tags, and webtrees understands most of them. When unrecognized tags are found, this option lets you choose whether to ignore them or display a warning message.') ?> 625 </div> 626 </div> 627 </fieldset> 628 629 <!-- SHOW_COUNTER --> 630 <fieldset class="row form-group"> 631 <legend class="col-form-label col-sm-3"> 632 <?= /* I18N: A configuration setting */ I18N::translate('Hit counters') ?> 633 </legend> 634 <div class="col-sm-9"> 635 <?= view('components/radios-inline', ['name' => 'SHOW_COUNTER', 'options' => [I18N::translate('hide'), I18N::translate('show')], 'selected' => (int) $tree->getPreference('SHOW_COUNTER')]) ?> 636 <div class="form-text"> 637 <?= /* I18N: Help text for the “Hit counters” configuration setting */ I18N::translate('Some pages can display the number of times that they have been visited.') ?> 638 </div> 639 </div> 640 </fieldset> 641 642 <h3><?= /* I18N: Options for editing */ I18N::translate('Edit preferences') ?></h3> 643 644 <h3><?= I18N::translate('Facts for individual records') ?></h3> 645 646 <!-- QUICK_REQUIRED_FACTS --> 647 <div class="row form-group"> 648 <label class="col-sm-3 col-form-label" for="QUICK_REQUIRED_FACTS"> 649 <?= I18N::translate('Facts for new individuals') ?> 650 </label> 651 <div class="col-sm-9"> 652 <?= view('components/select', ['name' => 'QUICK_REQUIRED_FACTS[]', 'id' => 'QUICK_REQUIRED_FACTS', 'selected' => explode(',', $tree->getPreference('QUICK_REQUIRED_FACTS')), 'options' => $all_indi_facts, 'class' => 'select2']) ?> 653 </div> 654 </div> 655 656 <!-- INDI_FACTS_QUICK --> 657 <div class="row form-group"> 658 <label class="col-sm-3 col-form-label" for="INDI_FACTS_QUICK"> 659 <?= I18N::translate('Quick individual facts') ?> 660 </label> 661 <div class="col-sm-9"> 662 <?= view('components/select', ['name' => 'INDI_FACTS_QUICK[]', 'id' => 'INDI_FACTS_QUICK', 'selected' => explode(',', $tree->getPreference('INDI_FACTS_QUICK')), 'options' => $all_indi_facts, 'class' => 'select2']) ?> 663 <div class="form-text"> 664 <?= /* I18N: Help text for the “Quick individual facts” configuration setting */ I18N::translate('The most common individual facts and events are listed separately, so that they can be added more easily.') ?> 665 </div> 666 </div> 667 </div> 668 669 <h3><?= I18N::translate('Facts for family records') ?></h3> 670 671 <!-- QUICK_REQUIRED_FAMFACTS --> 672 <div class="row form-group"> 673 <label class="col-sm-3 col-form-label" for="QUICK_REQUIRED_FAMFACTS"> 674 <?= I18N::translate('Facts for new families') ?> 675 </label> 676 <div class="col-sm-9"> 677 <?= view('components/select', ['name' => 'QUICK_REQUIRED_FAMFACTS[]', 'id' => 'QUICK_REQUIRED_FAMFACTS', 'selected' => explode(',', $tree->getPreference('QUICK_REQUIRED_FAMFACTS')), 'options' => $all_fam_facts, 'class' => 'select2']) ?> 678 </div> 679 </div> 680 681 <!-- FAM_FACTS_QUICK --> 682 <div class="row form-group"> 683 <label class="col-sm-3 col-form-label" for="FAM_FACTS_QUICK"> 684 <?= I18N::translate('Quick family facts') ?> 685 </label> 686 <div class="col-sm-9"> 687 <?= view('components/select', ['name' => 'FAM_FACTS_QUICK[]', 'id' => 'FAM_FACTS_QUICK', 'selected' => explode(',', $tree->getPreference('FAM_FACTS_QUICK')), 'options' => $all_fam_facts, 'class' => 'select2']) ?> 688 <div class="form-text"> 689 <?= /* I18N: Help text for the “Quick family facts” configuration setting */ I18N::translate('The most common family facts and events are listed separately, so that they can be added more easily.') ?> 690 </div> 691 </div> 692 </div> 693 694 <h3><?= I18N::translate('Other preferences') ?></h3> 695 696 <!-- SURNAME_TRADITION --> 697 <fieldset class="row form-group"> 698 <legend class="col-form-label col-sm-3"> 699 <?= I18N::translate('Surname tradition') ?> 700 </legend> 701 <div class="col-sm-9"> 702 <?= view('components/radios', ['name' => 'SURNAME_TRADITION', 'options' => $all_surname_traditions, 'selected' => $tree->getPreference('SURNAME_TRADITION')]) ?> 703 <div class="form-text"> 704 <?= /* I18N: Help text for the “Surname tradition” configuration setting */ I18N::translate('When you add a new family member, a default surname can be provided. This surname will depend on the local tradition.') ?> 705 </div> 706 </div> 707 </fieldset> 708 709 <!-- FULL_SOURCES --> 710 <fieldset class="row form-group"> 711 <legend class="col-form-label col-sm-3"> 712 <?= /* I18N: A configuration setting */ I18N::translate('Use full source citations') ?> 713 </legend> 714 <div class="col-sm-9"> 715 <?= view('components/radios-inline', ['name' => 'FULL_SOURCES', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('FULL_SOURCES')]) ?> 716 <div class="form-text"> 717 <?= /* I18N: Help text for the “Use full source citations” configuration setting */ I18N::translate('Source citations can include fields to record the quality of the data (primary, secondary, etc.) and the date the event was recorded in the source. If you don’t use these fields, you can disable them when creating new source citations.') ?> 718 </div> 719 </div> 720 </fieldset> 721 722 <!-- PREFER_LEVEL2_SOURCES --> 723 <fieldset class="row form-group"> 724 <legend class="col-form-label col-sm-3"> 725 <?= /* I18N: A configuration setting */ I18N::translate('Source type') ?> 726 </legend> 727 <div class="col-sm-9"> 728 <?= view('components/radios-inline', ['name' => 'PREFER_LEVEL2_SOURCES', 'options' => $source_types, 'selected' => (int) $tree->getPreference('PREFER_LEVEL2_SOURCES')]) ?> 729 <div class="form-text"> 730 <?= /* I18N: Help text for the “Source type” configuration setting */ I18N::translate('When adding new close relatives, you can add source citations to the records (individual and family) or to the facts and events (birth, marriage, and death). This option controls whether records or facts will be selected by default.') ?> 731 </div> 732 </div> 733 </fieldset> 734 735 <!-- NO_UPDATE_CHAN --> 736 <fieldset class="row form-group"> 737 <legend class="col-form-label col-sm-3"> 738 <?= /* I18N: A configuration setting */ I18N::translate('Keep the existing “last change” information') ?> 739 </legend> 740 <div class="col-sm-9"> 741 <?= view('components/radios-inline', ['name' => 'NO_UPDATE_CHAN', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $tree->getPreference('NO_UPDATE_CHAN')]) ?> 742 <div class="form-text"> 743 <?= /* I18N: Help text for the “Keep the existing ‘last change’ information” configuration setting */ I18N::translate('When a record is edited, the user and timestamp are recorded. Sometimes it is desirable to keep the existing “last change” information, for example when making minor corrections to someone else’s data. This option controls whether this feature is selected by default.') ?> 744 </div> 745 </div> 746 </fieldset> 747 748 <div class="row form-group"> 749 <div class="offset-sm-3 col-sm-9"> 750 <button type="submit" class="btn btn-primary"> 751 <?= view('icons/save') ?> 752 <?= I18N::translate('save') ?> 753 </button> 754 <a class="btn btn-secondary" href="<?= e(route(ManageTrees::class, ['tree' => $tree->name()])) ?>"> 755 <?= view('icons/cancel') ?> 756 <?= I18N::translate('cancel') ?> 757 </a> 758 <!-- Coming soon 759 <div class="form-check"> 760 <?php if ($tree_count > 1) : ?> 761 <label> 762 <input type="checkbox" name="all_trees"> 763 <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to all family trees') ?> 764 </label> 765 <?php endif ?> 766 </div> 767 <div class="form-check"> 768 <label> 769 <input type="checkbox" name="new_trees"> 770 <?= /* I18N: Label for checkbox */ I18N::translate('Apply these preferences to new family trees') ?> 771 </label> 772 </div> 773 </div> 774 --> 775 </div> 776</form> 777