Skip to content

Commit

Permalink
add structure
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisLambrechts committed Jan 27, 2025
1 parent 3170334 commit 7572c76
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions themes/base/view/omeka/site/item/show.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ endif;
?>
</div>
<?php endif; ?>

<?php if(!$item->value('alamire:creator_display') && $type == "Composition"):?>
<h4 class="has-text-weight-semibold is-6 section-head" style="margin-top:1rem;">Identification</h4>
<?php endif;?>
<?php echo $item->displayValues(); ?>
</div>
<?php if($type == "Chant"):?>
Expand Down Expand Up @@ -387,14 +389,46 @@ endif;
<?php if($comp):?>
<tr>
<td><?php echo $comp->value("alamire:creator");?></td>
<td><a href="<?php echo $comp->url();?>"><?php echo $comp->value("alamire:title");?></a></td>
<td>
<a href="<?php echo $comp->url();?>"><?php echo $comp->value("alamire:title");?></a>

</td>
<?php
$ints = $comp->value("alamire:interstitialInfo");
$expl = explode('$$',$ints.'');
$fol = isset($expl[1]) ? trim($expl[1]) : "";
?>
<td><?= $fol; ?></td>
</tr>
<?php
//children?
if($comp->value("alamire:structure")):
$structure = explode(";",$comp->value("alamire:structure"));
//remove own id
array_pop($structure);
foreach($structure as $struc):
$query = "";
//local 377, prod 378
parse_str("property[0][joiner]=and&property[0][property]=alamire:identifier&property[0][type]=eq&property[0][text]=".$struc."&resource_class_id[]=&item_set_id[]=&site_id=&owner_id&sort_order=asc&submit=Search",$query);
$child = $this->api()->search('items',$query);
$child = $child->getContent();
if($child):?>
<tr>
<td><?php echo $child[0]->value("alamire:creator");?></td>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php echo $child[0]->url();?>"><?php echo $child[0]->value("alamire:title");?></a>
</td>
<?php
$ints = $child[0]->value("alamire:interstitialInfo");
$expl = explode('$$',$ints.'');
$fol = isset($expl[1]) ? trim($expl[1]) : "";
?>
<td><?= $fol; ?></td>
</tr>
<?php endif;
endforeach;
endif;
?>
<?php endif;?>
<?php endforeach;?>
</table>
Expand Down

0 comments on commit 7572c76

Please sign in to comment.