1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Bootstrap4; ?> 2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\FontAwesome; ?> 3dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?> 4dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Tree; ?> 543cb7f92SGreg Roach<?php use Fisharebest\Webtrees\Webtrees; ?> 6dd6b2bfcSGreg Roach 7dd6b2bfcSGreg Roach<?= view('components/breadcrumbs', ['links' => $breadcrumbs]) ?> 8dd6b2bfcSGreg Roach 9dd6b2bfcSGreg Roach<h1><?= $title ?></h1> 10dd6b2bfcSGreg Roach 11dd6b2bfcSGreg Roach<table class="table table-bordered table-striped table-sm table-hover"> 12dd6b2bfcSGreg Roach <thead class="thead-dark"> 13dd6b2bfcSGreg Roach <tr> 14dd6b2bfcSGreg Roach <th><?= I18N::translate('Place') ?></th> 15dd6b2bfcSGreg Roach <th><?= I18N::translate('Latitude') ?></th> 16dd6b2bfcSGreg Roach <th><?= I18N::translate('Longitude') ?></th> 17dd6b2bfcSGreg Roach <th><?= I18N::translate('Zoom level') ?></th> 18dd6b2bfcSGreg Roach <th><?= I18N::translate('Flag') ?> </th> 19dd6b2bfcSGreg Roach <th><?= I18N::translate('Edit') ?></th> 20dd6b2bfcSGreg Roach <th><?= I18N::translate('Delete') ?></th> 21dd6b2bfcSGreg Roach </tr> 22dd6b2bfcSGreg Roach </thead> 23dd6b2bfcSGreg Roach <tbody> 24dd6b2bfcSGreg Roach 25dd6b2bfcSGreg Roach <?php foreach ($placelist as $place) : ?> 26dd6b2bfcSGreg Roach <tr> 27dd6b2bfcSGreg Roach <th scope="row"> 28dd6b2bfcSGreg Roach <a href="<?= e(route('map-data', ['parent_id' => $place->pl_id])) ?>"> 29dd6b2bfcSGreg Roach <?= e($place->pl_place) ?> 30dd6b2bfcSGreg Roach <span class="badge badge-pill badge-<?= $place->badge ?>"> 31dd6b2bfcSGreg Roach <?= I18N::number($place->child_count) ?> 32dd6b2bfcSGreg Roach </span> 33dd6b2bfcSGreg Roach </a> 34dd6b2bfcSGreg Roach </th> 35*d993d560SGreg Roach 360e7a2d23SGreg Roach <td dir="ltr"> 37*d993d560SGreg Roach <?php if ($place->pl_lati === null) : ?> 38*d993d560SGreg Roach <?= view('icons/warning') ?> 39*d993d560SGreg Roach <?php else : ?> 40*d993d560SGreg Roach <?= strtr($place->pl_lati, ['N' => '', 'S' => '-', ',' => '.']) ?> 41*d993d560SGreg Roach <?php endif ?> 42dd6b2bfcSGreg Roach </td> 43*d993d560SGreg Roach 440e7a2d23SGreg Roach <td dir="ltr"> 45*d993d560SGreg Roach <?php if ($place->pl_long === null) : ?> 46*d993d560SGreg Roach <?= view('icons/warning') ?> 47*d993d560SGreg Roach <?php else : ?> 48*d993d560SGreg Roach <?= strtr($place->pl_long, ['E' => '', 'W' => '-', ',' => '.']) ?> 49*d993d560SGreg Roach <?php endif ?> 50dd6b2bfcSGreg Roach </td> 51*d993d560SGreg Roach 52*d993d560SGreg Roach <td dir="ltr"> 53*d993d560SGreg Roach <?php if ($place->pl_zoom === null) : ?> 54*d993d560SGreg Roach <?= view('icons/warning') ?> 55*d993d560SGreg Roach <?php else : ?> 56*d993d560SGreg Roach <?= $place->pl_zoom ?> 57*d993d560SGreg Roach <?php endif ?> 58dd6b2bfcSGreg Roach </td> 59*d993d560SGreg Roach 60dd6b2bfcSGreg Roach <td> 618d0ebef0SGreg Roach <?php if (is_file(Webtrees::MODULES_PATH . 'openstreetmap/' . $place->pl_icon)) : ?> 628d0ebef0SGreg Roach <img src="<?= e(Webtrees::MODULES_PATH . 'openstreetmap/' . $place->pl_icon) ?>" width="25" height="15" alt="<?= I18N::translate("Flag of %s", $place->pl_place) ?>"> 63dd6b2bfcSGreg Roach <?php endif ?> 64dd6b2bfcSGreg Roach </td> 65*d993d560SGreg Roach 66dd6b2bfcSGreg Roach <td> 67dd6b2bfcSGreg Roach <?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['href' => route('map-data-edit', ['place_id' => $place->pl_id, 'parent_id' => $place->pl_parent_id]), 'class' => 'btn btn-primary']) ?> 68dd6b2bfcSGreg Roach </td> 69*d993d560SGreg Roach 70dd6b2bfcSGreg Roach <td> 71dd6b2bfcSGreg Roach <?php if ($place->child_count === 0) : ?> 72dd6b2bfcSGreg Roach <form method="POST" action="<?= e(route('map-data-delete', ['parent_id' => $parent_id, 'place_id' => $place->pl_id])) ?>" 73dd6b2bfcSGreg Roach data-confirm="<?= I18N::translate('Remove this location?') ?>" 74dd6b2bfcSGreg Roach onsubmit="return confirm(this.dataset.confirm)"> 75dd6b2bfcSGreg Roach <?= csrf_field() ?> 76dd6b2bfcSGreg Roach <button type="submit" class="btn btn-danger"> 77dd6b2bfcSGreg Roach <?= FontAwesome::semanticIcon('delete', I18N::translate('delete')) ?> 78dd6b2bfcSGreg Roach </button> 79dd6b2bfcSGreg Roach </form> 80dd6b2bfcSGreg Roach <?php else : ?> 81dd6b2bfcSGreg Roach <button type="button" class="btn btn-danger" disabled> 82*d993d560SGreg Roach <?= view('icons/delete') ?> 83dd6b2bfcSGreg Roach </button> 84dd6b2bfcSGreg Roach <?php endif ?> 85dd6b2bfcSGreg Roach </td> 86dd6b2bfcSGreg Roach </tr> 87dd6b2bfcSGreg Roach <?php endforeach ?> 88dd6b2bfcSGreg Roach </tbody> 89dd6b2bfcSGreg Roach <tfoot> 90dd6b2bfcSGreg Roach <tr> 91dd6b2bfcSGreg Roach <td colspan="7"> 92dd6b2bfcSGreg Roach <a class="btn btn-primary" href="<?= e(route('map-data', ['parent_id' => $parent_id])) ?>"> 93*d993d560SGreg Roach <?= view('icons/add') ?> 94dd6b2bfcSGreg Roach <?= /* I18N: A button label. */ 95dd6b2bfcSGreg Roach I18N::translate('add place') ?> 96dd6b2bfcSGreg Roach </a> 97dd6b2bfcSGreg Roach <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" 98dd6b2bfcSGreg Roach data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 99*d993d560SGreg Roach <?= view('icons/download') ?> 100dd6b2bfcSGreg Roach <?= /* I18N: A button label. */ 101dd6b2bfcSGreg Roach I18N::translate('export file') ?> 102dd6b2bfcSGreg Roach </button> 103dd6b2bfcSGreg Roach <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> 104dd6b2bfcSGreg Roach <a class="dropdown-item" href="<?= e(route('locations-export', ['parent_id' => $parent_id, 'format' => 'csv'])) ?>"> 105dd6b2bfcSGreg Roach csv 106dd6b2bfcSGreg Roach </a> 107dd6b2bfcSGreg Roach <a class="dropdown-item" href="<?= e(route('locations-export', ['parent_id' => $parent_id, 'format' => 'geojson'])) ?>"> 108dd6b2bfcSGreg Roach geoJSON 109dd6b2bfcSGreg Roach </a> 110dd6b2bfcSGreg Roach </div> 111dd6b2bfcSGreg Roach <a class="btn btn-primary" href="<?= e(route('locations-import', ['parent_id' => $parent_id])) ?>"> 112*d993d560SGreg Roach <?= view('icons/upload') ?> 113dd6b2bfcSGreg Roach <?= /* I18N: A button label. */ 114dd6b2bfcSGreg Roach I18N::translate('import file') ?> 115dd6b2bfcSGreg Roach </a> 116dd6b2bfcSGreg Roach </td> 117dd6b2bfcSGreg Roach </tr> 118dd6b2bfcSGreg Roach </tfoot> 119dd6b2bfcSGreg Roach</table> 120dd6b2bfcSGreg Roach 121dd6b2bfcSGreg Roach<form method="POST" action="<?= e(route('locations-import-from-tree')) ?>"> 122dd6b2bfcSGreg Roach <?= csrf_field() ?> 123dd6b2bfcSGreg Roach 124dd6b2bfcSGreg Roach <div class="form-group row"> 125dd6b2bfcSGreg Roach <label class="form-control-plaintext col-sm-4" for="ged"> 126dd6b2bfcSGreg Roach <?= I18N::translate('Import all places from a family tree') ?> 127dd6b2bfcSGreg Roach </label> 128dd6b2bfcSGreg Roach <div class="col-sm-6"> 129dd6b2bfcSGreg Roach <?= Bootstrap4::select( 130dd6b2bfcSGreg Roach Tree::getNameList(), 131dd6b2bfcSGreg Roach '', 132dd6b2bfcSGreg Roach ['id' => 'ged', 'name' => 'ged'] 133dd6b2bfcSGreg Roach ) ?> 134dd6b2bfcSGreg Roach </div> 135dd6b2bfcSGreg Roach <div class="col-sm-2"> 136dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary"> 137dd6b2bfcSGreg Roach <?= view('icons/upload') ?> 138dd6b2bfcSGreg Roach <?= /* I18N: A button label. */ 139dd6b2bfcSGreg Roach I18N::translate('import') ?> 140dd6b2bfcSGreg Roach </button> 141dd6b2bfcSGreg Roach </div> 142dd6b2bfcSGreg Roach </div> 143dd6b2bfcSGreg Roach</form> 144