@@ -31,161 +31,161 @@ 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 | - /** @var \Fisharebest\Webtrees\Tree $tree */ |
|
| 37 | - $tree = $this->data->get('tree'); |
|
| 36 | + /** @var \Fisharebest\Webtrees\Tree $tree */ |
|
| 37 | + $tree = $this->data->get('tree'); |
|
| 38 | 38 | |
| 39 | - echo '<h2 class="center">', $this->data->get('title') , '</h2>'; |
|
| 40 | - echo '<p class="center alpha_index">', implode(' | ', $this->getInitialLettersList()), '</p>'; |
|
| 39 | + echo '<h2 class="center">', $this->data->get('title') , '</h2>'; |
|
| 40 | + echo '<p class="center alpha_index">', implode(' | ', $this->getInitialLettersList()), '</p>'; |
|
| 41 | 41 | |
| 42 | - if($this->data->get('issurnames', false)) { |
|
| 43 | - $surns = $this->data->get('surnameslist', array()); |
|
| 44 | - $extra_params = array ('mod' => Constants::MODULE_MAJ_PATROLIN_NAME, 'mod_action' => 'Lineage'); |
|
| 45 | - // Show the surname list |
|
| 46 | - switch ($tree->getPreference('SURNAME_LIST_STYLE')) { |
|
| 47 | - case 'style1': |
|
| 42 | + if($this->data->get('issurnames', false)) { |
|
| 43 | + $surns = $this->data->get('surnameslist', array()); |
|
| 44 | + $extra_params = array ('mod' => Constants::MODULE_MAJ_PATROLIN_NAME, 'mod_action' => 'Lineage'); |
|
| 45 | + // Show the surname list |
|
| 46 | + switch ($tree->getPreference('SURNAME_LIST_STYLE')) { |
|
| 47 | + case 'style1': |
|
| 48 | 48 | echo FunctionsPrintLists::surnameList($surns, 3, true, WT_SCRIPT_NAME, $tree, $extra_params); |
| 49 | 49 | break; |
| 50 | - case 'style3': |
|
| 51 | - echo FunctionsPrintLists::surnameTagCloud($surns, WT_SCRIPT_NAME, true, $tree, $extra_params); |
|
| 52 | - break; |
|
| 53 | - case 'style2': |
|
| 54 | - default: |
|
| 55 | - echo FunctionsPrintLists::surnameTable($surns, WT_SCRIPT_NAME, $tree, $extra_params); |
|
| 56 | - break; |
|
| 57 | - } |
|
| 58 | - } |
|
| 59 | - else if ($this->data->get('islineages', false)) { |
|
| 60 | - //Link to indilist |
|
| 61 | - echo '<p class="center"><strong>'. |
|
| 62 | - '<a href="indilist.php?ged=' . $tree->getNameUrl() . '&surname=' . rawurlencode($this->data->get('surname')) .'">'. |
|
| 63 | - I18N::translate('Go to the list of individuals with surname %s', $this->data->get('legend')). |
|
| 64 | - '</a></strong></p>'; |
|
| 50 | + case 'style3': |
|
| 51 | + echo FunctionsPrintLists::surnameTagCloud($surns, WT_SCRIPT_NAME, true, $tree, $extra_params); |
|
| 52 | + break; |
|
| 53 | + case 'style2': |
|
| 54 | + default: |
|
| 55 | + echo FunctionsPrintLists::surnameTable($surns, WT_SCRIPT_NAME, $tree, $extra_params); |
|
| 56 | + break; |
|
| 57 | + } |
|
| 58 | + } |
|
| 59 | + else if ($this->data->get('islineages', false)) { |
|
| 60 | + //Link to indilist |
|
| 61 | + echo '<p class="center"><strong>'. |
|
| 62 | + '<a href="indilist.php?ged=' . $tree->getNameUrl() . '&surname=' . rawurlencode($this->data->get('surname')) .'">'. |
|
| 63 | + I18N::translate('Go to the list of individuals with surname %s', $this->data->get('legend')). |
|
| 64 | + '</a></strong></p>'; |
|
| 65 | 65 | |
| 66 | - $lineages = $this->data->get('lineages', null); |
|
| 67 | - $nb_lineages = is_null($lineages) ? 0 : count($lineages); |
|
| 68 | - if($nb_lineages == 0) { |
|
| 69 | - echo '<p class="center"><span class="warning">', |
|
| 70 | - I18N::translate('No individuals with surname %s has been found. Please try another name.', |
|
| 71 | - '<span dir="auto">' . $this->data->get('legend') . '</span>'), |
|
| 72 | - '</span></p>'; |
|
| 73 | - } else { |
|
| 66 | + $lineages = $this->data->get('lineages', null); |
|
| 67 | + $nb_lineages = is_null($lineages) ? 0 : count($lineages); |
|
| 68 | + if($nb_lineages == 0) { |
|
| 69 | + echo '<p class="center"><span class="warning">', |
|
| 70 | + I18N::translate('No individuals with surname %s has been found. Please try another name.', |
|
| 71 | + '<span dir="auto">' . $this->data->get('legend') . '</span>'), |
|
| 72 | + '</span></p>'; |
|
| 73 | + } else { |
|
| 74 | 74 | |
| 75 | - echo '<div id="patronymiclineages">'. |
|
| 76 | - '<div class="list_label">', |
|
| 77 | - $this->data->get('table_title'), |
|
| 78 | - '</div>'; |
|
| 75 | + echo '<div id="patronymiclineages">'. |
|
| 76 | + '<div class="list_label">', |
|
| 77 | + $this->data->get('table_title'), |
|
| 78 | + '</div>'; |
|
| 79 | 79 | |
| 80 | - echo '<div class="list_value_wrap">'; |
|
| 80 | + echo '<div class="list_value_wrap">'; |
|
| 81 | 81 | |
| 82 | - foreach($lineages as $i => $lineage) { |
|
| 83 | - $this->printRootLineage($lineage); |
|
| 84 | - if($i < $nb_lineages - 1) echo '<hr />'; |
|
| 85 | - } |
|
| 82 | + foreach($lineages as $i => $lineage) { |
|
| 83 | + $this->printRootLineage($lineage); |
|
| 84 | + if($i < $nb_lineages - 1) echo '<hr />'; |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - echo '</div>'; |
|
| 87 | + echo '</div>'; |
|
| 88 | 88 | |
| 89 | - echo '<div class="list_label">', |
|
| 90 | - I18N::translate('%s lineages found', $nb_lineages), |
|
| 91 | - '</div>'. |
|
| 92 | - '</div>'; |
|
| 89 | + echo '<div class="list_label">', |
|
| 90 | + I18N::translate('%s lineages found', $nb_lineages), |
|
| 91 | + '</div>'. |
|
| 92 | + '</div>'; |
|
| 93 | 93 | |
| 94 | - } |
|
| 95 | - } |
|
| 96 | - } |
|
| 94 | + } |
|
| 95 | + } |
|
| 96 | + } |
|
| 97 | 97 | |
| 98 | - /** |
|
| 99 | - * Get the list of initial letters |
|
| 100 | - * |
|
| 101 | - * @return string[] |
|
| 102 | - */ |
|
| 103 | - private function getInitialLettersList() { |
|
| 104 | - $list = array(); |
|
| 105 | - /** @var \Fisharebest\Webtrees\Tree $tree */ |
|
| 106 | - $tree = $this->data->get('tree'); |
|
| 98 | + /** |
|
| 99 | + * Get the list of initial letters |
|
| 100 | + * |
|
| 101 | + * @return string[] |
|
| 102 | + */ |
|
| 103 | + private function getInitialLettersList() { |
|
| 104 | + $list = array(); |
|
| 105 | + /** @var \Fisharebest\Webtrees\Tree $tree */ |
|
| 106 | + $tree = $this->data->get('tree'); |
|
| 107 | 107 | $script_base_url = WT_SCRIPT_NAME . '?mod=' . \MyArtJaub\Webtrees\Constants::MODULE_MAJ_PATROLIN_NAME . '&mod_action=Lineage'; |
| 108 | 108 | |
| 109 | - foreach (QueryName::surnameAlpha($tree, false, false) as $letter => $count) { |
|
| 110 | - switch ($letter) { |
|
| 111 | - case '@': |
|
| 112 | - $html = I18N::translateContext('Unknown surname', '…'); |
|
| 113 | - break; |
|
| 114 | - case ',': |
|
| 115 | - $html = I18N::translate('None'); |
|
| 116 | - break; |
|
| 117 | - default: |
|
| 118 | - $html = Filter::escapeHtml($letter); |
|
| 119 | - break; |
|
| 120 | - } |
|
| 121 | - if ($count) { |
|
| 122 | - if ($letter == $this->data->get('alpha')) { |
|
| 123 | - $list[] = '<a href="' . $script_base_url . '&alpha=' . rawurlencode($letter) . '&ged=' . $tree->getNameUrl() . '" class="warning" title="' . I18N::number($count) . '">' . $html . '</a>'; |
|
| 124 | - } else { |
|
| 125 | - $list[] = '<a href="' . $script_base_url . '&alpha=' . rawurlencode($letter) . '&ged=' . $tree->getNameUrl() . '" title="' . I18N::number($count) . '">' . $html . '</a>'; |
|
| 126 | - } |
|
| 127 | - } else { |
|
| 128 | - $list[] = $html; |
|
| 129 | - } |
|
| 130 | - } |
|
| 109 | + foreach (QueryName::surnameAlpha($tree, false, false) as $letter => $count) { |
|
| 110 | + switch ($letter) { |
|
| 111 | + case '@': |
|
| 112 | + $html = I18N::translateContext('Unknown surname', '…'); |
|
| 113 | + break; |
|
| 114 | + case ',': |
|
| 115 | + $html = I18N::translate('None'); |
|
| 116 | + break; |
|
| 117 | + default: |
|
| 118 | + $html = Filter::escapeHtml($letter); |
|
| 119 | + break; |
|
| 120 | + } |
|
| 121 | + if ($count) { |
|
| 122 | + if ($letter == $this->data->get('alpha')) { |
|
| 123 | + $list[] = '<a href="' . $script_base_url . '&alpha=' . rawurlencode($letter) . '&ged=' . $tree->getNameUrl() . '" class="warning" title="' . I18N::number($count) . '">' . $html . '</a>'; |
|
| 124 | + } else { |
|
| 125 | + $list[] = '<a href="' . $script_base_url . '&alpha=' . rawurlencode($letter) . '&ged=' . $tree->getNameUrl() . '" title="' . I18N::number($count) . '">' . $html . '</a>'; |
|
| 126 | + } |
|
| 127 | + } else { |
|
| 128 | + $list[] = $html; |
|
| 129 | + } |
|
| 130 | + } |
|
| 131 | 131 | |
| 132 | - // Search spiders don't get the "show all" option as the other links give them everything. |
|
| 133 | - if (!Auth::isSearchEngine()) { |
|
| 134 | - if ($this->data->get('show_all') === 'yes') { |
|
| 135 | - $list[] = '<span class="warning">' . I18N::translate('All') . '</span>'; |
|
| 136 | - } else { |
|
| 137 | - $list[] = '<a href="' . $script_base_url . '&show_all=yes' . '&ged=' . $tree->getNameUrl() . '">' . I18N::translate('All') . '</a>'; |
|
| 138 | - } |
|
| 139 | - } |
|
| 132 | + // Search spiders don't get the "show all" option as the other links give them everything. |
|
| 133 | + if (!Auth::isSearchEngine()) { |
|
| 134 | + if ($this->data->get('show_all') === 'yes') { |
|
| 135 | + $list[] = '<span class="warning">' . I18N::translate('All') . '</span>'; |
|
| 136 | + } else { |
|
| 137 | + $list[] = '<a href="' . $script_base_url . '&show_all=yes' . '&ged=' . $tree->getNameUrl() . '">' . I18N::translate('All') . '</a>'; |
|
| 138 | + } |
|
| 139 | + } |
|
| 140 | 140 | |
| 141 | - return $list; |
|
| 142 | - } |
|
| 141 | + return $list; |
|
| 142 | + } |
|
| 143 | 143 | |
| 144 | - /** |
|
| 145 | - * Print a root lineage node |
|
| 146 | - * @param LineageRootNode $node |
|
| 147 | - */ |
|
| 148 | - private function printRootLineage(LineageRootNode $node) { |
|
| 149 | - print '<div class="patrolin_tree">'; |
|
| 150 | - if($node->getIndividual() === null) { |
|
| 151 | - $fam_nodes = $node->getFamiliesNodes(); |
|
| 152 | - foreach($fam_nodes as $fam){ |
|
| 153 | - foreach($fam_nodes[$fam] as $child_node) { |
|
| 154 | - if($child_node) { |
|
| 155 | - $this->printLineage($child_node); |
|
| 156 | - } |
|
| 157 | - } |
|
| 158 | - } |
|
| 159 | - } |
|
| 160 | - else { |
|
| 161 | - $this->printLineage($node); |
|
| 162 | - } |
|
| 163 | - echo '</div>'; |
|
| 144 | + /** |
|
| 145 | + * Print a root lineage node |
|
| 146 | + * @param LineageRootNode $node |
|
| 147 | + */ |
|
| 148 | + private function printRootLineage(LineageRootNode $node) { |
|
| 149 | + print '<div class="patrolin_tree">'; |
|
| 150 | + if($node->getIndividual() === null) { |
|
| 151 | + $fam_nodes = $node->getFamiliesNodes(); |
|
| 152 | + foreach($fam_nodes as $fam){ |
|
| 153 | + foreach($fam_nodes[$fam] as $child_node) { |
|
| 154 | + if($child_node) { |
|
| 155 | + $this->printLineage($child_node); |
|
| 156 | + } |
|
| 157 | + } |
|
| 158 | + } |
|
| 159 | + } |
|
| 160 | + else { |
|
| 161 | + $this->printLineage($node); |
|
| 162 | + } |
|
| 163 | + echo '</div>'; |
|
| 164 | 164 | |
| 165 | - $places = $node->getPlaces(); |
|
| 166 | - if($places && count($places)>0){ |
|
| 167 | - echo '<div class="patrolin_places">'; |
|
| 168 | - echo \MyArtJaub\Webtrees\Functions\FunctionsPrint::htmlPlacesCloud($places, false, $this->data->get('tree')); |
|
| 169 | - echo '</div>'; |
|
| 170 | - } |
|
| 171 | - } |
|
| 165 | + $places = $node->getPlaces(); |
|
| 166 | + if($places && count($places)>0){ |
|
| 167 | + echo '<div class="patrolin_places">'; |
|
| 168 | + echo \MyArtJaub\Webtrees\Functions\FunctionsPrint::htmlPlacesCloud($places, false, $this->data->get('tree')); |
|
| 169 | + echo '</div>'; |
|
| 170 | + } |
|
| 171 | + } |
|
| 172 | 172 | |
| 173 | - /** |
|
| 174 | - * Print a lineage node, recursively. |
|
| 175 | - * @param LineageNode $node |
|
| 176 | - */ |
|
| 177 | - private function printLineage(LineageNode $node) { |
|
| 173 | + /** |
|
| 174 | + * Print a lineage node, recursively. |
|
| 175 | + * @param LineageNode $node |
|
| 176 | + */ |
|
| 177 | + private function printLineage(LineageNode $node) { |
|
| 178 | 178 | |
| 179 | - echo '<ul>'; |
|
| 180 | - $fam_nodes = $node->getFamiliesNodes(); |
|
| 181 | - if(count($fam_nodes) > 0) { |
|
| 182 | - $is_first_family = true; |
|
| 183 | - foreach($fam_nodes as $fam) { |
|
| 184 | - $node_indi = $node->getIndividual(); |
|
| 185 | - echo '<li>'; |
|
| 186 | - if($is_first_family){ |
|
| 187 | - echo FunctionsPrint::htmlIndividualForList($node_indi); |
|
| 188 | - } |
|
| 179 | + echo '<ul>'; |
|
| 180 | + $fam_nodes = $node->getFamiliesNodes(); |
|
| 181 | + if(count($fam_nodes) > 0) { |
|
| 182 | + $is_first_family = true; |
|
| 183 | + foreach($fam_nodes as $fam) { |
|
| 184 | + $node_indi = $node->getIndividual(); |
|
| 185 | + echo '<li>'; |
|
| 186 | + if($is_first_family){ |
|
| 187 | + echo FunctionsPrint::htmlIndividualForList($node_indi); |
|
| 188 | + } |
|
| 189 | 189 | else{ |
| 190 | 190 | echo FunctionsPrint::htmlIndividualForList($node_indi, false); |
| 191 | 191 | } |
@@ -204,32 +204,32 @@ discard block |
||
| 204 | 204 | echo '<span class="details1" title="'.$marrdate.'"><i class="icon-rings"></i>'.$marryear.'</span></a> '; |
| 205 | 205 | echo FunctionsPrint::htmlIndividualForList($spouse); |
| 206 | 206 | } |
| 207 | - foreach($fam_nodes[$fam] as $child_node) { |
|
| 208 | - if($child_node) { |
|
| 209 | - $this->printLineage($child_node); |
|
| 210 | - } |
|
| 211 | - else { |
|
| 212 | - echo '<ul><li><strong>…</strong></li></ul>'; |
|
| 213 | - } |
|
| 214 | - } |
|
| 215 | - $is_first_family = false; |
|
| 216 | - } |
|
| 217 | - } |
|
| 218 | - else { |
|
| 219 | - echo '<li>'; |
|
| 220 | - echo \MyArtJaub\Webtrees\Functions\FunctionsPrint::htmlIndividualForList($node->getIndividual()); |
|
| 221 | - if($node->hasFollowUpSurname()) { |
|
| 222 | - $url_base = WT_SCRIPT_NAME . '?mod=' . \MyArtJaub\Webtrees\Constants::MODULE_MAJ_PATROLIN_NAME . '&mod_action=Lineage'; |
|
| 223 | - echo ' '. |
|
| 224 | - '<a href="' . $url_base . '&surname=' . rawurlencode($node->getFollowUpSurname()) . '&ged=' . $this->data->get('tree')->getNameUrl() . '">'. |
|
| 225 | - '('.I18N::translate('Go to %s lineages', $node->getFollowUpSurname()).')'. |
|
| 226 | - '</a>'; |
|
| 227 | - } |
|
| 228 | - echo '</li>'; |
|
| 229 | - } |
|
| 230 | - echo '</ul>'; |
|
| 207 | + foreach($fam_nodes[$fam] as $child_node) { |
|
| 208 | + if($child_node) { |
|
| 209 | + $this->printLineage($child_node); |
|
| 210 | + } |
|
| 211 | + else { |
|
| 212 | + echo '<ul><li><strong>…</strong></li></ul>'; |
|
| 213 | + } |
|
| 214 | + } |
|
| 215 | + $is_first_family = false; |
|
| 216 | + } |
|
| 217 | + } |
|
| 218 | + else { |
|
| 219 | + echo '<li>'; |
|
| 220 | + echo \MyArtJaub\Webtrees\Functions\FunctionsPrint::htmlIndividualForList($node->getIndividual()); |
|
| 221 | + if($node->hasFollowUpSurname()) { |
|
| 222 | + $url_base = WT_SCRIPT_NAME . '?mod=' . \MyArtJaub\Webtrees\Constants::MODULE_MAJ_PATROLIN_NAME . '&mod_action=Lineage'; |
|
| 223 | + echo ' '. |
|
| 224 | + '<a href="' . $url_base . '&surname=' . rawurlencode($node->getFollowUpSurname()) . '&ged=' . $this->data->get('tree')->getNameUrl() . '">'. |
|
| 225 | + '('.I18N::translate('Go to %s lineages', $node->getFollowUpSurname()).')'. |
|
| 226 | + '</a>'; |
|
| 227 | + } |
|
| 228 | + echo '</li>'; |
|
| 229 | + } |
|
| 230 | + echo '</ul>'; |
|
| 231 | 231 | |
| 232 | - } |
|
| 232 | + } |
|
| 233 | 233 | |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | \ No newline at end of file |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | /** @var \Fisharebest\Webtrees\Tree $tree */ |
| 37 | 37 | $tree = $this->data->get('tree'); |
| 38 | 38 | |
| 39 | - echo '<h2 class="center">', $this->data->get('title') , '</h2>'; |
|
| 39 | + echo '<h2 class="center">', $this->data->get('title'), '</h2>'; |
|
| 40 | 40 | echo '<p class="center alpha_index">', implode(' | ', $this->getInitialLettersList()), '</p>'; |
| 41 | 41 | |
| 42 | - if($this->data->get('issurnames', false)) { |
|
| 42 | + if ($this->data->get('issurnames', false)) { |
|
| 43 | 43 | $surns = $this->data->get('surnameslist', array()); |
| 44 | - $extra_params = array ('mod' => Constants::MODULE_MAJ_PATROLIN_NAME, 'mod_action' => 'Lineage'); |
|
| 44 | + $extra_params = array('mod' => Constants::MODULE_MAJ_PATROLIN_NAME, 'mod_action' => 'Lineage'); |
|
| 45 | 45 | // Show the surname list |
| 46 | 46 | switch ($tree->getPreference('SURNAME_LIST_STYLE')) { |
| 47 | 47 | case 'style1': |
@@ -59,16 +59,16 @@ discard block |
||
| 59 | 59 | else if ($this->data->get('islineages', false)) { |
| 60 | 60 | //Link to indilist |
| 61 | 61 | echo '<p class="center"><strong>'. |
| 62 | - '<a href="indilist.php?ged=' . $tree->getNameUrl() . '&surname=' . rawurlencode($this->data->get('surname')) .'">'. |
|
| 62 | + '<a href="indilist.php?ged='.$tree->getNameUrl().'&surname='.rawurlencode($this->data->get('surname')).'">'. |
|
| 63 | 63 | I18N::translate('Go to the list of individuals with surname %s', $this->data->get('legend')). |
| 64 | 64 | '</a></strong></p>'; |
| 65 | 65 | |
| 66 | 66 | $lineages = $this->data->get('lineages', null); |
| 67 | 67 | $nb_lineages = is_null($lineages) ? 0 : count($lineages); |
| 68 | - if($nb_lineages == 0) { |
|
| 68 | + if ($nb_lineages == 0) { |
|
| 69 | 69 | echo '<p class="center"><span class="warning">', |
| 70 | 70 | I18N::translate('No individuals with surname %s has been found. Please try another name.', |
| 71 | - '<span dir="auto">' . $this->data->get('legend') . '</span>'), |
|
| 71 | + '<span dir="auto">'.$this->data->get('legend').'</span>'), |
|
| 72 | 72 | '</span></p>'; |
| 73 | 73 | } else { |
| 74 | 74 | |
@@ -79,9 +79,9 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | echo '<div class="list_value_wrap">'; |
| 81 | 81 | |
| 82 | - foreach($lineages as $i => $lineage) { |
|
| 82 | + foreach ($lineages as $i => $lineage) { |
|
| 83 | 83 | $this->printRootLineage($lineage); |
| 84 | - if($i < $nb_lineages - 1) echo '<hr />'; |
|
| 84 | + if ($i < $nb_lineages - 1) echo '<hr />'; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | echo '</div>'; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $list = array(); |
| 105 | 105 | /** @var \Fisharebest\Webtrees\Tree $tree */ |
| 106 | 106 | $tree = $this->data->get('tree'); |
| 107 | - $script_base_url = WT_SCRIPT_NAME . '?mod=' . \MyArtJaub\Webtrees\Constants::MODULE_MAJ_PATROLIN_NAME . '&mod_action=Lineage'; |
|
| 107 | + $script_base_url = WT_SCRIPT_NAME.'?mod='.\MyArtJaub\Webtrees\Constants::MODULE_MAJ_PATROLIN_NAME.'&mod_action=Lineage'; |
|
| 108 | 108 | |
| 109 | 109 | foreach (QueryName::surnameAlpha($tree, false, false) as $letter => $count) { |
| 110 | 110 | switch ($letter) { |
@@ -120,9 +120,9 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | if ($count) { |
| 122 | 122 | if ($letter == $this->data->get('alpha')) { |
| 123 | - $list[] = '<a href="' . $script_base_url . '&alpha=' . rawurlencode($letter) . '&ged=' . $tree->getNameUrl() . '" class="warning" title="' . I18N::number($count) . '">' . $html . '</a>'; |
|
| 123 | + $list[] = '<a href="'.$script_base_url.'&alpha='.rawurlencode($letter).'&ged='.$tree->getNameUrl().'" class="warning" title="'.I18N::number($count).'">'.$html.'</a>'; |
|
| 124 | 124 | } else { |
| 125 | - $list[] = '<a href="' . $script_base_url . '&alpha=' . rawurlencode($letter) . '&ged=' . $tree->getNameUrl() . '" title="' . I18N::number($count) . '">' . $html . '</a>'; |
|
| 125 | + $list[] = '<a href="'.$script_base_url.'&alpha='.rawurlencode($letter).'&ged='.$tree->getNameUrl().'" title="'.I18N::number($count).'">'.$html.'</a>'; |
|
| 126 | 126 | } |
| 127 | 127 | } else { |
| 128 | 128 | $list[] = $html; |
@@ -132,9 +132,9 @@ discard block |
||
| 132 | 132 | // Search spiders don't get the "show all" option as the other links give them everything. |
| 133 | 133 | if (!Auth::isSearchEngine()) { |
| 134 | 134 | if ($this->data->get('show_all') === 'yes') { |
| 135 | - $list[] = '<span class="warning">' . I18N::translate('All') . '</span>'; |
|
| 135 | + $list[] = '<span class="warning">'.I18N::translate('All').'</span>'; |
|
| 136 | 136 | } else { |
| 137 | - $list[] = '<a href="' . $script_base_url . '&show_all=yes' . '&ged=' . $tree->getNameUrl() . '">' . I18N::translate('All') . '</a>'; |
|
| 137 | + $list[] = '<a href="'.$script_base_url.'&show_all=yes'.'&ged='.$tree->getNameUrl().'">'.I18N::translate('All').'</a>'; |
|
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | |
@@ -147,11 +147,11 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | private function printRootLineage(LineageRootNode $node) { |
| 149 | 149 | print '<div class="patrolin_tree">'; |
| 150 | - if($node->getIndividual() === null) { |
|
| 150 | + if ($node->getIndividual() === null) { |
|
| 151 | 151 | $fam_nodes = $node->getFamiliesNodes(); |
| 152 | - foreach($fam_nodes as $fam){ |
|
| 153 | - foreach($fam_nodes[$fam] as $child_node) { |
|
| 154 | - if($child_node) { |
|
| 152 | + foreach ($fam_nodes as $fam) { |
|
| 153 | + foreach ($fam_nodes[$fam] as $child_node) { |
|
| 154 | + if ($child_node) { |
|
| 155 | 155 | $this->printLineage($child_node); |
| 156 | 156 | } |
| 157 | 157 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | echo '</div>'; |
| 164 | 164 | |
| 165 | 165 | $places = $node->getPlaces(); |
| 166 | - if($places && count($places)>0){ |
|
| 166 | + if ($places && count($places) > 0) { |
|
| 167 | 167 | echo '<div class="patrolin_places">'; |
| 168 | 168 | echo \MyArtJaub\Webtrees\Functions\FunctionsPrint::htmlPlacesCloud($places, false, $this->data->get('tree')); |
| 169 | 169 | echo '</div>'; |
@@ -178,34 +178,34 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | echo '<ul>'; |
| 180 | 180 | $fam_nodes = $node->getFamiliesNodes(); |
| 181 | - if(count($fam_nodes) > 0) { |
|
| 181 | + if (count($fam_nodes) > 0) { |
|
| 182 | 182 | $is_first_family = true; |
| 183 | - foreach($fam_nodes as $fam) { |
|
| 183 | + foreach ($fam_nodes as $fam) { |
|
| 184 | 184 | $node_indi = $node->getIndividual(); |
| 185 | 185 | echo '<li>'; |
| 186 | - if($is_first_family){ |
|
| 186 | + if ($is_first_family) { |
|
| 187 | 187 | echo FunctionsPrint::htmlIndividualForList($node_indi); |
| 188 | 188 | } |
| 189 | - else{ |
|
| 189 | + else { |
|
| 190 | 190 | echo FunctionsPrint::htmlIndividualForList($node_indi, false); |
| 191 | 191 | } |
| 192 | 192 | //Get individual's spouse |
| 193 | 193 | $dfam = new Family($fam); |
| 194 | - $spouse=$dfam->getSpouseById($node_indi); |
|
| 194 | + $spouse = $dfam->getSpouseById($node_indi); |
|
| 195 | 195 | //Print the spouse if relevant |
| 196 | - if($spouse){ |
|
| 196 | + if ($spouse) { |
|
| 197 | 197 | $marrdate = I18N::translate('yes'); |
| 198 | 198 | $marryear = ''; |
| 199 | 199 | echo ' <a href="'.$fam->getHtmlUrl().'">'; |
| 200 | - if ($fam->getMarriageYear()){ |
|
| 200 | + if ($fam->getMarriageYear()) { |
|
| 201 | 201 | $marrdate = strip_tags($fam->getMarriageDate()->Display()); |
| 202 | 202 | $marryear = $fam->getMarriageYear(); |
| 203 | 203 | } |
| 204 | 204 | echo '<span class="details1" title="'.$marrdate.'"><i class="icon-rings"></i>'.$marryear.'</span></a> '; |
| 205 | 205 | echo FunctionsPrint::htmlIndividualForList($spouse); |
| 206 | 206 | } |
| 207 | - foreach($fam_nodes[$fam] as $child_node) { |
|
| 208 | - if($child_node) { |
|
| 207 | + foreach ($fam_nodes[$fam] as $child_node) { |
|
| 208 | + if ($child_node) { |
|
| 209 | 209 | $this->printLineage($child_node); |
| 210 | 210 | } |
| 211 | 211 | else { |
@@ -218,10 +218,10 @@ discard block |
||
| 218 | 218 | else { |
| 219 | 219 | echo '<li>'; |
| 220 | 220 | echo \MyArtJaub\Webtrees\Functions\FunctionsPrint::htmlIndividualForList($node->getIndividual()); |
| 221 | - if($node->hasFollowUpSurname()) { |
|
| 222 | - $url_base = WT_SCRIPT_NAME . '?mod=' . \MyArtJaub\Webtrees\Constants::MODULE_MAJ_PATROLIN_NAME . '&mod_action=Lineage'; |
|
| 221 | + if ($node->hasFollowUpSurname()) { |
|
| 222 | + $url_base = WT_SCRIPT_NAME.'?mod='.\MyArtJaub\Webtrees\Constants::MODULE_MAJ_PATROLIN_NAME.'&mod_action=Lineage'; |
|
| 223 | 223 | echo ' '. |
| 224 | - '<a href="' . $url_base . '&surname=' . rawurlencode($node->getFollowUpSurname()) . '&ged=' . $this->data->get('tree')->getNameUrl() . '">'. |
|
| 224 | + '<a href="'.$url_base.'&surname='.rawurlencode($node->getFollowUpSurname()).'&ged='.$this->data->get('tree')->getNameUrl().'">'. |
|
| 225 | 225 | '('.I18N::translate('Go to %s lineages', $node->getFollowUpSurname()).')'. |
| 226 | 226 | '</a>'; |
| 227 | 227 | } |