- Copyright 2021 Alexander Ilin-Tomich.
+ Copyright 2022 Alexander Ilin-Tomich.
Content licensed under CC BY 4.0, except for logos. RDF version via SPARQL endpoint. Dataset under doi:10.5281/zenodo.1411391. Source code on GitHub.
diff --git a/PHP/views/personView.php b/PHP/views/personView.php
index 292ca45..e53b227 100644
--- a/PHP/views/personView.php
+++ b/PHP/views/personView.php
@@ -12,11 +12,9 @@
* ['persons_id', 'title', 'gender', 'title_string', 'personal_name', 'dating', 'dating_note', 'region', 'region_note', 'note']
*/
-class personView extends View
-{
+class personView extends View {
- public function echoRender(&$data)
- {
+ public function echoRender(&$data) {
$placesMV = new placesMicroView();
$personMV = new personsMicroView();
$attView = new attestationsMicroView();
@@ -29,43 +27,43 @@ public function echoRender(&$data)
Name |
= $this->renderGender($data->get('gender')) ?> |
- = (empty($data->get('title_string')) ? null : '' . $data->get('title_string') . ' | ') ?>
+ = (empty($data->get('title_string')) ? null : '' . $data->get('title_string') . ' | ') ?>
= $data->get('personal_name') ?> |
- descriptionElement('Date', $data->get('dating'), $data->get('dating_note'), 'period'),
- $this->descriptionElement('Origin', $placesMV->render($data->get('region')), $data->get('region_note'), 'place'),
- $this->descriptionElement('Note', $data->get('note'), null, 'note'),
- $this->descriptionElement('Bibliography', $this->renderBiblio($data->get('bibliography')));
- ?>
-
get('bonds')->count > 0) {
- echo '
Bonds
';
- echo $this->renderBonds($data->get('bonds')->data, $personMV);
- }
- $objAtt = $data->get('attestations');
+ descriptionElement('Date', $data->get('dating'), $data->get('dating_note'), 'period'),
+ $this->descriptionElement('Origin', $placesMV->render($data->get('region')), $data->get('region_note'), 'place'),
+ $this->descriptionElement('Note', $data->get('note'), null, 'note'),
+ $this->descriptionElement('Bibliography', $this->renderBiblio($data->get('bibliography')));
?>
+ get('bonds')->count > 0) {
+ echo '
Bonds
';
+ echo $this->renderBonds($data->get('bonds')->data, $personMV);
+ }
+ $objAtt = $data->get('attestations');
+ ?>
Attestations
data as $Att) {
- $attView->setInscription($Att['inscriptions_id']);
- echo '',
- $insView->render($this->renderObjectType($Att['object_type']) . ' ' . $Att['title'], $Att['inscriptions_id']), ': ',
- $attView->render($Att['title_string'], $Att['attestations_id'], $Att['personal_name']),
- ' (', $Att['status'], ')
';
- $spellings = $Att['spellings']->getSpellings();
- $titles = $Att['titles']->data;
- echo ' | ';
- if (!empty($titles)) {
- echo 'Title | '; //if the attestation has associated titles, display the title heading
- }
- if (!empty($spellings) & !empty($spellings[0]['spellings'])) {
- echo 'Name | '; //if the attestation has associated titles, display the name heading
- }
- echo '
---|
';
- $attestationRender = [];
- //Render table data
+ foreach ($objAtt->data as $Att) {
+ $attView->setInscription($Att['inscriptions_id']);
+ echo '',
+ $insView->render($this->renderObjectType($Att['object_type']) . ' ' . $Att['title'], $Att['inscriptions_id']), ': ',
+ $attView->render($Att['title_string'], $Att['attestations_id'], $Att['personal_name']),
+ ' (', $Att['status'], ')
';
+ $spellings = $Att['spellings']->getSpellings();
+ $titles = $Att['titles']->data;
+ echo ' | ';
+ if (!empty($titles)) {
+ echo 'Title | '; //if the attestation has associated titles, display the title heading
+ }
+ if (!empty($spellings) & !empty($spellings[0]['spellings'])) {
+ echo 'Name | '; //if the attestation has associated titles, display the name heading
+ }
+ echo '
---|
';
+ $attestationRender = [];
+ //Render table data
$renderGender = '' . $Att['gender'] . '';
$this->pushAttetastionElement($attestationRender, $renderGender, self::genderHead);
@@ -130,19 +128,19 @@ public function echoRender(&$data)
}
echo $this->attestationTable($attestationRender);
-
- if (!empty($Att['reasoning']) || !empty($Att['note'])) {
- echo '';
- echo $this->descriptionElement('Reasoning', $Att['reasoning'], null, 'reasoning'),
- $this->descriptionElement('Note', $Att['note'], null, 'note');
- echo '
';
- }
- if (!empty($Att['bonds']->data)) {
- echo $this->renderBonds($Att['bonds']->data, $attView);
- }
- echo '';
+
+ if (!empty($Att['reasoning']) || !empty($Att['note'])) {
+ echo '';
+ echo $this->descriptionElement('Reasoning', $Att['reasoning'], null, 'reasoning'),
+ $this->descriptionElement('Note', $Att['note'], null, 'note');
+ echo '
';
}
- echo '';
+ if (!empty($Att['bonds']->data)) {
+ echo $this->renderBonds($Att['bonds']->data, $attView);
+ }
+ echo '';
}
+ echo '';
}
-
\ No newline at end of file
+
+}
diff --git a/UpdateDatabaseStructureToV3.sql b/UpdateDatabaseStructureToV3.sql
index 661b871..e732f0a 100644
--- a/UpdateDatabaseStructureToV3.sql
+++ b/UpdateDatabaseStructureToV3.sql
@@ -145,6 +145,11 @@ ALTER TABLE `places` ADD COLUMN `inscriptions_count_temp` INT(11) DEFAULT 0 COMM
OPTIMIZE TABLE `places`;
UPDATE `places` SET inscriptions_count_temp = (SELECT COUNT(DISTINCT (inscriptions.inscriptions_id)) from (objects INNER JOIN objects_inscriptions_xref ON objects.objects_id = objects_inscriptions_xref.objects_id) INNER JOIN inscriptions ON objects_inscriptions_xref.inscriptions_id = inscriptions.inscriptions_id WHERE objects.provenance=places.place_name OR objects.installation_place=places.place_name OR inscriptions.origin=places.place_name OR objects.production_place=places.place_name);
+UPDATE `persons_bonds` SET predicate = "ChildOf" where predicate = "GenericChildOf";
+CALL name_types_temp_calc;
+CALL children_temp_calc;
+CALL siblings_temp_calc;
+CALL spouses_temp_calc;
ALTER TABLE `biblio_refs` ADD KEY `object_id_idx` (`object_id`),
ADD KEY `source_url_idx` (`source_url`),