@@ -35,70 +35,70 @@ discard block |
||
35 | 35 | */ |
36 | 36 | class SosaListController extends MvcController |
37 | 37 | { |
38 | - /** |
|
39 | - * Sosa Provider for the controller |
|
40 | - * @var SosaProvider $sosa_provider |
|
41 | - */ |
|
42 | - protected $sosa_provider; |
|
38 | + /** |
|
39 | + * Sosa Provider for the controller |
|
40 | + * @var SosaProvider $sosa_provider |
|
41 | + */ |
|
42 | + protected $sosa_provider; |
|
43 | 43 | |
44 | - /** |
|
45 | - * Generation used for the controller |
|
46 | - * @var int $generation |
|
47 | - */ |
|
48 | - protected $generation; |
|
44 | + /** |
|
45 | + * Generation used for the controller |
|
46 | + * @var int $generation |
|
47 | + */ |
|
48 | + protected $generation; |
|
49 | 49 | |
50 | - /** |
|
51 | - * ViewBag to hold data for the controller |
|
52 | - * @var ViewBag $view_bag |
|
53 | - */ |
|
54 | - protected $view_bag; |
|
50 | + /** |
|
51 | + * ViewBag to hold data for the controller |
|
52 | + * @var ViewBag $view_bag |
|
53 | + */ |
|
54 | + protected $view_bag; |
|
55 | 55 | |
56 | - /** |
|
57 | - * {@inheritDoc} |
|
58 | - * @see \MyArtJaub\Webtrees\Mvc\Controller\MvcController::__construct(AbstractModule $module) |
|
59 | - */ |
|
60 | - public function __construct(AbstractModule $module) { |
|
61 | - global $WT_TREE; |
|
56 | + /** |
|
57 | + * {@inheritDoc} |
|
58 | + * @see \MyArtJaub\Webtrees\Mvc\Controller\MvcController::__construct(AbstractModule $module) |
|
59 | + */ |
|
60 | + public function __construct(AbstractModule $module) { |
|
61 | + global $WT_TREE; |
|
62 | 62 | |
63 | - parent::__construct($module); |
|
63 | + parent::__construct($module); |
|
64 | 64 | |
65 | - $this->sosa_provider = new SosaProvider($WT_TREE, Auth::user()); |
|
65 | + $this->sosa_provider = new SosaProvider($WT_TREE, Auth::user()); |
|
66 | 66 | |
67 | - $this->generation = Filter::getInteger('gen'); |
|
67 | + $this->generation = Filter::getInteger('gen'); |
|
68 | 68 | |
69 | - $this->view_bag = new ViewBag(); |
|
70 | - $this->view_bag->set('generation', $this->generation); |
|
71 | - $this->view_bag->set('max_gen', $this->sosa_provider->getLastGeneration()); |
|
72 | - $this->view_bag->set('is_setup', $this->sosa_provider->isSetup() && $this->view_bag->get('max_gen', 0)> 0); |
|
69 | + $this->view_bag = new ViewBag(); |
|
70 | + $this->view_bag->set('generation', $this->generation); |
|
71 | + $this->view_bag->set('max_gen', $this->sosa_provider->getLastGeneration()); |
|
72 | + $this->view_bag->set('is_setup', $this->sosa_provider->isSetup() && $this->view_bag->get('max_gen', 0)> 0); |
|
73 | 73 | |
74 | - } |
|
74 | + } |
|
75 | 75 | |
76 | 76 | |
77 | - /** |
|
78 | - * Pages |
|
79 | - */ |
|
77 | + /** |
|
78 | + * Pages |
|
79 | + */ |
|
80 | 80 | |
81 | - /** |
|
82 | - * SosaList@index |
|
83 | - */ |
|
84 | - public function index() { |
|
85 | - global $WT_TREE; |
|
81 | + /** |
|
82 | + * SosaList@index |
|
83 | + */ |
|
84 | + public function index() { |
|
85 | + global $WT_TREE; |
|
86 | 86 | |
87 | - $controller = new PageController(); |
|
88 | - $controller |
|
89 | - ->setPageTitle(I18N::translate('Sosa Ancestors')); |
|
87 | + $controller = new PageController(); |
|
88 | + $controller |
|
89 | + ->setPageTitle(I18N::translate('Sosa Ancestors')); |
|
90 | 90 | |
91 | - $this->view_bag->set('title', $controller->getPageTitle()); |
|
91 | + $this->view_bag->set('title', $controller->getPageTitle()); |
|
92 | 92 | |
93 | - if($this->view_bag->get('is_setup', false)) { |
|
94 | - $this->view_bag->set('has_sosa', $this->generation > 0 && $this->sosa_provider->getSosaCountAtGeneration($this->generation) > 0); |
|
95 | - $this->view_bag->set('url_module', $this->module->getName()); |
|
96 | - $this->view_bag->set('url_action', 'SosaList'); |
|
97 | - $this->view_bag->set('url_ged', $WT_TREE->getNameUrl()); |
|
98 | - $this->view_bag->set('min_gen', 1); |
|
93 | + if($this->view_bag->get('is_setup', false)) { |
|
94 | + $this->view_bag->set('has_sosa', $this->generation > 0 && $this->sosa_provider->getSosaCountAtGeneration($this->generation) > 0); |
|
95 | + $this->view_bag->set('url_module', $this->module->getName()); |
|
96 | + $this->view_bag->set('url_action', 'SosaList'); |
|
97 | + $this->view_bag->set('url_ged', $WT_TREE->getNameUrl()); |
|
98 | + $this->view_bag->set('min_gen', 1); |
|
99 | 99 | |
100 | - if($this->view_bag->get('has_sosa', false)) { |
|
101 | - $controller->addInlineJavascript(' |
|
100 | + if($this->view_bag->get('has_sosa', false)) { |
|
101 | + $controller->addInlineJavascript(' |
|
102 | 102 | jQuery("#sosalist-tabs").tabs(); |
103 | 103 | jQuery("#sosalist-tabs").css("visibility", "visible"); |
104 | 104 | |
@@ -152,44 +152,44 @@ discard block |
||
152 | 152 | ); |
153 | 153 | |
154 | 154 | '); |
155 | - } |
|
156 | - } |
|
155 | + } |
|
156 | + } |
|
157 | 157 | |
158 | - ViewFactory::make('SosaList', $this, $controller, $this->view_bag)->render(); |
|
159 | - } |
|
158 | + ViewFactory::make('SosaList', $this, $controller, $this->view_bag)->render(); |
|
159 | + } |
|
160 | 160 | |
161 | 161 | |
162 | - /** |
|
163 | - * SosaList@missing |
|
164 | - */ |
|
165 | - public function missing() { |
|
166 | - global $WT_TREE; |
|
162 | + /** |
|
163 | + * SosaList@missing |
|
164 | + */ |
|
165 | + public function missing() { |
|
166 | + global $WT_TREE; |
|
167 | 167 | |
168 | - $controller = new PageController(); |
|
169 | - $controller |
|
170 | - ->setPageTitle(I18N::translate('Missing Ancestors')); |
|
168 | + $controller = new PageController(); |
|
169 | + $controller |
|
170 | + ->setPageTitle(I18N::translate('Missing Ancestors')); |
|
171 | 171 | |
172 | - $this->view_bag->set('title', $controller->getPageTitle()); |
|
172 | + $this->view_bag->set('title', $controller->getPageTitle()); |
|
173 | 173 | |
174 | - if($this->view_bag->get('is_setup', false)) { |
|
175 | - $this->view_bag->set('url_module', $this->module->getName()); |
|
176 | - $this->view_bag->set('url_action', 'SosaList@missing'); |
|
177 | - $this->view_bag->set('url_ged', $WT_TREE->getNameUrl()); |
|
178 | - $this->view_bag->set('min_gen', 2); |
|
174 | + if($this->view_bag->get('is_setup', false)) { |
|
175 | + $this->view_bag->set('url_module', $this->module->getName()); |
|
176 | + $this->view_bag->set('url_action', 'SosaList@missing'); |
|
177 | + $this->view_bag->set('url_ged', $WT_TREE->getNameUrl()); |
|
178 | + $this->view_bag->set('min_gen', 2); |
|
179 | 179 | |
180 | - $missing_list = $this->sosa_provider->getMissingSosaListAtGeneration($this->generation); |
|
181 | - $this->view_bag->set('has_missing', $this->generation > 0 && count($missing_list) > 0); |
|
180 | + $missing_list = $this->sosa_provider->getMissingSosaListAtGeneration($this->generation); |
|
181 | + $this->view_bag->set('has_missing', $this->generation > 0 && count($missing_list) > 0); |
|
182 | 182 | |
183 | - $perc_sosa = Functions::safeDivision($this->sosa_provider->getSosaCountAtGeneration($this->generation), pow(2, $this->generation -1)); |
|
184 | - $this->view_bag->set('perc_sosa', $perc_sosa); |
|
183 | + $perc_sosa = Functions::safeDivision($this->sosa_provider->getSosaCountAtGeneration($this->generation), pow(2, $this->generation -1)); |
|
184 | + $this->view_bag->set('perc_sosa', $perc_sosa); |
|
185 | 185 | |
186 | - if($this->view_bag->get('has_missing', false)) { |
|
187 | - $table_id = 'table-sosa-missing-' . Uuid::uuid4(); |
|
188 | - $this->view_bag->set('table_id', $table_id); |
|
186 | + if($this->view_bag->get('has_missing', false)) { |
|
187 | + $table_id = 'table-sosa-missing-' . Uuid::uuid4(); |
|
188 | + $this->view_bag->set('table_id', $table_id); |
|
189 | 189 | |
190 | - $controller |
|
191 | - ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL) |
|
192 | - ->addInlineJavascript(' |
|
190 | + $controller |
|
191 | + ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL) |
|
192 | + ->addInlineJavascript(' |
|
193 | 193 | /* Initialise datatables */ |
194 | 194 | jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))}; |
195 | 195 | jQuery.fn.dataTableExt.oSort["unicode-desc" ]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))}; |
@@ -249,78 +249,78 @@ discard block |
||
249 | 249 | jQuery(".loading-image").css("display", "none"); |
250 | 250 | '); |
251 | 251 | |
252 | - $nb_displayed = 0; |
|
253 | - $unique_indis = array(); |
|
254 | - $sum_missing_different = 0; |
|
255 | - $sum_missing_different_without_hidden = 0; |
|
256 | - foreach($missing_list as $num => $missing_tab) { |
|
257 | - if(isset($unique_indis[$missing_tab['indi']])) { |
|
258 | - unset($missing_list[$num]); |
|
259 | - continue; |
|
260 | - } |
|
261 | - $sum_missing_different += !$missing_tab['has_father'] + !$missing_tab['has_mother']; |
|
262 | - $person = Individual::getInstance($missing_tab['indi'], $WT_TREE); |
|
263 | - if (!$person || !$person->canShowName()) { |
|
264 | - unset($missing_list[$num]); |
|
265 | - continue; |
|
266 | - } |
|
267 | - $sum_missing_different_without_hidden += !$missing_tab['has_father'] + !$missing_tab['has_mother']; |
|
268 | - $unique_indis[$person->getXref()] = true; |
|
269 | - $missing_tab['indi'] = $person; |
|
270 | - $missing_list[$num] = $missing_tab; |
|
271 | - } |
|
272 | - $this->view_bag->set('missing_list', $missing_list); |
|
273 | - $this->view_bag->set('missing_diff_count', $sum_missing_different); |
|
274 | - $this->view_bag->set('missing_hidden', $sum_missing_different - $sum_missing_different_without_hidden); |
|
275 | - $perc_sosa_potential = Functions::safeDivision($this->sosa_provider->getSosaCountAtGeneration($this->generation - 1), pow(2, $this->generation-2)); |
|
276 | - $this->view_bag->set('perc_sosa_potential', $perc_sosa_potential); |
|
277 | - } |
|
278 | - } |
|
252 | + $nb_displayed = 0; |
|
253 | + $unique_indis = array(); |
|
254 | + $sum_missing_different = 0; |
|
255 | + $sum_missing_different_without_hidden = 0; |
|
256 | + foreach($missing_list as $num => $missing_tab) { |
|
257 | + if(isset($unique_indis[$missing_tab['indi']])) { |
|
258 | + unset($missing_list[$num]); |
|
259 | + continue; |
|
260 | + } |
|
261 | + $sum_missing_different += !$missing_tab['has_father'] + !$missing_tab['has_mother']; |
|
262 | + $person = Individual::getInstance($missing_tab['indi'], $WT_TREE); |
|
263 | + if (!$person || !$person->canShowName()) { |
|
264 | + unset($missing_list[$num]); |
|
265 | + continue; |
|
266 | + } |
|
267 | + $sum_missing_different_without_hidden += !$missing_tab['has_father'] + !$missing_tab['has_mother']; |
|
268 | + $unique_indis[$person->getXref()] = true; |
|
269 | + $missing_tab['indi'] = $person; |
|
270 | + $missing_list[$num] = $missing_tab; |
|
271 | + } |
|
272 | + $this->view_bag->set('missing_list', $missing_list); |
|
273 | + $this->view_bag->set('missing_diff_count', $sum_missing_different); |
|
274 | + $this->view_bag->set('missing_hidden', $sum_missing_different - $sum_missing_different_without_hidden); |
|
275 | + $perc_sosa_potential = Functions::safeDivision($this->sosa_provider->getSosaCountAtGeneration($this->generation - 1), pow(2, $this->generation-2)); |
|
276 | + $this->view_bag->set('perc_sosa_potential', $perc_sosa_potential); |
|
277 | + } |
|
278 | + } |
|
279 | 279 | |
280 | - ViewFactory::make('SosaListMissing', $this, $controller, $this->view_bag)->render(); |
|
281 | - } |
|
280 | + ViewFactory::make('SosaListMissing', $this, $controller, $this->view_bag)->render(); |
|
281 | + } |
|
282 | 282 | |
283 | - /** |
|
284 | - * SosaList@sosalist |
|
285 | - */ |
|
286 | - public function sosalist() { |
|
283 | + /** |
|
284 | + * SosaList@sosalist |
|
285 | + */ |
|
286 | + public function sosalist() { |
|
287 | 287 | |
288 | - $type = Filter::get('type', 'indi|fam', null); |
|
288 | + $type = Filter::get('type', 'indi|fam', null); |
|
289 | 289 | |
290 | - $controller = new AjaxController(); |
|
291 | - $controller->restrictAccess($this->generation > 0 || !is_null($type)); |
|
290 | + $controller = new AjaxController(); |
|
291 | + $controller->restrictAccess($this->generation > 0 || !is_null($type)); |
|
292 | 292 | |
293 | - switch ($type){ |
|
294 | - case 'indi': |
|
295 | - $this->renderSosaListIndi($controller); |
|
296 | - break; |
|
297 | - case 'fam': |
|
298 | - $this->renderFamSosaListIndi($controller); |
|
299 | - break; |
|
300 | - default: |
|
301 | - break; |
|
302 | - } |
|
293 | + switch ($type){ |
|
294 | + case 'indi': |
|
295 | + $this->renderSosaListIndi($controller); |
|
296 | + break; |
|
297 | + case 'fam': |
|
298 | + $this->renderFamSosaListIndi($controller); |
|
299 | + break; |
|
300 | + default: |
|
301 | + break; |
|
302 | + } |
|
303 | 303 | |
304 | - } |
|
304 | + } |
|
305 | 305 | |
306 | - /** |
|
307 | - * Render the Ajax response for the sortable table of Sosa individuals |
|
308 | - * @param AjaxController $controller |
|
309 | - */ |
|
310 | - protected function renderSosaListIndi(AjaxController $controller) { |
|
311 | - global $WT_TREE; |
|
306 | + /** |
|
307 | + * Render the Ajax response for the sortable table of Sosa individuals |
|
308 | + * @param AjaxController $controller |
|
309 | + */ |
|
310 | + protected function renderSosaListIndi(AjaxController $controller) { |
|
311 | + global $WT_TREE; |
|
312 | 312 | |
313 | - $listSosa = $this->sosa_provider->getSosaListAtGeneration($this->generation); |
|
314 | - $this->view_bag->set('has_sosa', false); |
|
313 | + $listSosa = $this->sosa_provider->getSosaListAtGeneration($this->generation); |
|
314 | + $this->view_bag->set('has_sosa', false); |
|
315 | 315 | |
316 | - if(count($listSosa) > 0) { |
|
317 | - $this->view_bag->set('has_sosa', true); |
|
318 | - $table_id = 'table-sosa-indi-' . Uuid::uuid4(); |
|
319 | - $this->view_bag->set('table_id', $table_id); |
|
316 | + if(count($listSosa) > 0) { |
|
317 | + $this->view_bag->set('has_sosa', true); |
|
318 | + $table_id = 'table-sosa-indi-' . Uuid::uuid4(); |
|
319 | + $this->view_bag->set('table_id', $table_id); |
|
320 | 320 | |
321 | - $controller |
|
322 | - ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL) |
|
323 | - ->addInlineJavascript(' |
|
321 | + $controller |
|
322 | + ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL) |
|
323 | + ->addInlineJavascript(' |
|
324 | 324 | jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))}; |
325 | 325 | jQuery.fn.dataTableExt.oSort["unicode-desc" ]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))}; |
326 | 326 | jQuery.fn.dataTableExt.oSort["num-html-asc" ]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a<b) ? -1 : (a>b ? 1 : 0);}; |
@@ -396,98 +396,98 @@ discard block |
||
396 | 396 | jQuery("#btn-toggle-statistics-'.$table_id.'").click(); |
397 | 397 | '); |
398 | 398 | |
399 | - $stats = new Stats($WT_TREE); |
|
399 | + $stats = new Stats($WT_TREE); |
|
400 | 400 | |
401 | - // Bad data can cause "longest life" to be huge, blowing memory limits |
|
402 | - $max_age = min($WT_TREE->getPreference('MAX_ALIVE_AGE'), $stats->LongestLifeAge()) + 1; |
|
403 | - // Inititialise chart data |
|
404 | - $deat_by_age = array(); |
|
405 | - for ($age = 0; $age <= $max_age; $age++) { |
|
406 | - $deat_by_age[$age] = ''; |
|
407 | - } |
|
408 | - $birt_by_decade = array(); |
|
409 | - $deat_by_decade = array(); |
|
410 | - for ($year = 1550; $year < 2030; $year += 10) { |
|
411 | - $birt_by_decade[$year] = ''; |
|
412 | - $deat_by_decade[$year] = ''; |
|
413 | - } |
|
401 | + // Bad data can cause "longest life" to be huge, blowing memory limits |
|
402 | + $max_age = min($WT_TREE->getPreference('MAX_ALIVE_AGE'), $stats->LongestLifeAge()) + 1; |
|
403 | + // Inititialise chart data |
|
404 | + $deat_by_age = array(); |
|
405 | + for ($age = 0; $age <= $max_age; $age++) { |
|
406 | + $deat_by_age[$age] = ''; |
|
407 | + } |
|
408 | + $birt_by_decade = array(); |
|
409 | + $deat_by_decade = array(); |
|
410 | + for ($year = 1550; $year < 2030; $year += 10) { |
|
411 | + $birt_by_decade[$year] = ''; |
|
412 | + $deat_by_decade[$year] = ''; |
|
413 | + } |
|
414 | 414 | |
415 | - $unique_indis = array(); // Don't double-count indis with multiple names. |
|
416 | - $nb_displayed = 0; |
|
415 | + $unique_indis = array(); // Don't double-count indis with multiple names. |
|
416 | + $nb_displayed = 0; |
|
417 | 417 | |
418 | - Individual::load($WT_TREE, $listSosa); |
|
419 | - foreach($listSosa as $sosa => $pid) { |
|
420 | - $person = Individual::getInstance($pid, $WT_TREE); |
|
421 | - if (!$person || !$person->canShowName()) { |
|
422 | - unset($listSosa[$sosa]); |
|
423 | - continue; |
|
424 | - } |
|
425 | - $nb_displayed++; |
|
426 | - if ($birth_dates=$person->getAllBirthDates()) { |
|
427 | - if ( |
|
428 | - $birth_dates[0]->gregorianYear()>=1550 && |
|
429 | - $birth_dates[0]->gregorianYear()<2030 && |
|
430 | - !isset($unique_indis[$person->getXref()]) |
|
431 | - ) { |
|
432 | - $birt_by_decade[(int)($birth_dates[0]->gregorianYear()/10)*10] .= $person->getSex(); |
|
433 | - } |
|
434 | - } |
|
435 | - else { |
|
436 | - $birth_dates[0]=new Date(''); |
|
437 | - } |
|
438 | - if ($death_dates = $person->getAllDeathDates()) { |
|
439 | - if ( |
|
440 | - $death_dates[0]->gregorianYear() >= 1550 && |
|
441 | - $death_dates[0]->gregorianYear() < 2030 && |
|
442 | - !isset($unique_indis[$person->getXref()]) |
|
443 | - ) { |
|
444 | - $deat_by_decade[(int) ($death_dates[0]->gregorianYear() / 10) * 10] .= $person->getSex(); |
|
445 | - } |
|
446 | - } |
|
447 | - else { |
|
448 | - $death_dates[0] = new Date(''); |
|
449 | - } |
|
450 | - $age = Date::getAge($birth_dates[0], $death_dates[0], 0); |
|
451 | - if (!isset($unique_indis[$person->getXref()]) && $age >= 0 && $age <= $max_age) { |
|
452 | - $deat_by_age[$age] .= $person->getSex(); |
|
453 | - } |
|
454 | - $listSosa[$sosa] = $person; |
|
455 | - $unique_indis[$person->getXref()] = true; |
|
456 | - } |
|
457 | - $this->view_bag->set('sosa_list', $listSosa); |
|
418 | + Individual::load($WT_TREE, $listSosa); |
|
419 | + foreach($listSosa as $sosa => $pid) { |
|
420 | + $person = Individual::getInstance($pid, $WT_TREE); |
|
421 | + if (!$person || !$person->canShowName()) { |
|
422 | + unset($listSosa[$sosa]); |
|
423 | + continue; |
|
424 | + } |
|
425 | + $nb_displayed++; |
|
426 | + if ($birth_dates=$person->getAllBirthDates()) { |
|
427 | + if ( |
|
428 | + $birth_dates[0]->gregorianYear()>=1550 && |
|
429 | + $birth_dates[0]->gregorianYear()<2030 && |
|
430 | + !isset($unique_indis[$person->getXref()]) |
|
431 | + ) { |
|
432 | + $birt_by_decade[(int)($birth_dates[0]->gregorianYear()/10)*10] .= $person->getSex(); |
|
433 | + } |
|
434 | + } |
|
435 | + else { |
|
436 | + $birth_dates[0]=new Date(''); |
|
437 | + } |
|
438 | + if ($death_dates = $person->getAllDeathDates()) { |
|
439 | + if ( |
|
440 | + $death_dates[0]->gregorianYear() >= 1550 && |
|
441 | + $death_dates[0]->gregorianYear() < 2030 && |
|
442 | + !isset($unique_indis[$person->getXref()]) |
|
443 | + ) { |
|
444 | + $deat_by_decade[(int) ($death_dates[0]->gregorianYear() / 10) * 10] .= $person->getSex(); |
|
445 | + } |
|
446 | + } |
|
447 | + else { |
|
448 | + $death_dates[0] = new Date(''); |
|
449 | + } |
|
450 | + $age = Date::getAge($birth_dates[0], $death_dates[0], 0); |
|
451 | + if (!isset($unique_indis[$person->getXref()]) && $age >= 0 && $age <= $max_age) { |
|
452 | + $deat_by_age[$age] .= $person->getSex(); |
|
453 | + } |
|
454 | + $listSosa[$sosa] = $person; |
|
455 | + $unique_indis[$person->getXref()] = true; |
|
456 | + } |
|
457 | + $this->view_bag->set('sosa_list', $listSosa); |
|
458 | 458 | |
459 | - $this->view_bag->set('sosa_count', count($listSosa)); |
|
460 | - $this->view_bag->set('sosa_theo', pow(2, $this->generation-1)); |
|
461 | - $this->view_bag->set('sosa_ratio', Functions::safeDivision($this->view_bag->get('sosa_count'), $this->view_bag->get('sosa_theo'))); |
|
459 | + $this->view_bag->set('sosa_count', count($listSosa)); |
|
460 | + $this->view_bag->set('sosa_theo', pow(2, $this->generation-1)); |
|
461 | + $this->view_bag->set('sosa_ratio', Functions::safeDivision($this->view_bag->get('sosa_count'), $this->view_bag->get('sosa_theo'))); |
|
462 | 462 | |
463 | - $this->view_bag->set('sosa_hidden', $this->view_bag->get('sosa_count') - $nb_displayed); |
|
463 | + $this->view_bag->set('sosa_hidden', $this->view_bag->get('sosa_count') - $nb_displayed); |
|
464 | 464 | |
465 | - $this->view_bag->set('chart_births', FunctionsPrintLists::chartByDecade($birt_by_decade, I18N::translate('Decade of birth'))); |
|
466 | - $this->view_bag->set('chart_deaths', FunctionsPrintLists::chartByDecade($deat_by_decade, I18N::translate('Decade of death'))); |
|
467 | - $this->view_bag->set('chart_ages', FunctionsPrintLists::chartByAge($deat_by_age, I18N::translate('Age related to death year'))); |
|
468 | - } |
|
465 | + $this->view_bag->set('chart_births', FunctionsPrintLists::chartByDecade($birt_by_decade, I18N::translate('Decade of birth'))); |
|
466 | + $this->view_bag->set('chart_deaths', FunctionsPrintLists::chartByDecade($deat_by_decade, I18N::translate('Decade of death'))); |
|
467 | + $this->view_bag->set('chart_ages', FunctionsPrintLists::chartByAge($deat_by_age, I18N::translate('Age related to death year'))); |
|
468 | + } |
|
469 | 469 | |
470 | - ViewFactory::make('SosaListIndi', $this, $controller, $this->view_bag)->render(); |
|
471 | - } |
|
470 | + ViewFactory::make('SosaListIndi', $this, $controller, $this->view_bag)->render(); |
|
471 | + } |
|
472 | 472 | |
473 | - /** |
|
474 | - * Render the Ajax response for the sortable table of Sosa family |
|
475 | - * @param AjaxController $controller |
|
476 | - */ |
|
477 | - protected function renderFamSosaListIndi(AjaxController $controller) { |
|
478 | - global $WT_TREE; |
|
473 | + /** |
|
474 | + * Render the Ajax response for the sortable table of Sosa family |
|
475 | + * @param AjaxController $controller |
|
476 | + */ |
|
477 | + protected function renderFamSosaListIndi(AjaxController $controller) { |
|
478 | + global $WT_TREE; |
|
479 | 479 | |
480 | - $listFamSosa = $this->sosa_provider->getFamilySosaListAtGeneration($this->generation);; |
|
481 | - $this->view_bag->set('has_sosa', false); |
|
480 | + $listFamSosa = $this->sosa_provider->getFamilySosaListAtGeneration($this->generation);; |
|
481 | + $this->view_bag->set('has_sosa', false); |
|
482 | 482 | |
483 | - if(count($listFamSosa) > 0) { |
|
484 | - $this->view_bag->set('has_sosa', true); |
|
485 | - $table_id = 'table-sosa-fam-' . Uuid::uuid4(); |
|
486 | - $this->view_bag->set('table_id', $table_id); |
|
483 | + if(count($listFamSosa) > 0) { |
|
484 | + $this->view_bag->set('has_sosa', true); |
|
485 | + $table_id = 'table-sosa-fam-' . Uuid::uuid4(); |
|
486 | + $this->view_bag->set('table_id', $table_id); |
|
487 | 487 | |
488 | - $controller |
|
489 | - ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL) |
|
490 | - ->addInlineJavascript(' |
|
488 | + $controller |
|
489 | + ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL) |
|
490 | + ->addInlineJavascript(' |
|
491 | 491 | jQuery.fn.dataTableExt.oSort["unicode-asc" ]=function(a,b) {return a.replace(/<[^<]*>/, "").localeCompare(b.replace(/<[^<]*>/, ""))}; |
492 | 492 | jQuery.fn.dataTableExt.oSort["unicode-desc" ]=function(a,b) {return b.replace(/<[^<]*>/, "").localeCompare(a.replace(/<[^<]*>/, ""))}; |
493 | 493 | jQuery.fn.dataTableExt.oSort["num-html-asc" ]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a<b) ? -1 : (a>b ? 1 : 0);}; |
@@ -563,68 +563,68 @@ discard block |
||
563 | 563 | jQuery("#btn-toggle-statistics-'.$table_id.'").click(); |
564 | 564 | '); |
565 | 565 | |
566 | - $stats = new Stats($WT_TREE); |
|
567 | - $max_age = max($stats->oldestMarriageMaleAge(), $stats->oldestMarriageFemaleAge()) + 1; |
|
566 | + $stats = new Stats($WT_TREE); |
|
567 | + $max_age = max($stats->oldestMarriageMaleAge(), $stats->oldestMarriageFemaleAge()) + 1; |
|
568 | 568 | |
569 | - //-- init chart data |
|
570 | - $marr_by_age = array(); |
|
571 | - for ($age=0; $age<=$max_age; $age++) { |
|
572 | - $marr_by_age[$age] = ''; |
|
573 | - } |
|
574 | - $birt_by_decade = array(); |
|
575 | - $marr_by_decade = array(); |
|
576 | - for ($year=1550; $year<2030; $year+=10) { |
|
577 | - $birt_by_decade[$year] = ''; |
|
578 | - $marr_by_decade[$year] = ''; |
|
579 | - } |
|
569 | + //-- init chart data |
|
570 | + $marr_by_age = array(); |
|
571 | + for ($age=0; $age<=$max_age; $age++) { |
|
572 | + $marr_by_age[$age] = ''; |
|
573 | + } |
|
574 | + $birt_by_decade = array(); |
|
575 | + $marr_by_decade = array(); |
|
576 | + for ($year=1550; $year<2030; $year+=10) { |
|
577 | + $birt_by_decade[$year] = ''; |
|
578 | + $marr_by_decade[$year] = ''; |
|
579 | + } |
|
580 | 580 | |
581 | - foreach($listFamSosa as $sosa => $fid) { |
|
582 | - $sfamily = Family::getInstance($fid, $WT_TREE); |
|
583 | - if(!$sfamily || !$sfamily->canShow()) { |
|
584 | - unset($sfamily[$sosa]); |
|
585 | - continue; |
|
586 | - } |
|
587 | - $mdate=$sfamily->getMarriageDate(); |
|
581 | + foreach($listFamSosa as $sosa => $fid) { |
|
582 | + $sfamily = Family::getInstance($fid, $WT_TREE); |
|
583 | + if(!$sfamily || !$sfamily->canShow()) { |
|
584 | + unset($sfamily[$sosa]); |
|
585 | + continue; |
|
586 | + } |
|
587 | + $mdate=$sfamily->getMarriageDate(); |
|
588 | 588 | |
589 | - if( ($husb = $sfamily->getHusband()) && |
|
590 | - ($hdate = $husb->getBirthDate()) && |
|
591 | - $hdate->isOK() && $mdate->isOK()) { |
|
592 | - if ($hdate->gregorianYear() >= 1550 && $hdate->gregorianYear() < 2030) { |
|
593 | - $birt_by_decade[(int) ($hdate->gregorianYear() / 10) * 10] .= $husb->getSex(); |
|
594 | - } |
|
595 | - $hage = Date::getAge($hdate, $mdate, 0); |
|
596 | - if ($hage >= 0 && $hage <= $max_age) { |
|
597 | - $marr_by_age[$hage] .= $husb->getSex(); |
|
598 | - } |
|
599 | - } |
|
589 | + if( ($husb = $sfamily->getHusband()) && |
|
590 | + ($hdate = $husb->getBirthDate()) && |
|
591 | + $hdate->isOK() && $mdate->isOK()) { |
|
592 | + if ($hdate->gregorianYear() >= 1550 && $hdate->gregorianYear() < 2030) { |
|
593 | + $birt_by_decade[(int) ($hdate->gregorianYear() / 10) * 10] .= $husb->getSex(); |
|
594 | + } |
|
595 | + $hage = Date::getAge($hdate, $mdate, 0); |
|
596 | + if ($hage >= 0 && $hage <= $max_age) { |
|
597 | + $marr_by_age[$hage] .= $husb->getSex(); |
|
598 | + } |
|
599 | + } |
|
600 | 600 | |
601 | - if(($wife = $sfamily->getWife()) && |
|
602 | - ($wdate=$wife->getBirthDate()) && |
|
603 | - $wdate->isOK() && $mdate->isOK()) { |
|
604 | - if ($wdate->gregorianYear() >= 1550 && $wdate->gregorianYear() < 2030) { |
|
605 | - $birt_by_decade[(int) ($wdate->gregorianYear() / 10) * 10] .= $wife->getSex(); |
|
606 | - } |
|
607 | - $wage = Date::getAge($wdate, $mdate, 0); |
|
608 | - if ($wage >= 0 && $wage <= $max_age) { |
|
609 | - $marr_by_age[$wage] .= $wife->getSex(); |
|
610 | - } |
|
611 | - } |
|
601 | + if(($wife = $sfamily->getWife()) && |
|
602 | + ($wdate=$wife->getBirthDate()) && |
|
603 | + $wdate->isOK() && $mdate->isOK()) { |
|
604 | + if ($wdate->gregorianYear() >= 1550 && $wdate->gregorianYear() < 2030) { |
|
605 | + $birt_by_decade[(int) ($wdate->gregorianYear() / 10) * 10] .= $wife->getSex(); |
|
606 | + } |
|
607 | + $wage = Date::getAge($wdate, $mdate, 0); |
|
608 | + if ($wage >= 0 && $wage <= $max_age) { |
|
609 | + $marr_by_age[$wage] .= $wife->getSex(); |
|
610 | + } |
|
611 | + } |
|
612 | 612 | |
613 | - if ($mdate->isOK() && $mdate->gregorianYear() >= 1550 && $mdate->gregorianYear() < 2030 && $husb && $wife) { |
|
614 | - $marr_by_decade[(int) ($mdate->gregorianYear() / 10) * 10] .= $husb->getSex() . $wife->getSex(); |
|
615 | - } |
|
613 | + if ($mdate->isOK() && $mdate->gregorianYear() >= 1550 && $mdate->gregorianYear() < 2030 && $husb && $wife) { |
|
614 | + $marr_by_decade[(int) ($mdate->gregorianYear() / 10) * 10] .= $husb->getSex() . $wife->getSex(); |
|
615 | + } |
|
616 | 616 | |
617 | - $listFamSosa[$sosa] = $sfamily; |
|
618 | - } |
|
619 | - $this->view_bag->set('sosa_list', $listFamSosa); |
|
617 | + $listFamSosa[$sosa] = $sfamily; |
|
618 | + } |
|
619 | + $this->view_bag->set('sosa_list', $listFamSosa); |
|
620 | 620 | |
621 | - $this->view_bag->set('chart_births', FunctionsPrintLists::chartByDecade($birt_by_decade, I18N::translate('Decade of birth'))); |
|
622 | - $this->view_bag->set('chart_marriages', FunctionsPrintLists::chartByDecade($marr_by_decade, I18N::translate('Decade of marriage'))); |
|
623 | - $this->view_bag->set('chart_ages', FunctionsPrintLists::chartByAge($marr_by_age, I18N::translate('Age in year of marriage'))); |
|
624 | - } |
|
621 | + $this->view_bag->set('chart_births', FunctionsPrintLists::chartByDecade($birt_by_decade, I18N::translate('Decade of birth'))); |
|
622 | + $this->view_bag->set('chart_marriages', FunctionsPrintLists::chartByDecade($marr_by_decade, I18N::translate('Decade of marriage'))); |
|
623 | + $this->view_bag->set('chart_ages', FunctionsPrintLists::chartByAge($marr_by_age, I18N::translate('Age in year of marriage'))); |
|
624 | + } |
|
625 | 625 | |
626 | - ViewFactory::make('SosaListFam', $this, $controller, $this->view_bag)->render(); |
|
627 | - } |
|
626 | + ViewFactory::make('SosaListFam', $this, $controller, $this->view_bag)->render(); |
|
627 | + } |
|
628 | 628 | |
629 | 629 | |
630 | 630 | } |
631 | 631 | \ No newline at end of file |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $this->view_bag = new ViewBag(); |
70 | 70 | $this->view_bag->set('generation', $this->generation); |
71 | 71 | $this->view_bag->set('max_gen', $this->sosa_provider->getLastGeneration()); |
72 | - $this->view_bag->set('is_setup', $this->sosa_provider->isSetup() && $this->view_bag->get('max_gen', 0)> 0); |
|
72 | + $this->view_bag->set('is_setup', $this->sosa_provider->isSetup() && $this->view_bag->get('max_gen', 0) > 0); |
|
73 | 73 | |
74 | 74 | } |
75 | 75 | |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | |
91 | 91 | $this->view_bag->set('title', $controller->getPageTitle()); |
92 | 92 | |
93 | - if($this->view_bag->get('is_setup', false)) { |
|
93 | + if ($this->view_bag->get('is_setup', false)) { |
|
94 | 94 | $this->view_bag->set('has_sosa', $this->generation > 0 && $this->sosa_provider->getSosaCountAtGeneration($this->generation) > 0); |
95 | 95 | $this->view_bag->set('url_module', $this->module->getName()); |
96 | 96 | $this->view_bag->set('url_action', 'SosaList'); |
97 | 97 | $this->view_bag->set('url_ged', $WT_TREE->getNameUrl()); |
98 | 98 | $this->view_bag->set('min_gen', 1); |
99 | 99 | |
100 | - if($this->view_bag->get('has_sosa', false)) { |
|
100 | + if ($this->view_bag->get('has_sosa', false)) { |
|
101 | 101 | $controller->addInlineJavascript(' |
102 | 102 | jQuery("#sosalist-tabs").tabs(); |
103 | 103 | jQuery("#sosalist-tabs").css("visibility", "visible"); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | { |
108 | 108 | "mod" : "'.$this->module->getName().'", |
109 | 109 | "mod_action": "SosaList@sosalist", |
110 | - "ged" : "' . $WT_TREE->getNameUrl(). '", |
|
110 | + "ged" : "' . $WT_TREE->getNameUrl().'", |
|
111 | 111 | "type" : "indi", |
112 | 112 | "gen" : "'.$this->generation.'" |
113 | 113 | }, |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | { |
133 | 133 | "mod" : "'.$this->module->getName().'", |
134 | 134 | "mod_action": "SosaList@sosalist", |
135 | - "ged" : "' . $WT_TREE->getNameUrl(). '", |
|
135 | + "ged" : "' . $WT_TREE->getNameUrl().'", |
|
136 | 136 | "type" : "fam", |
137 | 137 | "gen" : "'.$this->generation.'" |
138 | 138 | }, |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | |
172 | 172 | $this->view_bag->set('title', $controller->getPageTitle()); |
173 | 173 | |
174 | - if($this->view_bag->get('is_setup', false)) { |
|
174 | + if ($this->view_bag->get('is_setup', false)) { |
|
175 | 175 | $this->view_bag->set('url_module', $this->module->getName()); |
176 | 176 | $this->view_bag->set('url_action', 'SosaList@missing'); |
177 | 177 | $this->view_bag->set('url_ged', $WT_TREE->getNameUrl()); |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | $missing_list = $this->sosa_provider->getMissingSosaListAtGeneration($this->generation); |
181 | 181 | $this->view_bag->set('has_missing', $this->generation > 0 && count($missing_list) > 0); |
182 | 182 | |
183 | - $perc_sosa = Functions::safeDivision($this->sosa_provider->getSosaCountAtGeneration($this->generation), pow(2, $this->generation -1)); |
|
183 | + $perc_sosa = Functions::safeDivision($this->sosa_provider->getSosaCountAtGeneration($this->generation), pow(2, $this->generation - 1)); |
|
184 | 184 | $this->view_bag->set('perc_sosa', $perc_sosa); |
185 | 185 | |
186 | - if($this->view_bag->get('has_missing', false)) { |
|
187 | - $table_id = 'table-sosa-missing-' . Uuid::uuid4(); |
|
186 | + if ($this->view_bag->get('has_missing', false)) { |
|
187 | + $table_id = 'table-sosa-missing-'.Uuid::uuid4(); |
|
188 | 188 | $this->view_bag->set('table_id', $table_id); |
189 | 189 | |
190 | 190 | $controller |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | jQuery.fn.dataTableExt.oSort["num-html-desc"]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a>b) ? -1 : (a<b ? 1 : 0);}; |
198 | 198 | |
199 | 199 | jQuery("#'.$table_id.'").dataTable( { |
200 | - dom: \'<"H"<"filtersH_' . $table_id . '">T<"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_' . $table_id . '">>\', |
|
200 | + dom: \'<"H"<"filtersH_' . $table_id.'">T<"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_'.$table_id.'">>\', |
|
201 | 201 | '.I18N::datatablesI18N().', |
202 | 202 | jQueryUI: true, |
203 | 203 | autoWidth:false, |
@@ -228,14 +228,14 @@ discard block |
||
228 | 228 | pagingType: "full_numbers" |
229 | 229 | }); |
230 | 230 | |
231 | - jQuery("#' . $table_id . '") |
|
231 | + jQuery("#' . $table_id.'") |
|
232 | 232 | /* Filter buttons in table header */ |
233 | 233 | .on("click", "button[data-filter-column]", function() { |
234 | 234 | var btn = jQuery(this); |
235 | 235 | // De-activate the other buttons in this button group |
236 | 236 | btn.siblings().removeClass("ui-state-active"); |
237 | 237 | // Apply (or clear) this filter |
238 | - var col = jQuery("#' . $table_id . '").DataTable().column(btn.data("filter-column")); |
|
238 | + var col = jQuery("#' . $table_id.'").DataTable().column(btn.data("filter-column")); |
|
239 | 239 | if (btn.hasClass("ui-state-active")) { |
240 | 240 | btn.removeClass("ui-state-active"); |
241 | 241 | col.search("").draw(); |
@@ -253,8 +253,8 @@ discard block |
||
253 | 253 | $unique_indis = array(); |
254 | 254 | $sum_missing_different = 0; |
255 | 255 | $sum_missing_different_without_hidden = 0; |
256 | - foreach($missing_list as $num => $missing_tab) { |
|
257 | - if(isset($unique_indis[$missing_tab['indi']])) { |
|
256 | + foreach ($missing_list as $num => $missing_tab) { |
|
257 | + if (isset($unique_indis[$missing_tab['indi']])) { |
|
258 | 258 | unset($missing_list[$num]); |
259 | 259 | continue; |
260 | 260 | } |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $this->view_bag->set('missing_list', $missing_list); |
273 | 273 | $this->view_bag->set('missing_diff_count', $sum_missing_different); |
274 | 274 | $this->view_bag->set('missing_hidden', $sum_missing_different - $sum_missing_different_without_hidden); |
275 | - $perc_sosa_potential = Functions::safeDivision($this->sosa_provider->getSosaCountAtGeneration($this->generation - 1), pow(2, $this->generation-2)); |
|
275 | + $perc_sosa_potential = Functions::safeDivision($this->sosa_provider->getSosaCountAtGeneration($this->generation - 1), pow(2, $this->generation - 2)); |
|
276 | 276 | $this->view_bag->set('perc_sosa_potential', $perc_sosa_potential); |
277 | 277 | } |
278 | 278 | } |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $controller = new AjaxController(); |
291 | 291 | $controller->restrictAccess($this->generation > 0 || !is_null($type)); |
292 | 292 | |
293 | - switch ($type){ |
|
293 | + switch ($type) { |
|
294 | 294 | case 'indi': |
295 | 295 | $this->renderSosaListIndi($controller); |
296 | 296 | break; |
@@ -313,9 +313,9 @@ discard block |
||
313 | 313 | $listSosa = $this->sosa_provider->getSosaListAtGeneration($this->generation); |
314 | 314 | $this->view_bag->set('has_sosa', false); |
315 | 315 | |
316 | - if(count($listSosa) > 0) { |
|
316 | + if (count($listSosa) > 0) { |
|
317 | 317 | $this->view_bag->set('has_sosa', true); |
318 | - $table_id = 'table-sosa-indi-' . Uuid::uuid4(); |
|
318 | + $table_id = 'table-sosa-indi-'.Uuid::uuid4(); |
|
319 | 319 | $this->view_bag->set('table_id', $table_id); |
320 | 320 | |
321 | 321 | $controller |
@@ -327,8 +327,8 @@ discard block |
||
327 | 327 | jQuery.fn.dataTableExt.oSort["num-html-desc"]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a>b) ? -1 : (a<b ? 1 : 0);}; |
328 | 328 | |
329 | 329 | jQuery("#'.$table_id.'").dataTable( { |
330 | - dom: \'<"H"<"filtersH_' . $table_id . '">T<"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_' . $table_id . '">>\', |
|
331 | - ' . I18N::datatablesI18N() . ', |
|
330 | + dom: \'<"H"<"filtersH_' . $table_id.'">T<"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_'.$table_id.'">>\', |
|
331 | + ' . I18N::datatablesI18N().', |
|
332 | 332 | jQueryUI: true, |
333 | 333 | autoWidth: false, |
334 | 334 | processing: true, |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | pagingType: "full_numbers" |
365 | 365 | }); |
366 | 366 | |
367 | - jQuery("#' . $table_id . '") |
|
367 | + jQuery("#' . $table_id.'") |
|
368 | 368 | /* Hide/show parents */ |
369 | 369 | .on("click", ".btn-toggle-parents", function() { |
370 | 370 | jQuery(this).toggleClass("ui-state-active"); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | /* Hide/show statistics */ |
374 | 374 | .on("click", ".btn-toggle-statistics", function() { |
375 | 375 | jQuery(this).toggleClass("ui-state-active"); |
376 | - jQuery("#indi_list_table-charts_' . $table_id . '").slideToggle(); |
|
376 | + jQuery("#indi_list_table-charts_' . $table_id.'").slideToggle(); |
|
377 | 377 | }) |
378 | 378 | /* Filter buttons in table header */ |
379 | 379 | .on("click", "button[data-filter-column]", function() { |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | // De-activate the other buttons in this button group |
382 | 382 | btn.siblings().removeClass("ui-state-active"); |
383 | 383 | // Apply (or clear) this filter |
384 | - var col = jQuery("#' . $table_id . '").DataTable().column(btn.data("filter-column")); |
|
384 | + var col = jQuery("#' . $table_id.'").DataTable().column(btn.data("filter-column")); |
|
385 | 385 | if (btn.hasClass("ui-state-active")) { |
386 | 386 | btn.removeClass("ui-state-active"); |
387 | 387 | col.search("").draw(); |
@@ -416,24 +416,24 @@ discard block |
||
416 | 416 | $nb_displayed = 0; |
417 | 417 | |
418 | 418 | Individual::load($WT_TREE, $listSosa); |
419 | - foreach($listSosa as $sosa => $pid) { |
|
419 | + foreach ($listSosa as $sosa => $pid) { |
|
420 | 420 | $person = Individual::getInstance($pid, $WT_TREE); |
421 | 421 | if (!$person || !$person->canShowName()) { |
422 | 422 | unset($listSosa[$sosa]); |
423 | 423 | continue; |
424 | 424 | } |
425 | 425 | $nb_displayed++; |
426 | - if ($birth_dates=$person->getAllBirthDates()) { |
|
426 | + if ($birth_dates = $person->getAllBirthDates()) { |
|
427 | 427 | if ( |
428 | - $birth_dates[0]->gregorianYear()>=1550 && |
|
429 | - $birth_dates[0]->gregorianYear()<2030 && |
|
428 | + $birth_dates[0]->gregorianYear() >= 1550 && |
|
429 | + $birth_dates[0]->gregorianYear() < 2030 && |
|
430 | 430 | !isset($unique_indis[$person->getXref()]) |
431 | 431 | ) { |
432 | - $birt_by_decade[(int)($birth_dates[0]->gregorianYear()/10)*10] .= $person->getSex(); |
|
432 | + $birt_by_decade[(int)($birth_dates[0]->gregorianYear() / 10) * 10] .= $person->getSex(); |
|
433 | 433 | } |
434 | 434 | } |
435 | 435 | else { |
436 | - $birth_dates[0]=new Date(''); |
|
436 | + $birth_dates[0] = new Date(''); |
|
437 | 437 | } |
438 | 438 | if ($death_dates = $person->getAllDeathDates()) { |
439 | 439 | if ( |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | $death_dates[0]->gregorianYear() < 2030 && |
442 | 442 | !isset($unique_indis[$person->getXref()]) |
443 | 443 | ) { |
444 | - $deat_by_decade[(int) ($death_dates[0]->gregorianYear() / 10) * 10] .= $person->getSex(); |
|
444 | + $deat_by_decade[(int)($death_dates[0]->gregorianYear() / 10) * 10] .= $person->getSex(); |
|
445 | 445 | } |
446 | 446 | } |
447 | 447 | else { |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | $this->view_bag->set('sosa_list', $listSosa); |
458 | 458 | |
459 | 459 | $this->view_bag->set('sosa_count', count($listSosa)); |
460 | - $this->view_bag->set('sosa_theo', pow(2, $this->generation-1)); |
|
460 | + $this->view_bag->set('sosa_theo', pow(2, $this->generation - 1)); |
|
461 | 461 | $this->view_bag->set('sosa_ratio', Functions::safeDivision($this->view_bag->get('sosa_count'), $this->view_bag->get('sosa_theo'))); |
462 | 462 | |
463 | 463 | $this->view_bag->set('sosa_hidden', $this->view_bag->get('sosa_count') - $nb_displayed); |
@@ -477,12 +477,12 @@ discard block |
||
477 | 477 | protected function renderFamSosaListIndi(AjaxController $controller) { |
478 | 478 | global $WT_TREE; |
479 | 479 | |
480 | - $listFamSosa = $this->sosa_provider->getFamilySosaListAtGeneration($this->generation);; |
|
480 | + $listFamSosa = $this->sosa_provider->getFamilySosaListAtGeneration($this->generation); ; |
|
481 | 481 | $this->view_bag->set('has_sosa', false); |
482 | 482 | |
483 | - if(count($listFamSosa) > 0) { |
|
483 | + if (count($listFamSosa) > 0) { |
|
484 | 484 | $this->view_bag->set('has_sosa', true); |
485 | - $table_id = 'table-sosa-fam-' . Uuid::uuid4(); |
|
485 | + $table_id = 'table-sosa-fam-'.Uuid::uuid4(); |
|
486 | 486 | $this->view_bag->set('table_id', $table_id); |
487 | 487 | |
488 | 488 | $controller |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | jQuery.fn.dataTableExt.oSort["num-html-desc"]=function(a,b) {a=parseFloat(a.replace(/<[^<]*>/, "")); b=parseFloat(b.replace(/<[^<]*>/, "")); return (a>b) ? -1 : (a<b ? 1 : 0);}; |
495 | 495 | |
496 | 496 | jQuery("#'.$table_id.'").dataTable( { |
497 | - dom: \'<"H"<"filtersH_' . $table_id . '"><"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_' . $table_id . '">>\', |
|
497 | + dom: \'<"H"<"filtersH_' . $table_id.'"><"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_'.$table_id.'">>\', |
|
498 | 498 | '.I18N::datatablesI18N(array(16, 32, 64, 128, -1)).', |
499 | 499 | jQueryUI: true, |
500 | 500 | autoWidth: false, |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | pagingType: "full_numbers" |
532 | 532 | }); |
533 | 533 | |
534 | - jQuery("#' . $table_id . '") |
|
534 | + jQuery("#' . $table_id.'") |
|
535 | 535 | /* Hide/show parents */ |
536 | 536 | .on("click", ".btn-toggle-parents", function() { |
537 | 537 | jQuery(this).toggleClass("ui-state-active"); |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | /* Hide/show statistics */ |
541 | 541 | .on("click", ".btn-toggle-statistics", function() { |
542 | 542 | jQuery(this).toggleClass("ui-state-active"); |
543 | - jQuery("#fam_list_table-charts_' . $table_id . '").slideToggle(); |
|
543 | + jQuery("#fam_list_table-charts_' . $table_id.'").slideToggle(); |
|
544 | 544 | }) |
545 | 545 | /* Filter buttons in table header */ |
546 | 546 | .on("click", "button[data-filter-column]", function() { |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | // De-activate the other buttons in this button group |
549 | 549 | btn.siblings().removeClass("ui-state-active"); |
550 | 550 | // Apply (or clear) this filter |
551 | - var col = jQuery("#' . $table_id . '").DataTable().column(btn.data("filter-column")); |
|
551 | + var col = jQuery("#' . $table_id.'").DataTable().column(btn.data("filter-column")); |
|
552 | 552 | if (btn.hasClass("ui-state-active")) { |
553 | 553 | btn.removeClass("ui-state-active"); |
554 | 554 | col.search("").draw(); |
@@ -568,29 +568,29 @@ discard block |
||
568 | 568 | |
569 | 569 | //-- init chart data |
570 | 570 | $marr_by_age = array(); |
571 | - for ($age=0; $age<=$max_age; $age++) { |
|
571 | + for ($age = 0; $age <= $max_age; $age++) { |
|
572 | 572 | $marr_by_age[$age] = ''; |
573 | 573 | } |
574 | 574 | $birt_by_decade = array(); |
575 | 575 | $marr_by_decade = array(); |
576 | - for ($year=1550; $year<2030; $year+=10) { |
|
576 | + for ($year = 1550; $year < 2030; $year += 10) { |
|
577 | 577 | $birt_by_decade[$year] = ''; |
578 | 578 | $marr_by_decade[$year] = ''; |
579 | 579 | } |
580 | 580 | |
581 | - foreach($listFamSosa as $sosa => $fid) { |
|
581 | + foreach ($listFamSosa as $sosa => $fid) { |
|
582 | 582 | $sfamily = Family::getInstance($fid, $WT_TREE); |
583 | - if(!$sfamily || !$sfamily->canShow()) { |
|
583 | + if (!$sfamily || !$sfamily->canShow()) { |
|
584 | 584 | unset($sfamily[$sosa]); |
585 | 585 | continue; |
586 | 586 | } |
587 | - $mdate=$sfamily->getMarriageDate(); |
|
587 | + $mdate = $sfamily->getMarriageDate(); |
|
588 | 588 | |
589 | - if( ($husb = $sfamily->getHusband()) && |
|
589 | + if (($husb = $sfamily->getHusband()) && |
|
590 | 590 | ($hdate = $husb->getBirthDate()) && |
591 | 591 | $hdate->isOK() && $mdate->isOK()) { |
592 | 592 | if ($hdate->gregorianYear() >= 1550 && $hdate->gregorianYear() < 2030) { |
593 | - $birt_by_decade[(int) ($hdate->gregorianYear() / 10) * 10] .= $husb->getSex(); |
|
593 | + $birt_by_decade[(int)($hdate->gregorianYear() / 10) * 10] .= $husb->getSex(); |
|
594 | 594 | } |
595 | 595 | $hage = Date::getAge($hdate, $mdate, 0); |
596 | 596 | if ($hage >= 0 && $hage <= $max_age) { |
@@ -598,11 +598,11 @@ discard block |
||
598 | 598 | } |
599 | 599 | } |
600 | 600 | |
601 | - if(($wife = $sfamily->getWife()) && |
|
602 | - ($wdate=$wife->getBirthDate()) && |
|
601 | + if (($wife = $sfamily->getWife()) && |
|
602 | + ($wdate = $wife->getBirthDate()) && |
|
603 | 603 | $wdate->isOK() && $mdate->isOK()) { |
604 | 604 | if ($wdate->gregorianYear() >= 1550 && $wdate->gregorianYear() < 2030) { |
605 | - $birt_by_decade[(int) ($wdate->gregorianYear() / 10) * 10] .= $wife->getSex(); |
|
605 | + $birt_by_decade[(int)($wdate->gregorianYear() / 10) * 10] .= $wife->getSex(); |
|
606 | 606 | } |
607 | 607 | $wage = Date::getAge($wdate, $mdate, 0); |
608 | 608 | if ($wage >= 0 && $wage <= $max_age) { |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | } |
612 | 612 | |
613 | 613 | if ($mdate->isOK() && $mdate->gregorianYear() >= 1550 && $mdate->gregorianYear() < 2030 && $husb && $wife) { |
614 | - $marr_by_decade[(int) ($mdate->gregorianYear() / 10) * 10] .= $husb->getSex() . $wife->getSex(); |
|
614 | + $marr_by_decade[(int)($mdate->gregorianYear() / 10) * 10] .= $husb->getSex().$wife->getSex(); |
|
615 | 615 | } |
616 | 616 | |
617 | 617 | $listFamSosa[$sosa] = $sfamily; |
@@ -431,8 +431,7 @@ discard block |
||
431 | 431 | ) { |
432 | 432 | $birt_by_decade[(int)($birth_dates[0]->gregorianYear()/10)*10] .= $person->getSex(); |
433 | 433 | } |
434 | - } |
|
435 | - else { |
|
434 | + } else { |
|
436 | 435 | $birth_dates[0]=new Date(''); |
437 | 436 | } |
438 | 437 | if ($death_dates = $person->getAllDeathDates()) { |
@@ -443,8 +442,7 @@ discard block |
||
443 | 442 | ) { |
444 | 443 | $deat_by_decade[(int) ($death_dates[0]->gregorianYear() / 10) * 10] .= $person->getSex(); |
445 | 444 | } |
446 | - } |
|
447 | - else { |
|
445 | + } else { |
|
448 | 446 | $death_dates[0] = new Date(''); |
449 | 447 | } |
450 | 448 | $age = Date::getAge($birth_dates[0], $death_dates[0], 0); |
@@ -22,18 +22,18 @@ |
||
22 | 22 | public function upgrade() { |
23 | 23 | |
24 | 24 | Database::exec( |
25 | - 'CREATE TABLE IF NOT EXISTS `##maj_sosa` (' . |
|
26 | - ' majs_gedcom_id INTEGER NOT NULL,' . |
|
27 | - ' majs_user_id INTEGER NOT NULL DEFAULT -1,' . |
|
28 | - ' majs_sosa BIGINT UNSIGNED NOT NULL,' . // Allow to calculate sosa on 64 generations |
|
29 | - ' majs_i_id VARCHAR(20) NOT NULL,' . |
|
30 | - ' majs_gen TINYINT NULL,' . |
|
31 | - ' majs_birth_year SMALLINT NULL,' . |
|
32 | - ' majs_death_year SMALLINT NULL,' . |
|
33 | - ' PRIMARY KEY (majs_gedcom_id, majs_user_id, majs_sosa),' . |
|
34 | - ' FOREIGN KEY `##gedcom_id_fk1` (majs_gedcom_id) REFERENCES `##gedcom` (gedcom_id) ON DELETE CASCADE,' . |
|
35 | - ' FOREIGN KEY `##user_id_fk1` (majs_user_id) REFERENCES `##user` (user_id) ON DELETE CASCADE' . |
|
36 | - ') COLLATE utf8_unicode_ci ENGINE=InnoDB' |
|
25 | + 'CREATE TABLE IF NOT EXISTS `##maj_sosa` (' . |
|
26 | + ' majs_gedcom_id INTEGER NOT NULL,' . |
|
27 | + ' majs_user_id INTEGER NOT NULL DEFAULT -1,' . |
|
28 | + ' majs_sosa BIGINT UNSIGNED NOT NULL,' . // Allow to calculate sosa on 64 generations |
|
29 | + ' majs_i_id VARCHAR(20) NOT NULL,' . |
|
30 | + ' majs_gen TINYINT NULL,' . |
|
31 | + ' majs_birth_year SMALLINT NULL,' . |
|
32 | + ' majs_death_year SMALLINT NULL,' . |
|
33 | + ' PRIMARY KEY (majs_gedcom_id, majs_user_id, majs_sosa),' . |
|
34 | + ' FOREIGN KEY `##gedcom_id_fk1` (majs_gedcom_id) REFERENCES `##gedcom` (gedcom_id) ON DELETE CASCADE,' . |
|
35 | + ' FOREIGN KEY `##user_id_fk1` (majs_user_id) REFERENCES `##user` (user_id) ON DELETE CASCADE' . |
|
36 | + ') COLLATE utf8_unicode_ci ENGINE=InnoDB' |
|
37 | 37 | ); |
38 | 38 | } |
39 | 39 | } |
@@ -22,17 +22,17 @@ |
||
22 | 22 | public function upgrade() { |
23 | 23 | |
24 | 24 | Database::exec( |
25 | - 'CREATE TABLE IF NOT EXISTS `##maj_sosa` (' . |
|
26 | - ' majs_gedcom_id INTEGER NOT NULL,' . |
|
27 | - ' majs_user_id INTEGER NOT NULL DEFAULT -1,' . |
|
28 | - ' majs_sosa BIGINT UNSIGNED NOT NULL,' . // Allow to calculate sosa on 64 generations |
|
29 | - ' majs_i_id VARCHAR(20) NOT NULL,' . |
|
30 | - ' majs_gen TINYINT NULL,' . |
|
31 | - ' majs_birth_year SMALLINT NULL,' . |
|
32 | - ' majs_death_year SMALLINT NULL,' . |
|
33 | - ' PRIMARY KEY (majs_gedcom_id, majs_user_id, majs_sosa),' . |
|
34 | - ' FOREIGN KEY `##gedcom_id_fk1` (majs_gedcom_id) REFERENCES `##gedcom` (gedcom_id) ON DELETE CASCADE,' . |
|
35 | - ' FOREIGN KEY `##user_id_fk1` (majs_user_id) REFERENCES `##user` (user_id) ON DELETE CASCADE' . |
|
25 | + 'CREATE TABLE IF NOT EXISTS `##maj_sosa` ('. |
|
26 | + ' majs_gedcom_id INTEGER NOT NULL,'. |
|
27 | + ' majs_user_id INTEGER NOT NULL DEFAULT -1,'. |
|
28 | + ' majs_sosa BIGINT UNSIGNED NOT NULL,'.// Allow to calculate sosa on 64 generations |
|
29 | + ' majs_i_id VARCHAR(20) NOT NULL,'. |
|
30 | + ' majs_gen TINYINT NULL,'. |
|
31 | + ' majs_birth_year SMALLINT NULL,'. |
|
32 | + ' majs_death_year SMALLINT NULL,'. |
|
33 | + ' PRIMARY KEY (majs_gedcom_id, majs_user_id, majs_sosa),'. |
|
34 | + ' FOREIGN KEY `##gedcom_id_fk1` (majs_gedcom_id) REFERENCES `##gedcom` (gedcom_id) ON DELETE CASCADE,'. |
|
35 | + ' FOREIGN KEY `##user_id_fk1` (majs_user_id) REFERENCES `##user` (user_id) ON DELETE CASCADE'. |
|
36 | 36 | ') COLLATE utf8_unicode_ci ENGINE=InnoDB' |
37 | 37 | ); |
38 | 38 | } |
@@ -23,17 +23,17 @@ discard block |
||
23 | 23 | * {@inhericDoc} |
24 | 24 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
25 | 25 | */ |
26 | - protected function renderContent() { |
|
27 | - ?> |
|
26 | + protected function renderContent() { |
|
27 | + ?> |
|
28 | 28 | <div id="maj-sosa-list-page" class="center"> |
29 | 29 | <h2><?php echo $this->data->get('title'); ?></h2> |
30 | 30 | |
31 | 31 | <?php if($this->data->get('is_setup')) { |
32 | - $selectedgen = $this->data->get('generation'); |
|
33 | - $this->renderSosaHeader(); |
|
34 | - if($this->data->get('has_sosa') ) { |
|
35 | - if($selectedgen > 0) { |
|
36 | - ?> |
|
32 | + $selectedgen = $this->data->get('generation'); |
|
33 | + $this->renderSosaHeader(); |
|
34 | + if($this->data->get('has_sosa') ) { |
|
35 | + if($selectedgen > 0) { |
|
36 | + ?> |
|
37 | 37 | <div id="sosalist-tabs"> |
38 | 38 | <ul> |
39 | 39 | <li><a href="#sosalist-indi"><?php echo I18N::translate('Individuals'); ?></a></li> |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | <?php } else { ?> |
54 | 54 | <p class="warning"><?php echo I18N::translate('No ancestor has been found for generation %d', $selectedgen); ?></p> |
55 | 55 | <?php } |
56 | - } |
|
56 | + } |
|
57 | 57 | } else { ?> |
58 | 58 | <p class="warning"><?php echo I18N::translate('The list could not be displayed. Reasons might be:'); ?><br/> |
59 | 59 | <ul> |
@@ -64,15 +64,15 @@ discard block |
||
64 | 64 | <?php } ?> |
65 | 65 | </div> |
66 | 66 | <?php |
67 | - } |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * Render the common header to Sosa Lists, made of the generation selector, and the generation navigator |
|
71 | - */ |
|
72 | - protected function renderSosaHeader() { |
|
73 | - $selectedgen = $this->data->get('generation'); |
|
74 | - $max_gen = $this->data->get('max_gen'); |
|
75 | - ?> |
|
69 | + /** |
|
70 | + * Render the common header to Sosa Lists, made of the generation selector, and the generation navigator |
|
71 | + */ |
|
72 | + protected function renderSosaHeader() { |
|
73 | + $selectedgen = $this->data->get('generation'); |
|
74 | + $max_gen = $this->data->get('max_gen'); |
|
75 | + ?> |
|
76 | 76 | |
77 | 77 | <form method="get" name="setgen" action="module.php"> |
78 | 78 | <input type="hidden" name="mod" value="<?php echo $this->data->get('url_module');?>"> |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | <?php |
119 | 119 | } |
120 | - } |
|
120 | + } |
|
121 | 121 | |
122 | 122 | } |
123 | 123 | |
124 | 124 | \ No newline at end of file |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | <div id="maj-sosa-list-page" class="center"> |
29 | 29 | <h2><?php echo $this->data->get('title'); ?></h2> |
30 | 30 | |
31 | - <?php if($this->data->get('is_setup')) { |
|
31 | + <?php if ($this->data->get('is_setup')) { |
|
32 | 32 | $selectedgen = $this->data->get('generation'); |
33 | 33 | $this->renderSosaHeader(); |
34 | - if($this->data->get('has_sosa') ) { |
|
35 | - if($selectedgen > 0) { |
|
34 | + if ($this->data->get('has_sosa')) { |
|
35 | + if ($selectedgen > 0) { |
|
36 | 36 | ?> |
37 | 37 | <div id="sosalist-tabs"> |
38 | 38 | <ul> |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | ?> |
76 | 76 | |
77 | 77 | <form method="get" name="setgen" action="module.php"> |
78 | - <input type="hidden" name="mod" value="<?php echo $this->data->get('url_module');?>"> |
|
79 | - <input type="hidden" name="mod_action" value="<?php echo $this->data->get('url_action');?>"> |
|
80 | - <input type="hidden" name="ged" value="<?php echo $this->data->get('url_ged');?>"> |
|
78 | + <input type="hidden" name="mod" value="<?php echo $this->data->get('url_module'); ?>"> |
|
79 | + <input type="hidden" name="mod_action" value="<?php echo $this->data->get('url_action'); ?>"> |
|
80 | + <input type="hidden" name="ged" value="<?php echo $this->data->get('url_ged'); ?>"> |
|
81 | 81 | <div class="maj-table"> |
82 | 82 | <div class="maj-row"> |
83 | 83 | <div class="label"><?php echo I18N::translate('Choose generation') ?></div> |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | <div class="maj-row"> |
86 | 86 | <div class="value"> |
87 | 87 | <select name="gen"> |
88 | - <?php for($i=$this->data->get('min_gen'); $i <= $max_gen;$i++) {?> |
|
88 | + <?php for ($i = $this->data->get('min_gen'); $i <= $max_gen; $i++) {?> |
|
89 | 89 | <option value="<?php echo $i; ?>" |
90 | - <?php if($selectedgen && $selectedgen==$i) { ?> selected="true" <?php } ?> |
|
90 | + <?php if ($selectedgen && $selectedgen == $i) { ?> selected="true" <?php } ?> |
|
91 | 91 | ><?php echo I18N::translate('Generation %d', $i); ?> |
92 | 92 | </option> |
93 | 93 | <?php } ?> |
@@ -95,21 +95,21 @@ discard block |
||
95 | 95 | </div> |
96 | 96 | </div> |
97 | 97 | </div> |
98 | - <input type="submit" value="<?php echo I18N::translate('Show');?>" /> |
|
98 | + <input type="submit" value="<?php echo I18N::translate('Show'); ?>" /> |
|
99 | 99 | <br /> |
100 | 100 | </form> |
101 | - <?php if($selectedgen > 0) { ?> |
|
101 | + <?php if ($selectedgen > 0) { ?> |
|
102 | 102 | <h4> |
103 | - <?php if($selectedgen > $this->data->get('min_gen')) { ?> |
|
104 | - <a href="module.php?mod=<?php echo $this->data->get('url_module');?>&mod_action=<?php echo $this->data->get('url_action');?>&ged=<?php echo $this->data->get('url_ged');?>&gen=<?php echo $selectedgen-1; ?>"> |
|
103 | + <?php if ($selectedgen > $this->data->get('min_gen')) { ?> |
|
104 | + <a href="module.php?mod=<?php echo $this->data->get('url_module'); ?>&mod_action=<?php echo $this->data->get('url_action'); ?>&ged=<?php echo $this->data->get('url_ged'); ?>&gen=<?php echo $selectedgen - 1; ?>"> |
|
105 | 105 | <i class="icon-ldarrow" title="<?php echo I18N::translate('Previous generation'); ?>" ></i> |
106 | 106 | </a> |
107 | 107 | |
108 | 108 | <?php } ?> |
109 | 109 | <?php echo I18N::translate('Generation %d', $selectedgen); ?> |
110 | - <?php if($selectedgen < $max_gen) { ?> |
|
110 | + <?php if ($selectedgen < $max_gen) { ?> |
|
111 | 111 | |
112 | - <a href="module.php?mod=<?php echo $this->data->get('url_module');?>&mod_action=<?php echo $this->data->get('url_action');?>&ged=<?php echo $this->data->get('url_ged');?>&gen=<?php echo $selectedgen+1; ?>"> |
|
112 | + <a href="module.php?mod=<?php echo $this->data->get('url_module'); ?>&mod_action=<?php echo $this->data->get('url_action'); ?>&ged=<?php echo $this->data->get('url_ged'); ?>&gen=<?php echo $selectedgen + 1; ?>"> |
|
113 | 113 | <i class="icon-rdarrow" title="<?php echo I18N::translate('Next generation'); ?>" ></i> |
114 | 114 | </a> |
115 | 115 | <?php } ?> |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | * {@inhericDoc} |
26 | 26 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
27 | 27 | */ |
28 | - protected function renderContent() { |
|
28 | + protected function renderContent() { |
|
29 | 29 | |
30 | - ?> |
|
30 | + ?> |
|
31 | 31 | |
32 | 32 | <div id="maj-sosa-config-page"> |
33 | 33 | <h2><?php echo $this->data->get('title'); ?></h2> |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | </div> |
48 | 48 | <div class="value"> |
49 | 49 | <?php |
50 | - $users = $this->data->get('users_settings'); |
|
51 | - if(count($users) == 1) { |
|
52 | - ?> |
|
50 | + $users = $this->data->get('users_settings'); |
|
51 | + if(count($users) == 1) { |
|
52 | + ?> |
|
53 | 53 | <label> |
54 | 54 | <input id="maj_sosa_input_userid" type="hidden" name="userid" value="<?php echo $users[0]['user']->getUserId(); ?>" /> |
55 | 55 | <?php echo $users[0]['user']->getRealNameHtml() ?> |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | <?php } else if(count($users) > 1) { ?> |
58 | 58 | <select id='maj-sosa-config-select' name="userid"> |
59 | 59 | <?php |
60 | - $root_indi = $users[0]['rootid']; |
|
61 | - foreach ($this->data->get('users_settings') as $user) { ?> |
|
60 | + $root_indi = $users[0]['rootid']; |
|
61 | + foreach ($this->data->get('users_settings') as $user) { ?> |
|
62 | 62 | <option value="<?php echo $user['user']->getUserId(); ?>"><?php echo $user['user']->getRealNameHtml() ?></option> |
63 | 63 | <?php } ?> |
64 | 64 | </select> |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | </form> |
82 | 82 | |
83 | 83 | <?php |
84 | - } |
|
84 | + } |
|
85 | 85 | |
86 | 86 | } |
87 | 87 | |
88 | 88 | \ No newline at end of file |
@@ -48,13 +48,13 @@ |
||
48 | 48 | <div class="value"> |
49 | 49 | <?php |
50 | 50 | $users = $this->data->get('users_settings'); |
51 | - if(count($users) == 1) { |
|
51 | + if (count($users) == 1) { |
|
52 | 52 | ?> |
53 | 53 | <label> |
54 | 54 | <input id="maj_sosa_input_userid" type="hidden" name="userid" value="<?php echo $users[0]['user']->getUserId(); ?>" /> |
55 | 55 | <?php echo $users[0]['user']->getRealNameHtml() ?> |
56 | 56 | </label> |
57 | - <?php } else if(count($users) > 1) { ?> |
|
57 | + <?php } else if (count($users) > 1) { ?> |
|
58 | 58 | <select id='maj-sosa-config-select' name="userid"> |
59 | 59 | <?php |
60 | 60 | $root_indi = $users[0]['rootid']; |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | * {@inhericDoc} |
32 | 32 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
33 | 33 | */ |
34 | - protected function renderContent() { |
|
34 | + protected function renderContent() { |
|
35 | 35 | |
36 | - if($this->data->get('has_sosa', false)) { |
|
37 | - $table_id = $this->data->get('table_id'); |
|
38 | - ?> |
|
36 | + if($this->data->get('has_sosa', false)) { |
|
37 | + $table_id = $this->data->get('table_id'); |
|
38 | + ?> |
|
39 | 39 | |
40 | 40 | <div id="sosa-indi-list" class="sosa-list"> |
41 | 41 | <table id="<?php echo $table_id;?>"> |
@@ -186,42 +186,42 @@ discard block |
||
186 | 186 | <tbody> |
187 | 187 | |
188 | 188 | <?php foreach($this->data->get('sosa_list') as $sosa => $person) { |
189 | - /** @var \Fisharebest\Webtrees\Individual $person */ |
|
190 | - if ($person->isPendingAddtion()) { |
|
191 | - $class = ' class="new"'; |
|
192 | - } elseif ($person->isPendingDeletion()) { |
|
193 | - $class = ' class="old"'; |
|
194 | - } else { |
|
195 | - $class = ''; |
|
196 | - } |
|
197 | - $dperson = new \MyArtJaub\Webtrees\Individual($person); |
|
198 | - ?> |
|
189 | + /** @var \Fisharebest\Webtrees\Individual $person */ |
|
190 | + if ($person->isPendingAddtion()) { |
|
191 | + $class = ' class="new"'; |
|
192 | + } elseif ($person->isPendingDeletion()) { |
|
193 | + $class = ' class="old"'; |
|
194 | + } else { |
|
195 | + $class = ''; |
|
196 | + } |
|
197 | + $dperson = new \MyArtJaub\Webtrees\Individual($person); |
|
198 | + ?> |
|
199 | 199 | <tr <?php echo $class?>> |
200 | 200 | <td class="transparent"><?php echo $sosa; ?></td> |
201 | 201 | <td class="transparent"><?php echo $person->getXref(); ?></td> |
202 | 202 | <td colspan="2"> |
203 | 203 | <?php foreach ($person->getAllNames() as $num=>$name) { |
204 | - if ($name['type']=='NAME') { |
|
205 | - $title=''; |
|
206 | - } else { |
|
207 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
208 | - } |
|
209 | - if ($num==$person->getPrimaryName()) { |
|
210 | - $class=' class="name2"'; |
|
211 | - $sex_image=$person->getSexImage(); |
|
212 | - list($surn, $givn)=explode(',', $name['sort']); |
|
213 | - } else { |
|
214 | - $class=''; |
|
215 | - $sex_image=''; |
|
216 | - } ?> |
|
204 | + if ($name['type']=='NAME') { |
|
205 | + $title=''; |
|
206 | + } else { |
|
207 | + $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
208 | + } |
|
209 | + if ($num==$person->getPrimaryName()) { |
|
210 | + $class=' class="name2"'; |
|
211 | + $sex_image=$person->getSexImage(); |
|
212 | + list($surn, $givn)=explode(',', $name['sort']); |
|
213 | + } else { |
|
214 | + $class=''; |
|
215 | + $sex_image=''; |
|
216 | + } ?> |
|
217 | 217 | <a <?php echo $title.' '.$class; ?> href="<?php echo $person->getHtmlUrl(); ?>"> |
218 | 218 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
219 | 219 | </a> |
220 | 220 | <?php echo $sex_image.FunctionsPrint::formatSosaNumbers($dperson->getSosaNumbers(), 1, 'smaller'); ?> |
221 | 221 | <br/> |
222 | 222 | <?php } |
223 | - echo $person->getPrimaryParentsNames('parents details1', 'none'); |
|
224 | - ?> |
|
223 | + echo $person->getPrimaryParentsNames('parents details1', 'none'); |
|
224 | + ?> |
|
225 | 225 | </td> |
226 | 226 | <td style="display:none;"></td> |
227 | 227 | <td> |
@@ -232,34 +232,34 @@ discard block |
||
232 | 232 | </td> |
233 | 233 | <td> |
234 | 234 | <?php |
235 | - if ($birth_dates=$person->getAllBirthDates()) { |
|
236 | - foreach ($birth_dates as $num=>$birth_date) { |
|
237 | - if ($num) { ?><br/><?php } ?> |
|
235 | + if ($birth_dates=$person->getAllBirthDates()) { |
|
236 | + foreach ($birth_dates as $num=>$birth_date) { |
|
237 | + if ($num) { ?><br/><?php } ?> |
|
238 | 238 | <?php echo $birth_date->display(true); |
239 | - } |
|
240 | - } else { |
|
241 | - $birth_date=$person->getEstimatedBirthDate(); |
|
242 | - if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) { |
|
243 | - $birth_date->display(true); |
|
244 | - } else { |
|
245 | - echo ' '; |
|
246 | - } |
|
247 | - $birth_dates[0] = new Date(''); |
|
248 | - } |
|
249 | - ?> |
|
239 | + } |
|
240 | + } else { |
|
241 | + $birth_date=$person->getEstimatedBirthDate(); |
|
242 | + if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) { |
|
243 | + $birth_date->display(true); |
|
244 | + } else { |
|
245 | + echo ' '; |
|
246 | + } |
|
247 | + $birth_dates[0] = new Date(''); |
|
248 | + } |
|
249 | + ?> |
|
250 | 250 | </td> |
251 | 251 | <td><?php echo $birth_date->julianDay();?></td> |
252 | 252 | <td> |
253 | 253 | <?php foreach ($person->getAllBirthPlaces() as $n => $birth_place) { |
254 | - $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree()); |
|
255 | - if ($n) { ?><br><?php } ?> |
|
254 | + $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree()); |
|
255 | + if ($n) { ?><br><?php } ?> |
|
256 | 256 | <a href="'<?php echo $tmp->getURL(); ?>" title="<?php echo strip_tags($tmp->getFullName()); ?>"> |
257 | 257 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($tmp->getShortName()); ?> |
258 | 258 | </a> |
259 | 259 | <?php } ?> |
260 | 260 | </td> |
261 | 261 | <?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) { |
262 | - $isBSourced = $dperson->isBirthSourced(); ?> |
|
262 | + $isBSourced = $dperson->isBirthSourced(); ?> |
|
263 | 263 | <td><?php echo FunctionsPrint::formatIsSourcedIcon('E', $isBSourced, 'BIRT', 1, 'medium'); ?></td> |
264 | 264 | <td><?php echo $isBSourced; ?></td> |
265 | 265 | <?php } else { ?> |
@@ -269,36 +269,36 @@ discard block |
||
269 | 269 | <td> |
270 | 270 | <?php |
271 | 271 | if ($death_dates = $person->getAllDeathDates()) { |
272 | - foreach ($death_dates as $num => $death_date) { |
|
273 | - if ($num) { ?><br/><?php } ?> |
|
272 | + foreach ($death_dates as $num => $death_date) { |
|
273 | + if ($num) { ?><br/><?php } ?> |
|
274 | 274 | <?php echo $death_date->display(true); |
275 | - } |
|
276 | - } else { |
|
277 | - $death_date = $person->getEstimatedDeathDate(); |
|
278 | - if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES') && $death_date->minimumJulianDay() < WT_CLIENT_JD) { |
|
279 | - echo $death_date->display(true); |
|
280 | - } elseif ($person->isDead()) { |
|
281 | - echo I18N::translate('yes'); |
|
282 | - } else { |
|
283 | - echo ' '; |
|
284 | - } |
|
285 | - $death_dates[0] = new Date(''); |
|
286 | - } ?> |
|
275 | + } |
|
276 | + } else { |
|
277 | + $death_date = $person->getEstimatedDeathDate(); |
|
278 | + if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES') && $death_date->minimumJulianDay() < WT_CLIENT_JD) { |
|
279 | + echo $death_date->display(true); |
|
280 | + } elseif ($person->isDead()) { |
|
281 | + echo I18N::translate('yes'); |
|
282 | + } else { |
|
283 | + echo ' '; |
|
284 | + } |
|
285 | + $death_dates[0] = new Date(''); |
|
286 | + } ?> |
|
287 | 287 | </td> |
288 | 288 | <td><?php echo $death_date->julianDay(); ?></td> |
289 | 289 | <td><?php echo Date::getAge($birth_dates[0], $death_dates[0], 2); ?></td> |
290 | 290 | <td><?php echo Date::getAge($birth_dates[0], $death_dates[0], 1); ?></td> |
291 | 291 | <td> |
292 | 292 | <?php foreach ($person->getAllDeathPlaces() as $n => $death_place) { |
293 | - $tmp = new Place($death_place, $person->getTree()); |
|
294 | - if ($n) { ?><br><?php } ?> |
|
293 | + $tmp = new Place($death_place, $person->getTree()); |
|
294 | + if ($n) { ?><br><?php } ?> |
|
295 | 295 | <a href="'<?php echo $tmp->getURL(); ?>" title="<?php echo strip_tags($tmp->getFullName()); ?>"> |
296 | 296 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($tmp->getShortName()); ?> |
297 | 297 | </a> |
298 | 298 | <?php } ?> |
299 | 299 | </td> |
300 | 300 | <?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) { |
301 | - $isDSourced = $dperson->isDeathSourced(); ?> |
|
301 | + $isDSourced = $dperson->isDeathSourced(); ?> |
|
302 | 302 | <td><?php echo FunctionsPrint::formatIsSourcedIcon('E', $isDSourced, 'DEAT', 1, 'medium'); ?></td> |
303 | 303 | <td><?php echo $isDSourced; ?></td> |
304 | 304 | <?php } else { ?> |
@@ -308,29 +308,29 @@ discard block |
||
308 | 308 | <td><?php echo $person->getSex(); ?></td> |
309 | 309 | <td> |
310 | 310 | <?php if (!$person->canShow() || Date::compare($birth_date, new Date(date('Y') - 100)) > 0) { |
311 | - echo 'Y100'; |
|
312 | - } else { |
|
313 | - echo 'YES'; |
|
314 | - } ?> |
|
311 | + echo 'Y100'; |
|
312 | + } else { |
|
313 | + echo 'YES'; |
|
314 | + } ?> |
|
315 | 315 | </td> |
316 | 316 | <td> |
317 | 317 | <?php if (Date::compare($death_dates[0], new Date(date('Y') - 100)) > 0) { |
318 | - echo 'Y100'; |
|
319 | - } elseif ($death_dates[0]->minimumJulianDay() || $person->isDead()) { |
|
320 | - echo 'YES'; |
|
321 | - } else { |
|
322 | - echo 'N'; |
|
323 | - } ?> |
|
318 | + echo 'Y100'; |
|
319 | + } elseif ($death_dates[0]->minimumJulianDay() || $person->isDead()) { |
|
320 | + echo 'YES'; |
|
321 | + } else { |
|
322 | + echo 'N'; |
|
323 | + } ?> |
|
324 | 324 | </td> |
325 | 325 | <td> |
326 | 326 | <?php if (!$person->getChildFamilies()) { |
327 | - echo 'R'; |
|
327 | + echo 'R'; |
|
328 | 328 | } // roots |
329 | 329 | elseif (!$person->isDead() && $person->getNumberOfChildren() < 1) { |
330 | - echo 'L'; |
|
330 | + echo 'L'; |
|
331 | 331 | } // leaves |
332 | 332 | else { |
333 | - echo ' '; |
|
333 | + echo ' '; |
|
334 | 334 | } ?> |
335 | 335 | </td> |
336 | 336 | </tr> |
@@ -341,12 +341,12 @@ discard block |
||
341 | 341 | <th class="ui-state-default" colspan="22"> |
342 | 342 | <div class="center"> |
343 | 343 | <?php echo I18N::translate('Number of Sosa ancestors: %1$s known / %2$s theoretical (%3$s)', |
344 | - I18N::number($this->data->get('sosa_count')), |
|
345 | - I18N::number($this->data->get('sosa_theo')), |
|
346 | - I18N::percentage($this->data->get('sosa_ratio'),2) |
|
347 | - ); ?> |
|
344 | + I18N::number($this->data->get('sosa_count')), |
|
345 | + I18N::number($this->data->get('sosa_theo')), |
|
346 | + I18N::percentage($this->data->get('sosa_ratio'),2) |
|
347 | + ); ?> |
|
348 | 348 | <?php if($this->data->get('sosa_hidden') > 0) { |
349 | - echo '['. I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']'; |
|
349 | + echo '['. I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']'; |
|
350 | 350 | } ?> |
351 | 351 | </div> |
352 | 352 | </th> |
@@ -380,8 +380,8 @@ discard block |
||
380 | 380 | </div> |
381 | 381 | </div> |
382 | 382 | <?php |
383 | - } |
|
384 | - } |
|
383 | + } |
|
384 | + } |
|
385 | 385 | |
386 | 386 | } |
387 | 387 | |
388 | 388 | \ No newline at end of file |
@@ -33,12 +33,12 @@ discard block |
||
33 | 33 | */ |
34 | 34 | protected function renderContent() { |
35 | 35 | |
36 | - if($this->data->get('has_sosa', false)) { |
|
36 | + if ($this->data->get('has_sosa', false)) { |
|
37 | 37 | $table_id = $this->data->get('table_id'); |
38 | 38 | ?> |
39 | 39 | |
40 | 40 | <div id="sosa-indi-list" class="sosa-list"> |
41 | - <table id="<?php echo $table_id;?>"> |
|
41 | + <table id="<?php echo $table_id; ?>"> |
|
42 | 42 | <thead> |
43 | 43 | <tr> |
44 | 44 | <th colspan="22"> |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | </thead> |
186 | 186 | <tbody> |
187 | 187 | |
188 | - <?php foreach($this->data->get('sosa_list') as $sosa => $person) { |
|
188 | + <?php foreach ($this->data->get('sosa_list') as $sosa => $person) { |
|
189 | 189 | /** @var \Fisharebest\Webtrees\Individual $person */ |
190 | 190 | if ($person->isPendingAddtion()) { |
191 | 191 | $class = ' class="new"'; |
@@ -201,18 +201,18 @@ discard block |
||
201 | 201 | <td class="transparent"><?php echo $person->getXref(); ?></td> |
202 | 202 | <td colspan="2"> |
203 | 203 | <?php foreach ($person->getAllNames() as $num=>$name) { |
204 | - if ($name['type']=='NAME') { |
|
205 | - $title=''; |
|
204 | + if ($name['type'] == 'NAME') { |
|
205 | + $title = ''; |
|
206 | 206 | } else { |
207 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
207 | + $title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
208 | 208 | } |
209 | - if ($num==$person->getPrimaryName()) { |
|
210 | - $class=' class="name2"'; |
|
211 | - $sex_image=$person->getSexImage(); |
|
212 | - list($surn, $givn)=explode(',', $name['sort']); |
|
209 | + if ($num == $person->getPrimaryName()) { |
|
210 | + $class = ' class="name2"'; |
|
211 | + $sex_image = $person->getSexImage(); |
|
212 | + list($surn, $givn) = explode(',', $name['sort']); |
|
213 | 213 | } else { |
214 | - $class=''; |
|
215 | - $sex_image=''; |
|
214 | + $class = ''; |
|
215 | + $sex_image = ''; |
|
216 | 216 | } ?> |
217 | 217 | <a <?php echo $title.' '.$class; ?> href="<?php echo $person->getHtmlUrl(); ?>"> |
218 | 218 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
@@ -225,20 +225,20 @@ discard block |
||
225 | 225 | </td> |
226 | 226 | <td style="display:none;"></td> |
227 | 227 | <td> |
228 | - <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
228 | + <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
229 | 229 | </td> |
230 | 230 | <td> |
231 | - <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
231 | + <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
232 | 232 | </td> |
233 | 233 | <td> |
234 | 234 | <?php |
235 | - if ($birth_dates=$person->getAllBirthDates()) { |
|
235 | + if ($birth_dates = $person->getAllBirthDates()) { |
|
236 | 236 | foreach ($birth_dates as $num=>$birth_date) { |
237 | 237 | if ($num) { ?><br/><?php } ?> |
238 | 238 | <?php echo $birth_date->display(true); |
239 | 239 | } |
240 | 240 | } else { |
241 | - $birth_date=$person->getEstimatedBirthDate(); |
|
241 | + $birth_date = $person->getEstimatedBirthDate(); |
|
242 | 242 | if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) { |
243 | 243 | $birth_date->display(true); |
244 | 244 | } else { |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | } |
249 | 249 | ?> |
250 | 250 | </td> |
251 | - <td><?php echo $birth_date->julianDay();?></td> |
|
251 | + <td><?php echo $birth_date->julianDay(); ?></td> |
|
252 | 252 | <td> |
253 | 253 | <?php foreach ($person->getAllBirthPlaces() as $n => $birth_place) { |
254 | 254 | $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree()); |
@@ -343,10 +343,10 @@ discard block |
||
343 | 343 | <?php echo I18N::translate('Number of Sosa ancestors: %1$s known / %2$s theoretical (%3$s)', |
344 | 344 | I18N::number($this->data->get('sosa_count')), |
345 | 345 | I18N::number($this->data->get('sosa_theo')), |
346 | - I18N::percentage($this->data->get('sosa_ratio'),2) |
|
346 | + I18N::percentage($this->data->get('sosa_ratio'), 2) |
|
347 | 347 | ); ?> |
348 | - <?php if($this->data->get('sosa_hidden') > 0) { |
|
349 | - echo '['. I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']'; |
|
348 | + <?php if ($this->data->get('sosa_hidden') > 0) { |
|
349 | + echo '['.I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']'; |
|
350 | 350 | } ?> |
351 | 351 | </div> |
352 | 352 | </th> |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | <button type="button" class="ui-state-default btn-toggle-parents"> |
359 | 359 | <?php echo I18N::translate('Show parents') ?> |
360 | 360 | </button> |
361 | - <button id="btn-toggle-statistics-<?php echo $table_id ;?>" type="button" class="ui-state-default btn-toggle-statistics"> |
|
361 | + <button id="btn-toggle-statistics-<?php echo $table_id; ?>" type="button" class="ui-state-default btn-toggle-statistics"> |
|
362 | 362 | <?php echo I18N::translate('Show statistics charts') ?> |
363 | 363 | </button> |
364 | 364 | </div> |
@@ -23,13 +23,13 @@ discard block |
||
23 | 23 | * {@inhericDoc} |
24 | 24 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
25 | 25 | */ |
26 | - protected function renderContent() { |
|
27 | - ?> |
|
26 | + protected function renderContent() { |
|
27 | + ?> |
|
28 | 28 | <div id="maj-sosa-stats-page"> |
29 | 29 | <h2><?php echo $this->data->get('title'); ?></h2> |
30 | 30 | |
31 | 31 | <?php if($this->data->get('is_setup')) { |
32 | - $general_stats = $this->data->get('general_stats'); ?> |
|
32 | + $general_stats = $this->data->get('general_stats'); ?> |
|
33 | 33 | <h3><?php echo I18N::translate('General statistics'); ?></h3> |
34 | 34 | <div class="maj-table"> |
35 | 35 | <div class="maj-row"> |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | <?php } else { ?> |
135 | 135 | <div class="warning"><?php echo I18N::translate('No Sosa root individual has been defined.'); ?></div> |
136 | 136 | <?php } |
137 | - } |
|
137 | + } |
|
138 | 138 | |
139 | 139 | } |
140 | 140 | |
141 | 141 | \ No newline at end of file |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | <div id="maj-sosa-stats-page"> |
29 | 29 | <h2><?php echo $this->data->get('title'); ?></h2> |
30 | 30 | |
31 | - <?php if($this->data->get('is_setup')) { |
|
31 | + <?php if ($this->data->get('is_setup')) { |
|
32 | 32 | $general_stats = $this->data->get('general_stats'); ?> |
33 | 33 | <h3><?php echo I18N::translate('General statistics'); ?></h3> |
34 | 34 | <div class="maj-table"> |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | </div> |
51 | 51 | <div class="maj-row"> |
52 | 52 | <div class="label"><?php echo I18N::translate('Mean generation time'); ?></div> |
53 | - <div class="value"><?php echo I18N::plural('%s year', '%s years', $general_stats['mean_gen_time'], I18N::number($general_stats['mean_gen_time'], 1)); ?></div> |
|
53 | + <div class="value"><?php echo I18N::plural('%s year', '%s years', $general_stats['mean_gen_time'], I18N::number($general_stats['mean_gen_time'], 1)); ?></div> |
|
54 | 54 | </div> |
55 | 55 | </div> |
56 | 56 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | </tr> |
91 | 91 | </thead> |
92 | 92 | <tbody> |
93 | - <?php foreach($this->data->get('generation_stats') as $gen => $row) { ?> |
|
93 | + <?php foreach ($this->data->get('generation_stats') as $gen => $row) { ?> |
|
94 | 94 | <tr class="maj-row"> |
95 | 95 | <td class="label"><?php echo I18N::translate('<strong>G%d</strong>', $gen); ?></td> |
96 | 96 | <td class="label"><?php echo I18N::translate('%1$s <> %2$s', $row['gen_min_birth'], $row['gen_max_birth']); ?></td> |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | <td class="value"><?php echo I18N::number($row['different']); ?></td> |
105 | 105 | <td class="value left percent_container"> |
106 | 106 | <div class="percent_frame"> |
107 | - <div class="percent_cell" style="width:<?php echo 100*$row['perc_different'] ?>%;"> |
|
107 | + <div class="percent_cell" style="width:<?php echo 100 * $row['perc_different'] ?>%;"> |
|
108 | 108 | <?php echo I18N::percentage($row['perc_different']); ?> |
109 | 109 | </div> |
110 | 110 | </div> |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | <tfoot> |
118 | 118 | <tr class="maj-row"> |
119 | 119 | <td class="label" colspan="13"> |
120 | - <?php echo I18N::translate('Generation-equivalent: %s generations', I18N::number($this->data->get('equivalent_gen'),2)); ?> |
|
120 | + <?php echo I18N::translate('Generation-equivalent: %s generations', I18N::number($this->data->get('equivalent_gen'), 2)); ?> |
|
121 | 121 | </td> |
122 | 122 | </tr> |
123 | 123 | </tfoot> |
@@ -126,8 +126,8 @@ discard block |
||
126 | 126 | |
127 | 127 | <h3><?php echo I18N::translate('Known Sosa ancestors\' family dispersion'); ?></h3> |
128 | 128 | <div class="center"> |
129 | - <?php echo $this->data->get('chart_img_g2') ?: '' ; ?> |
|
130 | - <?php echo $this->data->get('chart_img_g3') ?: '' ; ?> |
|
129 | + <?php echo $this->data->get('chart_img_g2') ?: ''; ?> |
|
130 | + <?php echo $this->data->get('chart_img_g3') ?: ''; ?> |
|
131 | 131 | <!-- <canvas id="chart_ancestors_g2" width="300" height="300"></canvas> --> |
132 | 132 | </div> |
133 | 133 |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | * {@inhericDoc} |
33 | 33 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
34 | 34 | */ |
35 | - protected function renderContent() { |
|
35 | + protected function renderContent() { |
|
36 | 36 | |
37 | - if($this->data->get('has_sosa', false)) { |
|
38 | - $table_id = $this->data->get('table_id'); |
|
39 | - ?> |
|
37 | + if($this->data->get('has_sosa', false)) { |
|
38 | + $table_id = $this->data->get('table_id'); |
|
39 | + ?> |
|
40 | 40 | |
41 | 41 | <div id="sosa-fam-list" class="sosa-list"> |
42 | 42 | <table id="<?php echo $table_id; ?>"> |
@@ -187,59 +187,59 @@ discard block |
||
187 | 187 | <tbody> |
188 | 188 | |
189 | 189 | <?php foreach($this->data->get('sosa_list') as $sosa => $family) { |
190 | - /** @var \Fisharebest\Webtrees\Family $person */ |
|
190 | + /** @var \Fisharebest\Webtrees\Family $person */ |
|
191 | 191 | |
192 | - //PERSO Create decorator for Family |
|
193 | - $dfamily = new Family($family); |
|
192 | + //PERSO Create decorator for Family |
|
193 | + $dfamily = new Family($family); |
|
194 | 194 | |
195 | - $husb = $family->getHusband(); |
|
196 | - if (is_null($husb)) { |
|
197 | - $husb = new Individual('H', '0 @H@ INDI', null, $family->getTree()); |
|
198 | - } |
|
199 | - $dhusb = new \MyArtJaub\Webtrees\Individual($husb); |
|
200 | - $wife = $family->getWife(); |
|
201 | - if (is_null($wife)) { |
|
202 | - $wife = new Individual('W', '0 @W@ INDI', null, $family->getTree()); |
|
203 | - } |
|
204 | - $dwife = new \MyArtJaub\Webtrees\Individual($wife); |
|
195 | + $husb = $family->getHusband(); |
|
196 | + if (is_null($husb)) { |
|
197 | + $husb = new Individual('H', '0 @H@ INDI', null, $family->getTree()); |
|
198 | + } |
|
199 | + $dhusb = new \MyArtJaub\Webtrees\Individual($husb); |
|
200 | + $wife = $family->getWife(); |
|
201 | + if (is_null($wife)) { |
|
202 | + $wife = new Individual('W', '0 @W@ INDI', null, $family->getTree()); |
|
203 | + } |
|
204 | + $dwife = new \MyArtJaub\Webtrees\Individual($wife); |
|
205 | 205 | |
206 | - $mdate=$family->getMarriageDate(); |
|
206 | + $mdate=$family->getMarriageDate(); |
|
207 | 207 | |
208 | - if ($family->isPendingAddtion()) { |
|
209 | - $class = ' class="new"'; |
|
210 | - } elseif ($family->isPendingDeletion()) { |
|
211 | - $class = ' class="old"'; |
|
212 | - } else { |
|
213 | - $class = ''; |
|
214 | - } |
|
215 | - ?> |
|
208 | + if ($family->isPendingAddtion()) { |
|
209 | + $class = ' class="new"'; |
|
210 | + } elseif ($family->isPendingDeletion()) { |
|
211 | + $class = ' class="old"'; |
|
212 | + } else { |
|
213 | + $class = ''; |
|
214 | + } |
|
215 | + ?> |
|
216 | 216 | <tr <?php echo $class?>> |
217 | 217 | <td class="transparent"><?php echo I18N::translate('%1$d/%2$d', $sosa, ($sosa + 1) % 10); ?></td> |
218 | 218 | <td class="transparent"><?php echo $sosa; ?></td> |
219 | 219 | <!-- HUSBAND --> |
220 | 220 | <td colspan="2"> |
221 | 221 | <?php foreach ($husb->getAllNames() as $num=>$name) { |
222 | - if ($name['type']=='NAME') { |
|
223 | - $title=''; |
|
224 | - } else { |
|
225 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"'; |
|
226 | - } |
|
227 | - if ($num==$husb->getPrimaryName()) { |
|
228 | - $class=' class="name2"'; |
|
229 | - $sex_image=$husb->getSexImage(); |
|
230 | - list($surn, $givn)=explode(',', $name['sort']); |
|
231 | - } else { |
|
232 | - $class=''; |
|
233 | - $sex_image=''; |
|
234 | - } ?> |
|
222 | + if ($name['type']=='NAME') { |
|
223 | + $title=''; |
|
224 | + } else { |
|
225 | + $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"'; |
|
226 | + } |
|
227 | + if ($num==$husb->getPrimaryName()) { |
|
228 | + $class=' class="name2"'; |
|
229 | + $sex_image=$husb->getSexImage(); |
|
230 | + list($surn, $givn)=explode(',', $name['sort']); |
|
231 | + } else { |
|
232 | + $class=''; |
|
233 | + $sex_image=''; |
|
234 | + } ?> |
|
235 | 235 | <a <?php echo $title.' '.$class; ?> href="<?php echo $husb->getHtmlUrl(); ?>"> |
236 | 236 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
237 | 237 | </a> |
238 | 238 | <?php echo $sex_image.FunctionsPrint::formatSosaNumbers($dhusb->getSosaNumbers(), 1, 'smaller'); ?> |
239 | 239 | <br/> |
240 | 240 | <?php } |
241 | - echo $husb->getPrimaryParentsNames('parents details1', 'none'); |
|
242 | - ?> |
|
241 | + echo $husb->getPrimaryParentsNames('parents details1', 'none'); |
|
242 | + ?> |
|
243 | 243 | </td> |
244 | 244 | <!-- Dummy column to match colspan in header --> |
245 | 245 | <td style="display:none;"></td> |
@@ -255,27 +255,27 @@ discard block |
||
255 | 255 | <!-- WIFE --> |
256 | 256 | <td colspan="2"> |
257 | 257 | <?php foreach ($wife->getAllNames() as $num=>$name) { |
258 | - if ($name['type']=='NAME') { |
|
259 | - $title=''; |
|
260 | - } else { |
|
261 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"'; |
|
262 | - } |
|
263 | - if ($num==$wife->getPrimaryName()) { |
|
264 | - $class=' class="name2"'; |
|
265 | - $sex_image=$wife->getSexImage(); |
|
266 | - list($surn, $givn)=explode(',', $name['sort']); |
|
267 | - } else { |
|
268 | - $class=''; |
|
269 | - $sex_image=''; |
|
270 | - } ?> |
|
258 | + if ($name['type']=='NAME') { |
|
259 | + $title=''; |
|
260 | + } else { |
|
261 | + $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"'; |
|
262 | + } |
|
263 | + if ($num==$wife->getPrimaryName()) { |
|
264 | + $class=' class="name2"'; |
|
265 | + $sex_image=$wife->getSexImage(); |
|
266 | + list($surn, $givn)=explode(',', $name['sort']); |
|
267 | + } else { |
|
268 | + $class=''; |
|
269 | + $sex_image=''; |
|
270 | + } ?> |
|
271 | 271 | <a <?php echo $title.' '.$class; ?> href="<?php echo $wife->getHtmlUrl(); ?>"> |
272 | 272 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
273 | 273 | </a> |
274 | 274 | <?php echo $sex_image.FunctionsPrint::formatSosaNumbers($dwife->getSosaNumbers(), 1, 'smaller'); ?> |
275 | 275 | <br/> |
276 | 276 | <?php } |
277 | - echo $wife->getPrimaryParentsNames('parents details1', 'none'); |
|
278 | - ?> |
|
277 | + echo $wife->getPrimaryParentsNames('parents details1', 'none'); |
|
278 | + ?> |
|
279 | 279 | </td> |
280 | 280 | <!-- Dummy column to match colspan in header --> |
281 | 281 | <td style="display:none;"></td> |
@@ -289,31 +289,31 @@ discard block |
||
289 | 289 | <td><?php Date::getAge($wdate, $mdate, 2); ?></td> |
290 | 290 | <td><?php Date::getAge($wdate, $mdate, 1); ?></td> |
291 | 291 | <td><?php |
292 | - if ($marriage_dates = $family->getAllMarriageDates()) { |
|
293 | - foreach ($marriage_dates as $n => $marriage_date) { |
|
294 | - if ($n) { echo '<br>'; } ?> |
|
292 | + if ($marriage_dates = $family->getAllMarriageDates()) { |
|
293 | + foreach ($marriage_dates as $n => $marriage_date) { |
|
294 | + if ($n) { echo '<br>'; } ?> |
|
295 | 295 | <div><?php echo $marriage_date->display(true); ?></div> |
296 | 296 | <?php } |
297 | - } elseif ($family->getFacts('_NMR')) { |
|
298 | - echo I18N::translate('no'); |
|
299 | - } elseif ($family->getFacts('MARR')) { |
|
300 | - echo I18N::translate('yes'); |
|
301 | - } else { |
|
302 | - echo ' '; |
|
303 | - } ?> |
|
297 | + } elseif ($family->getFacts('_NMR')) { |
|
298 | + echo I18N::translate('no'); |
|
299 | + } elseif ($family->getFacts('MARR')) { |
|
300 | + echo I18N::translate('yes'); |
|
301 | + } else { |
|
302 | + echo ' '; |
|
303 | + } ?> |
|
304 | 304 | </td> |
305 | 305 | <td><?php echo $marriage_dates ? $marriage_date->julianDay() : 0; ?></td> |
306 | 306 | <td><?php |
307 | - foreach ($family->getAllMarriagePlaces() as $n => $marriage_place) { |
|
308 | - $tmp = new Place($marriage_place, $family->getTree()); |
|
309 | - if ($n) { ?><br><?php } ?> |
|
307 | + foreach ($family->getAllMarriagePlaces() as $n => $marriage_place) { |
|
308 | + $tmp = new Place($marriage_place, $family->getTree()); |
|
309 | + if ($n) { ?><br><?php } ?> |
|
310 | 310 | <a href="'<?php echo $tmp->getURL(); ?>" title="<?php echo strip_tags($tmp->getFullName()); ?>"> |
311 | 311 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($tmp->getShortName()); ?> |
312 | 312 | </a> |
313 | 313 | <?php } ?> |
314 | 314 | </td> |
315 | 315 | <?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) { |
316 | - $isMSourced = $dfamily->isMarriageSourced(); ?> |
|
316 | + $isMSourced = $dfamily->isMarriageSourced(); ?> |
|
317 | 317 | <td><?php echo FunctionsPrint::formatIsSourcedIcon('E', $isMSourced, 'MARR', 1, 'medium'); ?></td> |
318 | 318 | <td><?php echo $isMSourced; ?></td> |
319 | 319 | <?php } else { ?> |
@@ -326,30 +326,30 @@ discard block |
||
326 | 326 | <td><?php |
327 | 327 | if (!$mdate->isOK()) { echo 'U'; } |
328 | 328 | else { |
329 | - if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; } |
|
330 | - else { echo 'YES'; } |
|
329 | + if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; } |
|
330 | + else { echo 'YES'; } |
|
331 | 331 | } |
332 | 332 | if ($family->getFacts(WT_EVENTS_DIV)) { echo 'D'; } |
333 | 333 | if (count($husb->getSpouseFamilies()) > 1 || count($wife->getSpouseFamilies()) > 1) { |
334 | - echo 'M'; |
|
334 | + echo 'M'; |
|
335 | 335 | } ?> |
336 | 336 | </td> |
337 | 337 | <td><?php |
338 | - if ($husb->isDead() && $wife->isDead()) { echo 'Y'; } |
|
339 | - if ($husb->isDead() && !$wife->isDead()) { |
|
340 | - if ($wife->getSex() == 'F') { echo 'H'; } |
|
341 | - if ($wife->getSex() == 'M') { echo 'W'; } // male partners |
|
342 | - } |
|
343 | - if (!$husb->isDead() && $wife->isDead()) { |
|
344 | - if ($husb->getSex() == 'M') { echo 'W'; } |
|
345 | - if ($husb->getSex() == 'F') { echo 'H'; } // female partners |
|
346 | - } |
|
347 | - if (!$husb->isDead() && !$wife->isDead()) { echo 'N'; } ?> |
|
338 | + if ($husb->isDead() && $wife->isDead()) { echo 'Y'; } |
|
339 | + if ($husb->isDead() && !$wife->isDead()) { |
|
340 | + if ($wife->getSex() == 'F') { echo 'H'; } |
|
341 | + if ($wife->getSex() == 'M') { echo 'W'; } // male partners |
|
342 | + } |
|
343 | + if (!$husb->isDead() && $wife->isDead()) { |
|
344 | + if ($husb->getSex() == 'M') { echo 'W'; } |
|
345 | + if ($husb->getSex() == 'F') { echo 'H'; } // female partners |
|
346 | + } |
|
347 | + if (!$husb->isDead() && !$wife->isDead()) { echo 'N'; } ?> |
|
348 | 348 | </td> |
349 | 349 | <td><?php |
350 | - if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; } |
|
351 | - elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; } |
|
352 | - else { echo ' '; } ?> |
|
350 | + if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; } |
|
351 | + elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; } |
|
352 | + else { echo ' '; } ?> |
|
353 | 353 | </td> |
354 | 354 | </tr> |
355 | 355 | <?php } ?> |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | <p class="warning"><?php echo I18N::translate('No family has been found for generation %d', $this->data->get('generation')); ?></p> |
388 | 388 | <?php |
389 | 389 | } |
390 | - } |
|
390 | + } |
|
391 | 391 | |
392 | 392 | } |
393 | 393 | |
394 | 394 | \ No newline at end of file |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | protected function renderContent() { |
36 | 36 | |
37 | - if($this->data->get('has_sosa', false)) { |
|
37 | + if ($this->data->get('has_sosa', false)) { |
|
38 | 38 | $table_id = $this->data->get('table_id'); |
39 | 39 | ?> |
40 | 40 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | class="ui-state-default" |
53 | 53 | title="<?php echo I18N::translate('Show individuals who are alive or couples where both partners are alive.'); ?>" |
54 | 54 | > |
55 | - <?php echo I18N::translate('Both alive');?> |
|
55 | + <?php echo I18N::translate('Both alive'); ?> |
|
56 | 56 | </button> |
57 | 57 | <button |
58 | 58 | type="button" |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | class="ui-state-default" |
62 | 62 | title="<?php echo I18N::translate('Show couples where only the female partner is deceased.'); ?>" |
63 | 63 | > |
64 | - <?php echo I18N::translate('Widower');?> |
|
64 | + <?php echo I18N::translate('Widower'); ?> |
|
65 | 65 | </button> |
66 | 66 | <button |
67 | 67 | type="button" |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | </thead> |
187 | 187 | <tbody> |
188 | 188 | |
189 | - <?php foreach($this->data->get('sosa_list') as $sosa => $family) { |
|
189 | + <?php foreach ($this->data->get('sosa_list') as $sosa => $family) { |
|
190 | 190 | /** @var \Fisharebest\Webtrees\Family $person */ |
191 | 191 | |
192 | 192 | //PERSO Create decorator for Family |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | } |
204 | 204 | $dwife = new \MyArtJaub\Webtrees\Individual($wife); |
205 | 205 | |
206 | - $mdate=$family->getMarriageDate(); |
|
206 | + $mdate = $family->getMarriageDate(); |
|
207 | 207 | |
208 | 208 | if ($family->isPendingAddtion()) { |
209 | 209 | $class = ' class="new"'; |
@@ -219,18 +219,18 @@ discard block |
||
219 | 219 | <!-- HUSBAND --> |
220 | 220 | <td colspan="2"> |
221 | 221 | <?php foreach ($husb->getAllNames() as $num=>$name) { |
222 | - if ($name['type']=='NAME') { |
|
223 | - $title=''; |
|
222 | + if ($name['type'] == 'NAME') { |
|
223 | + $title = ''; |
|
224 | 224 | } else { |
225 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"'; |
|
225 | + $title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"'; |
|
226 | 226 | } |
227 | - if ($num==$husb->getPrimaryName()) { |
|
228 | - $class=' class="name2"'; |
|
229 | - $sex_image=$husb->getSexImage(); |
|
230 | - list($surn, $givn)=explode(',', $name['sort']); |
|
227 | + if ($num == $husb->getPrimaryName()) { |
|
228 | + $class = ' class="name2"'; |
|
229 | + $sex_image = $husb->getSexImage(); |
|
230 | + list($surn, $givn) = explode(',', $name['sort']); |
|
231 | 231 | } else { |
232 | - $class=''; |
|
233 | - $sex_image=''; |
|
232 | + $class = ''; |
|
233 | + $sex_image = ''; |
|
234 | 234 | } ?> |
235 | 235 | <a <?php echo $title.' '.$class; ?> href="<?php echo $husb->getHtmlUrl(); ?>"> |
236 | 236 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
@@ -244,29 +244,29 @@ discard block |
||
244 | 244 | <!-- Dummy column to match colspan in header --> |
245 | 245 | <td style="display:none;"></td> |
246 | 246 | <td> |
247 | - <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
247 | + <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
248 | 248 | </td> |
249 | 249 | <td> |
250 | - <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
250 | + <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
251 | 251 | </td> |
252 | - <?php $hdate=$husb->getBirthDate(); ?> |
|
252 | + <?php $hdate = $husb->getBirthDate(); ?> |
|
253 | 253 | <td><?php Date::getAge($hdate, $mdate, 2); ?></td> |
254 | 254 | <td><?php Date::getAge($hdate, $mdate, 1); ?></td> |
255 | 255 | <!-- WIFE --> |
256 | 256 | <td colspan="2"> |
257 | 257 | <?php foreach ($wife->getAllNames() as $num=>$name) { |
258 | - if ($name['type']=='NAME') { |
|
259 | - $title=''; |
|
258 | + if ($name['type'] == 'NAME') { |
|
259 | + $title = ''; |
|
260 | 260 | } else { |
261 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"'; |
|
261 | + $title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"'; |
|
262 | 262 | } |
263 | - if ($num==$wife->getPrimaryName()) { |
|
264 | - $class=' class="name2"'; |
|
265 | - $sex_image=$wife->getSexImage(); |
|
266 | - list($surn, $givn)=explode(',', $name['sort']); |
|
263 | + if ($num == $wife->getPrimaryName()) { |
|
264 | + $class = ' class="name2"'; |
|
265 | + $sex_image = $wife->getSexImage(); |
|
266 | + list($surn, $givn) = explode(',', $name['sort']); |
|
267 | 267 | } else { |
268 | - $class=''; |
|
269 | - $sex_image=''; |
|
268 | + $class = ''; |
|
269 | + $sex_image = ''; |
|
270 | 270 | } ?> |
271 | 271 | <a <?php echo $title.' '.$class; ?> href="<?php echo $wife->getHtmlUrl(); ?>"> |
272 | 272 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
@@ -280,12 +280,12 @@ discard block |
||
280 | 280 | <!-- Dummy column to match colspan in header --> |
281 | 281 | <td style="display:none;"></td> |
282 | 282 | <td> |
283 | - <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
283 | + <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
284 | 284 | </td> |
285 | 285 | <td> |
286 | - <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
286 | + <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
287 | 287 | </td> |
288 | - <?php $wdate=$wife->getBirthDate(); ?> |
|
288 | + <?php $wdate = $wife->getBirthDate(); ?> |
|
289 | 289 | <td><?php Date::getAge($wdate, $mdate, 2); ?></td> |
290 | 290 | <td><?php Date::getAge($wdate, $mdate, 1); ?></td> |
291 | 291 | <td><?php |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | echo ' '; |
303 | 303 | } ?> |
304 | 304 | </td> |
305 | - <td><?php echo $marriage_dates ? $marriage_date->julianDay() : 0; ?></td> |
|
305 | + <td><?php echo $marriage_dates ? $marriage_date->julianDay() : 0; ?></td> |
|
306 | 306 | <td><?php |
307 | 307 | foreach ($family->getAllMarriagePlaces() as $n => $marriage_place) { |
308 | 308 | $tmp = new Place($marriage_place, $family->getTree()); |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | <button type="button" class="ui-state-default btn-toggle-parents"> |
363 | 363 | <?php echo I18N::translate('Show parents') ?> |
364 | 364 | </button> |
365 | - <button id="btn-toggle-statistics-<?php echo $table_id ;?>" type="button" class="ui-state-default btn-toggle-statistics"> |
|
365 | + <button id="btn-toggle-statistics-<?php echo $table_id; ?>" type="button" class="ui-state-default btn-toggle-statistics"> |
|
366 | 366 | <?php echo I18N::translate('Show statistics charts') ?> |
367 | 367 | </button> |
368 | 368 | </div> |
@@ -324,10 +324,8 @@ discard block |
||
324 | 324 | <td><?php echo I18N::number($nchi); ?></td> |
325 | 325 | <td><?php echo $nchi; ?></td> |
326 | 326 | <td><?php |
327 | - if (!$mdate->isOK()) { echo 'U'; } |
|
328 | - else { |
|
329 | - if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; } |
|
330 | - else { echo 'YES'; } |
|
327 | + if (!$mdate->isOK()) { echo 'U'; } else { |
|
328 | + if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; } else { echo 'YES'; } |
|
331 | 329 | } |
332 | 330 | if ($family->getFacts(WT_EVENTS_DIV)) { echo 'D'; } |
333 | 331 | if (count($husb->getSpouseFamilies()) > 1 || count($wife->getSpouseFamilies()) > 1) { |
@@ -347,9 +345,7 @@ discard block |
||
347 | 345 | if (!$husb->isDead() && !$wife->isDead()) { echo 'N'; } ?> |
348 | 346 | </td> |
349 | 347 | <td><?php |
350 | - if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; } |
|
351 | - elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; } |
|
352 | - else { echo ' '; } ?> |
|
348 | + if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; } elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; } else { echo ' '; } ?> |
|
353 | 349 | </td> |
354 | 350 | </tr> |
355 | 351 | <?php } ?> |
@@ -23,18 +23,18 @@ |
||
23 | 23 | * {@inhericDoc} |
24 | 24 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
25 | 25 | */ |
26 | - protected function renderContent() { |
|
26 | + protected function renderContent() { |
|
27 | 27 | |
28 | - if($this->data->get('is_success', false)) { |
|
29 | - ?> |
|
28 | + if($this->data->get('is_success', false)) { |
|
29 | + ?> |
|
30 | 30 | <i class="icon-maj-success" title="<?php echo I18N::translate('Success'); ?>"></i> |
31 | 31 | <?php echo I18N::translate('Success'); ?> |
32 | 32 | <?php } else { ?> |
33 | 33 | <i class="icon-maj-error" title="<?php echo I18N::translate('Error'); ?>"></i> |
34 | 34 | <?php echo I18N::translate('Error'); ?> |
35 | 35 | <?php if($error = $this->data->get('error')) { echo ' - ' . $error; } |
36 | - } |
|
37 | - } |
|
36 | + } |
|
37 | + } |
|
38 | 38 | |
39 | 39 | } |
40 | 40 | |
41 | 41 | \ No newline at end of file |
@@ -25,14 +25,14 @@ |
||
25 | 25 | */ |
26 | 26 | protected function renderContent() { |
27 | 27 | |
28 | - if($this->data->get('is_success', false)) { |
|
28 | + if ($this->data->get('is_success', false)) { |
|
29 | 29 | ?> |
30 | 30 | <i class="icon-maj-success" title="<?php echo I18N::translate('Success'); ?>"></i> |
31 | 31 | <?php echo I18N::translate('Success'); ?> |
32 | 32 | <?php } else { ?> |
33 | 33 | <i class="icon-maj-error" title="<?php echo I18N::translate('Error'); ?>"></i> |
34 | 34 | <?php echo I18N::translate('Error'); ?> |
35 | - <?php if($error = $this->data->get('error')) { echo ' - ' . $error; } |
|
35 | + <?php if ($error = $this->data->get('error')) { echo ' - '.$error; } |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 |
@@ -31,18 +31,18 @@ discard block |
||
31 | 31 | * {@inhericDoc} |
32 | 32 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
33 | 33 | */ |
34 | - protected function renderContent() { |
|
35 | - ?> |
|
34 | + protected function renderContent() { |
|
35 | + ?> |
|
36 | 36 | <div id="maj-sosa-missing-page" class="center"> |
37 | 37 | <h2><?php echo $this->data->get('title'); ?></h2> |
38 | 38 | |
39 | 39 | <?php if($this->data->get('is_setup')) { |
40 | - $selectedgen = $this->data->get('generation'); |
|
41 | - $this->renderSosaHeader(); |
|
42 | - if($this->data->get('has_missing', false)) { |
|
43 | - $missing_list = $this->data->get('missing_list'); |
|
44 | - $table_id = $this->data->get('table_id'); |
|
45 | - ?> |
|
40 | + $selectedgen = $this->data->get('generation'); |
|
41 | + $this->renderSosaHeader(); |
|
42 | + if($this->data->get('has_missing', false)) { |
|
43 | + $missing_list = $this->data->get('missing_list'); |
|
44 | + $table_id = $this->data->get('table_id'); |
|
45 | + ?> |
|
46 | 46 | <div id="sosa-indi-missing" class="smissing-list"> |
47 | 47 | <table id="<?php echo $table_id;?>"> |
48 | 48 | <thead> |
@@ -113,44 +113,44 @@ discard block |
||
113 | 113 | <tbody> |
114 | 114 | |
115 | 115 | <?php foreach($this->data->get('missing_list') as $missing_tab) { |
116 | - $person = $missing_tab['indi']; |
|
116 | + $person = $missing_tab['indi']; |
|
117 | 117 | |
118 | - /** @var \Fisharebest\Webtrees\Individual $person */ |
|
119 | - if ($person->isPendingAddtion()) { |
|
120 | - $class = ' class="new"'; |
|
121 | - } elseif ($person->isPendingDeletion()) { |
|
122 | - $class = ' class="old"'; |
|
123 | - } else { |
|
124 | - $class = ''; |
|
125 | - } |
|
126 | - $dperson = new \MyArtJaub\Webtrees\Individual($person); |
|
127 | - ?> |
|
118 | + /** @var \Fisharebest\Webtrees\Individual $person */ |
|
119 | + if ($person->isPendingAddtion()) { |
|
120 | + $class = ' class="new"'; |
|
121 | + } elseif ($person->isPendingDeletion()) { |
|
122 | + $class = ' class="old"'; |
|
123 | + } else { |
|
124 | + $class = ''; |
|
125 | + } |
|
126 | + $dperson = new \MyArtJaub\Webtrees\Individual($person); |
|
127 | + ?> |
|
128 | 128 | <tr <?php echo $class?>> |
129 | 129 | <td class="transparent"><?php echo $missing_tab['sosa']; ?></td> |
130 | 130 | <td class="transparent"><?php echo $person->getXref(); ?></td> |
131 | 131 | <td colspan="2"> |
132 | 132 | <?php foreach ($person->getAllNames() as $num=>$name) { |
133 | - if ($name['type']=='NAME') { |
|
134 | - $title=''; |
|
135 | - } else { |
|
136 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
137 | - } |
|
138 | - if ($num==$person->getPrimaryName()) { |
|
139 | - $class=' class="name2"'; |
|
140 | - $sex_image=$person->getSexImage(); |
|
141 | - list($surn, $givn)=explode(',', $name['sort']); |
|
142 | - } else { |
|
143 | - $class=''; |
|
144 | - $sex_image=''; |
|
145 | - } ?> |
|
133 | + if ($name['type']=='NAME') { |
|
134 | + $title=''; |
|
135 | + } else { |
|
136 | + $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
137 | + } |
|
138 | + if ($num==$person->getPrimaryName()) { |
|
139 | + $class=' class="name2"'; |
|
140 | + $sex_image=$person->getSexImage(); |
|
141 | + list($surn, $givn)=explode(',', $name['sort']); |
|
142 | + } else { |
|
143 | + $class=''; |
|
144 | + $sex_image=''; |
|
145 | + } ?> |
|
146 | 146 | <a <?php echo $title.' '.$class; ?> href="<?php echo $person->getHtmlUrl(); ?>"> |
147 | 147 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
148 | 148 | </a> |
149 | 149 | <?php echo $sex_image.FunctionsPrint::formatSosaNumbers($dperson->getSosaNumbers(), 1, 'smaller'); ?> |
150 | 150 | <br/> |
151 | 151 | <?php } |
152 | - echo $person->getPrimaryParentsNames('parents details1', 'none'); |
|
153 | - ?> |
|
152 | + echo $person->getPrimaryParentsNames('parents details1', 'none'); |
|
153 | + ?> |
|
154 | 154 | </td> |
155 | 155 | <td style="display:none;"></td> |
156 | 156 | <td> |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
161 | 161 | </td> |
162 | 162 | <?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) { |
163 | - $isISourced = $dperson->isSourced(); ?> |
|
163 | + $isISourced = $dperson->isSourced(); ?> |
|
164 | 164 | <td><?php echo FunctionsPrint::formatIsSourcedIcon('R', $isISourced, 'INDI', 1, 'medium'); ?></td> |
165 | 165 | <td><?php echo $isISourced; ?></td> |
166 | 166 | <?php } else { ?> |
@@ -171,34 +171,34 @@ discard block |
||
171 | 171 | <td><?php echo $missing_tab['has_mother'] ? ' ' : 'X';?></td> |
172 | 172 | <td> |
173 | 173 | <?php |
174 | - if ($birth_dates=$person->getAllBirthDates()) { |
|
175 | - foreach ($birth_dates as $num=>$birth_date) { |
|
176 | - if ($num) { ?><br/><?php } ?> |
|
174 | + if ($birth_dates=$person->getAllBirthDates()) { |
|
175 | + foreach ($birth_dates as $num=>$birth_date) { |
|
176 | + if ($num) { ?><br/><?php } ?> |
|
177 | 177 | <?php echo $birth_date->display(true); |
178 | - } |
|
179 | - } else { |
|
180 | - $birth_date=$person->getEstimatedBirthDate(); |
|
181 | - if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) { |
|
182 | - $birth_date->display(true); |
|
183 | - } else { |
|
184 | - echo ' '; |
|
185 | - } |
|
186 | - $birth_dates[0] = new Date(''); |
|
187 | - } |
|
188 | - ?> |
|
178 | + } |
|
179 | + } else { |
|
180 | + $birth_date=$person->getEstimatedBirthDate(); |
|
181 | + if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) { |
|
182 | + $birth_date->display(true); |
|
183 | + } else { |
|
184 | + echo ' '; |
|
185 | + } |
|
186 | + $birth_dates[0] = new Date(''); |
|
187 | + } |
|
188 | + ?> |
|
189 | 189 | </td> |
190 | 190 | <td><?php echo $birth_date->julianDay();?></td> |
191 | 191 | <td> |
192 | 192 | <?php foreach ($person->getAllBirthPlaces() as $n => $birth_place) { |
193 | - $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree()); |
|
194 | - if ($n) { ?><br><?php } ?> |
|
193 | + $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree()); |
|
194 | + if ($n) { ?><br><?php } ?> |
|
195 | 195 | <a href="'<?php echo $tmp->getURL(); ?>" title="<?php echo strip_tags($tmp->getFullName()); ?>"> |
196 | 196 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($tmp->getShortName()); ?> |
197 | 197 | </a> |
198 | 198 | <?php } ?> |
199 | 199 | </td> |
200 | 200 | <?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) { |
201 | - $isBSourced = $dperson->isBirthSourced(); ?> |
|
201 | + $isBSourced = $dperson->isBirthSourced(); ?> |
|
202 | 202 | <td><?php echo FunctionsPrint::formatIsSourcedIcon('E', $isBSourced, 'BIRT', 1, 'medium'); ?></td> |
203 | 203 | <td><?php echo $isBSourced; ?></td> |
204 | 204 | <?php } else { ?> |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | <?php } else { ?> |
230 | 230 | <p><?php echo I18N::translate('No ancestors are missing for this generation. Generation complete at %s.', I18N::percentage($this->data->get('perc_sosa'), 2)); ?></p> |
231 | 231 | <?php } |
232 | - } else { ?> |
|
232 | + } else { ?> |
|
233 | 233 | <p class="warning"><?php echo I18N::translate('The list could not be displayed. Reasons might be:'); ?><br/> |
234 | 234 | <ul> |
235 | 235 | <li><?php echo I18N::translate('No Sosa root individual has been defined.'); ?></li> |
@@ -240,6 +240,6 @@ discard block |
||
240 | 240 | <?php } ?> |
241 | 241 | </div> |
242 | 242 | <?php |
243 | - } |
|
243 | + } |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | \ No newline at end of file |
@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | <div id="maj-sosa-missing-page" class="center"> |
37 | 37 | <h2><?php echo $this->data->get('title'); ?></h2> |
38 | 38 | |
39 | - <?php if($this->data->get('is_setup')) { |
|
39 | + <?php if ($this->data->get('is_setup')) { |
|
40 | 40 | $selectedgen = $this->data->get('generation'); |
41 | 41 | $this->renderSosaHeader(); |
42 | - if($this->data->get('has_missing', false)) { |
|
42 | + if ($this->data->get('has_missing', false)) { |
|
43 | 43 | $missing_list = $this->data->get('missing_list'); |
44 | 44 | $table_id = $this->data->get('table_id'); |
45 | 45 | ?> |
46 | 46 | <div id="sosa-indi-missing" class="smissing-list"> |
47 | - <table id="<?php echo $table_id;?>"> |
|
47 | + <table id="<?php echo $table_id; ?>"> |
|
48 | 48 | <thead> |
49 | 49 | <tr> |
50 | 50 | <th colspan="16"> |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | </thead> |
113 | 113 | <tbody> |
114 | 114 | |
115 | - <?php foreach($this->data->get('missing_list') as $missing_tab) { |
|
115 | + <?php foreach ($this->data->get('missing_list') as $missing_tab) { |
|
116 | 116 | $person = $missing_tab['indi']; |
117 | 117 | |
118 | 118 | /** @var \Fisharebest\Webtrees\Individual $person */ |
@@ -130,18 +130,18 @@ discard block |
||
130 | 130 | <td class="transparent"><?php echo $person->getXref(); ?></td> |
131 | 131 | <td colspan="2"> |
132 | 132 | <?php foreach ($person->getAllNames() as $num=>$name) { |
133 | - if ($name['type']=='NAME') { |
|
134 | - $title=''; |
|
133 | + if ($name['type'] == 'NAME') { |
|
134 | + $title = ''; |
|
135 | 135 | } else { |
136 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
136 | + $title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
137 | 137 | } |
138 | - if ($num==$person->getPrimaryName()) { |
|
139 | - $class=' class="name2"'; |
|
140 | - $sex_image=$person->getSexImage(); |
|
141 | - list($surn, $givn)=explode(',', $name['sort']); |
|
138 | + if ($num == $person->getPrimaryName()) { |
|
139 | + $class = ' class="name2"'; |
|
140 | + $sex_image = $person->getSexImage(); |
|
141 | + list($surn, $givn) = explode(',', $name['sort']); |
|
142 | 142 | } else { |
143 | - $class=''; |
|
144 | - $sex_image=''; |
|
143 | + $class = ''; |
|
144 | + $sex_image = ''; |
|
145 | 145 | } ?> |
146 | 146 | <a <?php echo $title.' '.$class; ?> href="<?php echo $person->getHtmlUrl(); ?>"> |
147 | 147 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
@@ -154,10 +154,10 @@ discard block |
||
154 | 154 | </td> |
155 | 155 | <td style="display:none;"></td> |
156 | 156 | <td> |
157 | - <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
157 | + <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
158 | 158 | </td> |
159 | 159 | <td> |
160 | - <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
160 | + <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
161 | 161 | </td> |
162 | 162 | <?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) { |
163 | 163 | $isISourced = $dperson->isSourced(); ?> |
@@ -167,17 +167,17 @@ discard block |
||
167 | 167 | <td> </td> |
168 | 168 | <td></td> |
169 | 169 | <?php } ?> |
170 | - <td><?php echo $missing_tab['has_father'] ? ' ' : 'X';?></td> |
|
171 | - <td><?php echo $missing_tab['has_mother'] ? ' ' : 'X';?></td> |
|
170 | + <td><?php echo $missing_tab['has_father'] ? ' ' : 'X'; ?></td> |
|
171 | + <td><?php echo $missing_tab['has_mother'] ? ' ' : 'X'; ?></td> |
|
172 | 172 | <td> |
173 | 173 | <?php |
174 | - if ($birth_dates=$person->getAllBirthDates()) { |
|
174 | + if ($birth_dates = $person->getAllBirthDates()) { |
|
175 | 175 | foreach ($birth_dates as $num=>$birth_date) { |
176 | 176 | if ($num) { ?><br/><?php } ?> |
177 | 177 | <?php echo $birth_date->display(true); |
178 | 178 | } |
179 | 179 | } else { |
180 | - $birth_date=$person->getEstimatedBirthDate(); |
|
180 | + $birth_date = $person->getEstimatedBirthDate(); |
|
181 | 181 | if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) { |
182 | 182 | $birth_date->display(true); |
183 | 183 | } else { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | } |
188 | 188 | ?> |
189 | 189 | </td> |
190 | - <td><?php echo $birth_date->julianDay();?></td> |
|
190 | + <td><?php echo $birth_date->julianDay(); ?></td> |
|
191 | 191 | <td> |
192 | 192 | <?php foreach ($person->getAllBirthPlaces() as $n => $birth_place) { |
193 | 193 | $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree()); |
@@ -218,9 +218,9 @@ discard block |
||
218 | 218 | $missing_hidden = $this->data->get('missing_hidden'); |
219 | 219 | ?> |
220 | 220 | <?php echo I18N::translate('Number of different missing ancestors: %s', I18N::number($this->data->get('missing_diff_count'))); ?> |
221 | - <?php if($this->data->get('missing_hidden') > 0) echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?> |
|
222 | - <?php echo ' - ' . I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)); ?> |
|
223 | - <?php echo ' [' . I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'),2)).']'; ?> |
|
221 | + <?php if ($this->data->get('missing_hidden') > 0) echo ' ['.I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?> |
|
222 | + <?php echo ' - '.I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)); ?> |
|
223 | + <?php echo ' ['.I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'), 2)).']'; ?> |
|
224 | 224 | </div> |
225 | 225 | </td> |
226 | 226 | </tr> |
@@ -218,7 +218,10 @@ |
||
218 | 218 | $missing_hidden = $this->data->get('missing_hidden'); |
219 | 219 | ?> |
220 | 220 | <?php echo I18N::translate('Number of different missing ancestors: %s', I18N::number($this->data->get('missing_diff_count'))); ?> |
221 | - <?php if($this->data->get('missing_hidden') > 0) echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?> |
|
221 | + <?php if($this->data->get('missing_hidden') > 0) { |
|
222 | + echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; |
|
223 | +} |
|
224 | +?> |
|
222 | 225 | <?php echo ' - ' . I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)); ?> |
223 | 226 | <?php echo ' [' . I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'),2)).']'; ?> |
224 | 227 | </div> |