@@ -17,27 +17,27 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | class FunctionsPrintLists { |
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * Copy of core function, which is not public. |
|
| 22 | - * |
|
| 23 | - * @param Individual $individual |
|
| 24 | - * |
|
| 25 | - * @return string[] |
|
| 26 | - * @see \Fisharebest\Webtrees\Functions\FunctionsPrintLists |
|
| 27 | - */ |
|
| 28 | - public static function sortableNames(Individual $individual) { |
|
| 29 | - $names = $individual->getAllNames(); |
|
| 30 | - $primary = $individual->getPrimaryName(); |
|
| 20 | + /** |
|
| 21 | + * Copy of core function, which is not public. |
|
| 22 | + * |
|
| 23 | + * @param Individual $individual |
|
| 24 | + * |
|
| 25 | + * @return string[] |
|
| 26 | + * @see \Fisharebest\Webtrees\Functions\FunctionsPrintLists |
|
| 27 | + */ |
|
| 28 | + public static function sortableNames(Individual $individual) { |
|
| 29 | + $names = $individual->getAllNames(); |
|
| 30 | + $primary = $individual->getPrimaryName(); |
|
| 31 | 31 | |
| 32 | - list($surn, $givn) = explode(',', $names[$primary]['sort']); |
|
| 32 | + list($surn, $givn) = explode(',', $names[$primary]['sort']); |
|
| 33 | 33 | |
| 34 | - $givn = str_replace('@P.N.', 'AAAA', $givn); |
|
| 35 | - $surn = str_replace('@N.N.', 'AAAA', $surn); |
|
| 34 | + $givn = str_replace('@P.N.', 'AAAA', $givn); |
|
| 35 | + $surn = str_replace('@N.N.', 'AAAA', $surn); |
|
| 36 | 36 | |
| 37 | - return array( |
|
| 38 | - $surn . 'AAAA' . $givn, |
|
| 39 | - $givn . 'AAAA' . $surn, |
|
| 40 | - ); |
|
| 41 | - } |
|
| 37 | + return array( |
|
| 38 | + $surn . 'AAAA' . $givn, |
|
| 39 | + $givn . 'AAAA' . $surn, |
|
| 40 | + ); |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | 43 | } |
| 44 | 44 | \ No newline at end of file |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | $surn = str_replace('@N.N.', 'AAAA', $surn); |
| 36 | 36 | |
| 37 | 37 | return array( |
| 38 | - $surn . 'AAAA' . $givn, |
|
| 39 | - $givn . 'AAAA' . $surn, |
|
| 38 | + $surn.'AAAA'.$givn, |
|
| 39 | + $givn.'AAAA'.$surn, |
|
| 40 | 40 | ); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -39,13 +39,13 @@ discard block |
||
| 39 | 39 | <input type="hidden" name="ged" value="<?= $this->data->get('url_ged') ?>"> |
| 40 | 40 | <select name="city"> |
| 41 | 41 | <?php foreach ($cities as $city) { ?> |
| 42 | - <option value="<?= Functions::encryptToSafeBase64($city) ?>" <?php if(trim($city) == trim($selected_city)) echo 'selected="selected"'?> ><?= $city ?></option> |
|
| 42 | + <option value="<?= Functions::encryptToSafeBase64($city) ?>" <?php if (trim($city) == trim($selected_city)) echo 'selected="selected"'?> ><?= $city ?></option> |
|
| 43 | 43 | <?php } ?> |
| 44 | 44 | </select> |
| 45 | 45 | <input type="submit" value="<?= I18N::translate('Show') ?>" /> |
| 46 | 46 | </form> |
| 47 | 47 | |
| 48 | - <?php if($this->data->get('has_list', false)) { ?> |
|
| 48 | + <?php if ($this->data->get('has_list', false)) { ?> |
|
| 49 | 49 | <div class="loading-image"> </div> |
| 50 | 50 | <div class="certificate-list"> |
| 51 | 51 | <table id="<?= $this->data->get('table_id') ?>"> |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | ?> |
| 63 | 63 | <tr> |
| 64 | 64 | <!-- Certificate date --> |
| 65 | - <?php if($date = $certificate->getCertificateDate()) { ?> |
|
| 65 | + <?php if ($date = $certificate->getCertificateDate()) { ?> |
|
| 66 | 66 | <td data-sort="<?= $date->julianDay() ?>"><?= $date->display() ?></td> |
| 67 | 67 | <?php } else { ?> |
| 68 | 68 | <td data-sort="0"> </td> |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | <?php |
| 74 | 74 | $name = $certificate->getCertificateDetails() ?: ''; |
| 75 | 75 | $sortname = ""; |
| 76 | - $ct_names=preg_match("/([A-Z]{2,})/", $name, $match); |
|
| 77 | - if($ct_names > 0) $sortname = $match[1].'_'; |
|
| 76 | + $ct_names = preg_match("/([A-Z]{2,})/", $name, $match); |
|
| 77 | + if ($ct_names > 0) $sortname = $match[1].'_'; |
|
| 78 | 78 | $sortname .= $name; |
| 79 | 79 | ?> |
| 80 | 80 | <td data-sort="<?= Filter::escapeHtml($sortname) ?>"> |
@@ -39,7 +39,8 @@ discard block |
||
| 39 | 39 | <input type="hidden" name="ged" value="<?= $this->data->get('url_ged') ?>"> |
| 40 | 40 | <select name="city"> |
| 41 | 41 | <?php foreach ($cities as $city) { ?> |
| 42 | - <option value="<?= Functions::encryptToSafeBase64($city) ?>" <?php if(trim($city) == trim($selected_city)) echo 'selected="selected"'?> ><?= $city ?></option> |
|
| 42 | + <option value="<?= Functions::encryptToSafeBase64($city) ?>" <?php if(trim($city) == trim($selected_city)) { |
|
| 43 | + echo 'selected="selected"'?> ><?= $city ?></option> |
|
| 43 | 44 | <?php } ?> |
| 44 | 45 | </select> |
| 45 | 46 | <input type="submit" value="<?= I18N::translate('Show') ?>" /> |
@@ -72,9 +73,12 @@ discard block |
||
| 72 | 73 | <!-- Certificate Name --> |
| 73 | 74 | <?php |
| 74 | 75 | $name = $certificate->getCertificateDetails() ?: ''; |
| 76 | +} |
|
| 75 | 77 | $sortname = ""; |
| 76 | 78 | $ct_names=preg_match("/([A-Z]{2,})/", $name, $match); |
| 77 | - if($ct_names > 0) $sortname = $match[1].'_'; |
|
| 79 | + if($ct_names > 0) { |
|
| 80 | + $sortname = $match[1].'_'; |
|
| 81 | + } |
|
| 78 | 82 | $sortname .= $name; |
| 79 | 83 | ?> |
| 80 | 84 | <td data-sort="<?= Filter::escapeHtml($sortname) ?>"> |
@@ -24,12 +24,12 @@ discard block |
||
| 24 | 24 | * {@inhericDoc} |
| 25 | 25 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
| 26 | 26 | */ |
| 27 | - protected function renderContent() { |
|
| 27 | + protected function renderContent() { |
|
| 28 | 28 | |
| 29 | - $cities = $this->data->get('cities'); |
|
| 30 | - $selected_city = $this->data->get('selected_city'); |
|
| 29 | + $cities = $this->data->get('cities'); |
|
| 30 | + $selected_city = $this->data->get('selected_city'); |
|
| 31 | 31 | |
| 32 | - ?> |
|
| 32 | + ?> |
|
| 33 | 33 | <div id="maj-cert-list-page" class="center"> |
| 34 | 34 | <h2><?= $this->data->get('title') ?></h2> |
| 35 | 35 | |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | </thead> |
| 59 | 59 | <tbody> |
| 60 | 60 | <?php foreach ($this->data->get('certificate_list') as $certificate) { |
| 61 | - /** @var \MyArtJaub\Webtrees\Module\Certificates\Model\Certificate $certificate */ |
|
| 62 | - ?> |
|
| 61 | + /** @var \MyArtJaub\Webtrees\Module\Certificates\Model\Certificate $certificate */ |
|
| 62 | + ?> |
|
| 63 | 63 | <tr> |
| 64 | 64 | <!-- Certificate date --> |
| 65 | 65 | <?php if($date = $certificate->getCertificateDate()) { ?> |
@@ -71,12 +71,12 @@ discard block |
||
| 71 | 71 | <td><?= Filter::escapeHtml($certificate->getCertificateType() ?: '') ?></td> |
| 72 | 72 | <!-- Certificate Name --> |
| 73 | 73 | <?php |
| 74 | - $name = $certificate->getCertificateDetails() ?: ''; |
|
| 75 | - $sortname = ""; |
|
| 76 | - $ct_names=preg_match("/([A-Z]{2,})/", $name, $match); |
|
| 77 | - if($ct_names > 0) $sortname = $match[1].'_'; |
|
| 78 | - $sortname .= $name; |
|
| 79 | - ?> |
|
| 74 | + $name = $certificate->getCertificateDetails() ?: ''; |
|
| 75 | + $sortname = ""; |
|
| 76 | + $ct_names=preg_match("/([A-Z]{2,})/", $name, $match); |
|
| 77 | + if($ct_names > 0) $sortname = $match[1].'_'; |
|
| 78 | + $sortname .= $name; |
|
| 79 | + ?> |
|
| 80 | 80 | <td data-sort="<?= Filter::escapeHtml($sortname) ?>"> |
| 81 | 81 | <a href="<?= $certificate->getHtmlUrl() ?>"><?= Filter::escapeHtml($name) ?></a> |
| 82 | 82 | </td> |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | </div> |
| 90 | 90 | |
| 91 | 91 | <?php |
| 92 | - } |
|
| 92 | + } |
|
| 93 | 93 | |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | \ No newline at end of file |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | - * |
|
| 5 | - * @package MyArtJaub\Webtrees |
|
| 6 | - * @subpackage Hook |
|
| 7 | - * @author Jonathan Jaubart <[email protected]> |
|
| 8 | - * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | - */ |
|
| 3 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | + * |
|
| 5 | + * @package MyArtJaub\Webtrees |
|
| 6 | + * @subpackage Hook |
|
| 7 | + * @author Jonathan Jaubart <[email protected]> |
|
| 8 | + * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | + */ |
|
| 11 | 11 | namespace MyArtJaub\Webtrees\Hook\HookInterfaces; |
| 12 | 12 | |
| 13 | 13 | use Fisharebest\Webtrees\GedcomRecord; |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | - * |
|
| 5 | - * @package MyArtJaub\Webtrees |
|
| 6 | - * @subpackage Hook |
|
| 7 | - * @author Jonathan Jaubart <[email protected]> |
|
| 8 | - * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | - */ |
|
| 3 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | + * |
|
| 5 | + * @package MyArtJaub\Webtrees |
|
| 6 | + * @subpackage Hook |
|
| 7 | + * @author Jonathan Jaubart <[email protected]> |
|
| 8 | + * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | + */ |
|
| 11 | 11 | namespace MyArtJaub\Webtrees\Hook\HookInterfaces; |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -1,13 +1,13 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | - * |
|
| 5 | - * @package MyArtJaub\Webtrees |
|
| 6 | - * @subpackage Hook |
|
| 7 | - * @author Jonathan Jaubart <[email protected]> |
|
| 8 | - * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | - */ |
|
| 3 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | + * |
|
| 5 | + * @package MyArtJaub\Webtrees |
|
| 6 | + * @subpackage Hook |
|
| 7 | + * @author Jonathan Jaubart <[email protected]> |
|
| 8 | + * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | + */ |
|
| 11 | 11 | namespace MyArtJaub\Webtrees\Hook\HookInterfaces; |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -15,12 +15,12 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | interface PageHeaderExtenderInterface { |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Get HTML code for extending the header of a page. |
|
| 20 | - * |
|
| 21 | - * @return string HTML code extension |
|
| 22 | - */ |
|
| 23 | - public function hPrintHeader(); |
|
| 18 | + /** |
|
| 19 | + * Get HTML code for extending the header of a page. |
|
| 20 | + * |
|
| 21 | + * @return string HTML code extension |
|
| 22 | + */ |
|
| 23 | + public function hPrintHeader(); |
|
| 24 | 24 | |
| 25 | 25 | } |
| 26 | 26 | |
@@ -1,13 +1,13 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | - * |
|
| 5 | - * @package MyArtJaub\Webtrees |
|
| 6 | - * @subpackage Hook |
|
| 7 | - * @author Jonathan Jaubart <[email protected]> |
|
| 8 | - * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | - */ |
|
| 3 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | + * |
|
| 5 | + * @package MyArtJaub\Webtrees |
|
| 6 | + * @subpackage Hook |
|
| 7 | + * @author Jonathan Jaubart <[email protected]> |
|
| 8 | + * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | + */ |
|
| 11 | 11 | namespace MyArtJaub\Webtrees\Hook\HookInterfaces; |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -15,12 +15,12 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | interface PageFooterExtenderInterface { |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Get HTML code for extending the footer of a page. |
|
| 20 | - * |
|
| 21 | - * @return string HTML code extension |
|
| 22 | - */ |
|
| 23 | - public function hPrintFooter(); |
|
| 18 | + /** |
|
| 19 | + * Get HTML code for extending the footer of a page. |
|
| 20 | + * |
|
| 21 | + * @return string HTML code extension |
|
| 22 | + */ |
|
| 23 | + public function hPrintFooter(); |
|
| 24 | 24 | |
| 25 | 25 | } |
| 26 | 26 | |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | - * |
|
| 5 | - * @package MyArtJaub\Webtrees |
|
| 6 | - * @subpackage Hook |
|
| 7 | - * @author Jonathan Jaubart <[email protected]> |
|
| 8 | - * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | - */ |
|
| 3 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | + * |
|
| 5 | + * @package MyArtJaub\Webtrees |
|
| 6 | + * @subpackage Hook |
|
| 7 | + * @author Jonathan Jaubart <[email protected]> |
|
| 8 | + * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | + */ |
|
| 11 | 11 | namespace MyArtJaub\Webtrees\Hook\HookInterfaces; |
| 12 | 12 | |
| 13 | 13 | use Fisharebest\Webtrees\Controller\IndividualController; |
@@ -1,13 +1,13 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | - * |
|
| 5 | - * @package MyArtJaub\Webtrees |
|
| 6 | - * @subpackage Hook |
|
| 7 | - * @author Jonathan Jaubart <[email protected]> |
|
| 8 | - * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | - * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | - */ |
|
| 3 | + * webtrees-lib: MyArtJaub library for webtrees |
|
| 4 | + * |
|
| 5 | + * @package MyArtJaub\Webtrees |
|
| 6 | + * @subpackage Hook |
|
| 7 | + * @author Jonathan Jaubart <[email protected]> |
|
| 8 | + * @copyright Copyright (c) 2011-2016, Jonathan Jaubart |
|
| 9 | + * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
|
| 10 | + */ |
|
| 11 | 11 | namespace MyArtJaub\Webtrees\Hook\HookInterfaces; |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -18,12 +18,12 @@ discard block |
||
| 18 | 18 | interface CustomSimpleTagManagerInterface { |
| 19 | 19 | |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * Returns the list of expected tags, classified by type of records. |
|
| 23 | - * |
|
| 24 | - * @return array List of expected tags |
|
| 25 | - */ |
|
| 26 | - public function hGetExpectedTags(); |
|
| 21 | + /** |
|
| 22 | + * Returns the list of expected tags, classified by type of records. |
|
| 23 | + * |
|
| 24 | + * @return array List of expected tags |
|
| 25 | + */ |
|
| 26 | + public function hGetExpectedTags(); |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Return the HTML code to be display for this tag. |
@@ -31,11 +31,16 @@ |
||
| 31 | 31 | $nb_levels = count($parent); |
| 32 | 32 | for ($i=0; $i < $nb_levels; $i++) { |
| 33 | 33 | $parent[$i] = trim($parent[$i]); |
| 34 | - if (empty($parent[$i])) $parent[$i]='unknown';// GoogleMap module uses "unknown" while GEDCOM uses , , |
|
| 34 | + if (empty($parent[$i])) { |
|
| 35 | + $parent[$i]='unknown'; |
|
| 36 | + } |
|
| 37 | + // GoogleMap module uses "unknown" while GEDCOM uses , , |
|
| 35 | 38 | $pl_id=Database::prepare('SELECT pl_id FROM `##placelocation` WHERE pl_level=? AND pl_parent_id=? AND pl_place LIKE ? ORDER BY pl_place') |
| 36 | 39 | ->execute(array($i, $place_id, $parent[$i])) |
| 37 | 40 | ->fetchOne(); |
| 38 | - if (empty($pl_id)) break; |
|
| 41 | + if (empty($pl_id)) { |
|
| 42 | + break; |
|
| 43 | + } |
|
| 39 | 44 | $place_id = $pl_id; |
| 40 | 45 | } |
| 41 | 46 | return $place_id; |
@@ -25,14 +25,14 @@ discard block |
||
| 25 | 25 | * @see \MyArtJaub\Webtrees\Map\MapProviderInterface::getProviderPlaceId() |
| 26 | 26 | */ |
| 27 | 27 | public function getProviderPlaceId(\Fisharebest\Webtrees\Place $place) { |
| 28 | - if(!$place->isEmpty()) { |
|
| 29 | - $parent = array_reverse(explode (',', $place->getGedcomName())); |
|
| 28 | + if (!$place->isEmpty()) { |
|
| 29 | + $parent = array_reverse(explode(',', $place->getGedcomName())); |
|
| 30 | 30 | $place_id = 0; |
| 31 | 31 | $nb_levels = count($parent); |
| 32 | - for ($i=0; $i < $nb_levels; $i++) { |
|
| 32 | + for ($i = 0; $i < $nb_levels; $i++) { |
|
| 33 | 33 | $parent[$i] = trim($parent[$i]); |
| 34 | - if (empty($parent[$i])) $parent[$i]='unknown';// GoogleMap module uses "unknown" while GEDCOM uses , , |
|
| 35 | - $pl_id=Database::prepare('SELECT pl_id FROM `##placelocation` WHERE pl_level=? AND pl_parent_id=? AND pl_place LIKE ? ORDER BY pl_place') |
|
| 34 | + if (empty($parent[$i])) $parent[$i] = 'unknown'; // GoogleMap module uses "unknown" while GEDCOM uses , , |
|
| 35 | + $pl_id = Database::prepare('SELECT pl_id FROM `##placelocation` WHERE pl_level=? AND pl_parent_id=? AND pl_place LIKE ? ORDER BY pl_place') |
|
| 36 | 36 | ->execute(array($i, $place_id, $parent[$i])) |
| 37 | 37 | ->fetchOne(); |
| 38 | 38 | if (empty($pl_id)) break; |
@@ -48,12 +48,12 @@ discard block |
||
| 48 | 48 | * @see \MyArtJaub\Webtrees\Map\MapProviderInterface::getPlaceIcon() |
| 49 | 49 | */ |
| 50 | 50 | public function getPlaceIcon(\Fisharebest\Webtrees\Place $place) { |
| 51 | - if(!$place->isEmpty()){ |
|
| 51 | + if (!$place->isEmpty()) { |
|
| 52 | 52 | $place_details = |
| 53 | 53 | Database::prepare('SELECT pl_icon FROM `##placelocation` WHERE pl_id=? ORDER BY pl_place') |
| 54 | 54 | ->execute(array($this->getProviderPlaceId($place))) |
| 55 | 55 | ->fetchOneRow(); |
| 56 | - if($place_details){ |
|
| 56 | + if ($place_details) { |
|
| 57 | 57 | return WT_MODULES_DIR.'googlemap/'.$place_details->pl_icon; |
| 58 | 58 | } |
| 59 | 59 | } |