@@ -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 | } |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -23,17 +23,17 @@ |
||
23 | 23 | |
24 | 24 | Database::exec( |
25 | 25 | "CREATE TABLE IF NOT EXISTS `##maj_hooks` (". |
26 | - " majh_id INTEGER AUTO_INCREMENT NOT NULL,". |
|
27 | - " majh_hook_function VARCHAR(32) NOT NULL,". |
|
26 | + " majh_id INTEGER AUTO_INCREMENT NOT NULL,". |
|
27 | + " majh_hook_function VARCHAR(32) NOT NULL,". |
|
28 | 28 | " majh_hook_context VARCHAR(32) NOT NULL DEFAULT 'all',". |
29 | - " majh_module_name VARCHAR(32) NOT NULL,". |
|
30 | - " majh_module_priority INTEGER NOT NULL DEFAULT 99,". |
|
31 | - " majh_status ENUM('enabled', 'disabled') NOT NULL DEFAULT 'enabled',". |
|
32 | - " PRIMARY KEY (majh_id),". |
|
33 | - " UNIQUE KEY `##maj_hooks_uk` (majh_hook_function, majh_hook_context, majh_module_name),". |
|
34 | - " FOREIGN KEY `##module_name_fk1` (majh_module_name)". |
|
29 | + " majh_module_name VARCHAR(32) NOT NULL,". |
|
30 | + " majh_module_priority INTEGER NOT NULL DEFAULT 99,". |
|
31 | + " majh_status ENUM('enabled', 'disabled') NOT NULL DEFAULT 'enabled',". |
|
32 | + " PRIMARY KEY (majh_id),". |
|
33 | + " UNIQUE KEY `##maj_hooks_uk` (majh_hook_function, majh_hook_context, majh_module_name),". |
|
34 | + " FOREIGN KEY `##module_name_fk1` (majh_module_name)". |
|
35 | 35 | " REFERENCES `##module` (module_name) ON DELETE CASCADE ON UPDATE CASCADE". |
36 | - ") COLLATE utf8_unicode_ci ENGINE=InnoDB" |
|
36 | + ") COLLATE utf8_unicode_ci ENGINE=InnoDB" |
|
37 | 37 | ); |
38 | 38 | } |
39 | 39 | } |
@@ -25,11 +25,11 @@ 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 | - $table_id = $this->data->get('table_id'); |
|
30 | + $table_id = $this->data->get('table_id'); |
|
31 | 31 | |
32 | - ?> |
|
32 | + ?> |
|
33 | 33 | <ol class="breadcrumb small"> |
34 | 34 | <li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li> |
35 | 35 | <li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li> |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | </div> |
80 | 80 | |
81 | 81 | <?php |
82 | - } |
|
82 | + } |
|
83 | 83 | |
84 | 84 | } |
85 | 85 | |
86 | 86 | \ No newline at end of file |