| @@ 130-153 (lines=24) @@ | ||
| 127 | ||
| 128 | ///// HUSB ///// |
|
| 129 | $found = false; |
|
| 130 | foreach ($family->getFacts('HUSB', false, $access_level) as $fact) { |
|
| 131 | $found |= !$fact->isPendingDeletion(); |
|
| 132 | $person = $fact->getTarget(); |
|
| 133 | if ($person instanceof Individual) { |
|
| 134 | $row_class = 'wt-gender-' . $person->getSex(); |
|
| 135 | if ($fact->isPendingAddition()) { |
|
| 136 | $row_class .= ' new'; |
|
| 137 | } elseif ($fact->isPendingDeletion()) { |
|
| 138 | $row_class .= ' old'; |
|
| 139 | } |
|
| 140 | $icon = $controller->record === $person ? '<i class="icon-selected"></i>' : ''; |
|
| 141 | ?> |
|
| 142 | <tr class="<?= $row_class ?>"> |
|
| 143 | <th scope="row"> |
|
| 144 | <?= $icon ?> |
|
| 145 | <?= Functions::getCloseRelationshipName($controller->record, $person) ?> |
|
| 146 | </th> |
|
| 147 | <td class="border-0 p-0"> |
|
| 148 | <?= Theme::theme()->individualBoxLarge($person) ?> |
|
| 149 | </td> |
|
| 150 | </tr> |
|
| 151 | <?php |
|
| 152 | } |
|
| 153 | } |
|
| 154 | if (!$found && $family->canEdit()) { |
|
| 155 | ?> |
|
| 156 | <tr> |
|
| @@ 169-192 (lines=24) @@ | ||
| 166 | ||
| 167 | ///// WIFE ///// |
|
| 168 | $found = false; |
|
| 169 | foreach ($family->getFacts('WIFE', false, $access_level) as $fact) { |
|
| 170 | $person = $fact->getTarget(); |
|
| 171 | if ($person instanceof Individual) { |
|
| 172 | $found |= !$fact->isPendingDeletion(); |
|
| 173 | $row_class = 'wt-gender-' . $person->getSex(); |
|
| 174 | if ($fact->isPendingAddition()) { |
|
| 175 | $row_class .= ' new'; |
|
| 176 | } elseif ($fact->isPendingDeletion()) { |
|
| 177 | $row_class .= ' old'; |
|
| 178 | } |
|
| 179 | $icon = $controller->record === $person ? '<i class="icon-selected"></i>' : ''; |
|
| 180 | ?> |
|
| 181 | <tr class="<?= $row_class ?>"> |
|
| 182 | <th scope="row"> |
|
| 183 | <?= $icon ?> |
|
| 184 | <?= Functions::getCloseRelationshipName($controller->record, $person) ?> |
|
| 185 | </th> |
|
| 186 | <td class="border-0 p-0"> |
|
| 187 | <?= Theme::theme()->individualBoxLarge($person) ?> |
|
| 188 | </td> |
|
| 189 | </tr> |
|
| 190 | <?php |
|
| 191 | } |
|
| 192 | } |
|
| 193 | if (!$found && $family->canEdit()) { |
|
| 194 | ?> |
|
| 195 | <tr> |
|