Skip to content

Commit

Permalink
Update osm branch with changes from master
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Roach committed Jul 14, 2018
1 parent 8e1a797 commit 8ce70df
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 211 deletions.
48 changes: 0 additions & 48 deletions app/Module/OpenStreetMap/Schema/Migration0.php

This file was deleted.

47 changes: 0 additions & 47 deletions app/Module/OpenStreetMap/Schema/Migration1.php

This file was deleted.

31 changes: 0 additions & 31 deletions app/Module/OpenStreetMap/Schema/Migration2.php

This file was deleted.

69 changes: 0 additions & 69 deletions app/Module/OpenStreetMap/Schema/Migration3.php

This file was deleted.

15 changes: 3 additions & 12 deletions app/Module/OpenStreetMapModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
*/
class OpenStreetMapModule extends AbstractModule implements ModuleConfigInterface, ModuleTabInterface, ModuleChartInterface {

// How to update the database schema for this module
const SCHEMA_TARGET_VERSION = 4;
const SCHEMA_SETTING_NAME = 'OSM_SCHEMA_VERSION';
const SCHEMA_MIGRATION_PREFIX = '\Fisharebest\Webtrees\Module\OpenStreetMap\Schema';

// Package version numbers
const LEAFLET = '1.3.1';
const LEAFLET_BEAU = '1.0.5';
Expand Down Expand Up @@ -115,8 +110,6 @@ public function modAction($mod_action) {

/** {@inheritdoc} */
public function getConfigLink() {
Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);

return route('admin-module', ['module' => $this->getName(), 'action' => 'AdminConfig']);
}

Expand All @@ -128,8 +121,8 @@ public function getConfigLink() {
*/
public function getChartMenu(Individual $individual) {
return new Menu(
I18N::translate('Pedigree Map'),
route('module', ['module' => $this->getName(), 'action' => 'Pedigreemap', 'xref' => $individual->getXref()]),
I18N::translate('Pedigree map'),
route('module', ['module' => $this->getName(), 'action' => 'PedigreeMap', 'xref' => $individual->getXref()]),
'menu-chart-pedigreemap',
['rel' => 'nofollow']
);
Expand Down Expand Up @@ -250,8 +243,6 @@ public function getBaseDataAction(Request $request): JsonResponse {
* @throws \Exception
*/
public function getMapDataAction(Request $request): JsonResponse {
Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION);

switch ($request->get('type')) {
case 'placelist':
$response = $this->placelistGetMapData($request);
Expand Down Expand Up @@ -561,7 +552,7 @@ function ($item) {
* @return object
* @throws \Exception
*/
public function getPedigreemapAction(Request $request) {
public function getPedigreeMapAction(Request $request) {
/** @var Tree $tree */
$tree = $request->attributes->get('tree');
$xref = $request->get('xref');
Expand Down
2 changes: 1 addition & 1 deletion resources/views/modules/openstreetmap/pedigreemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<form class="wt-page-options wt-page-options-pedigreemap-chart d-print-none">
<input type="hidden" name="route" value="module">
<input type="hidden" name="module" value="<?= $module ?>">
<input type="hidden" name="action" value="Pedigreemap">
<input type="hidden" name="action" value="PedigreeMap">
<input type="hidden" name="ged" value="<?= e($tree->getName()) ?>">

<div class="form-group row">
Expand Down
11 changes: 8 additions & 3 deletions resources/views/place-events.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php use Fisharebest\Webtrees\Bootstrap4; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
<?php use Fisharebest\Webtrees\Functions\FunctionsPrintLists; ?>

<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
Expand All @@ -21,15 +20,21 @@
<?php if (empty($indilist)): ?>
<p><?= I18N::translate('No results found.') ?></p>
<?php else: ?>
<?= FunctionsPrintLists::individualTable($indilist) ?>
<?= view('tables/individuals', [
'individuals' => $indilist,
'sosa' => false,
'tree' => $tree,
]) ?>
<?php endif ?>
</div>

<div class="tab-pane fade" role="tabpanel" id="families">
<?php if (empty($famlist)): ?>
<p><?= I18N::translate('No results found.') ?></p>
<?php else: ?>
<?= FunctionsPrintLists::familyTable($famlist) ?>
<?= view('tables/families', [
'families' => $famlist,
]) ?>
<?php endif ?>
</div>
</div>

0 comments on commit 8ce70df

Please sign in to comment.