/** * */ public function deleteAnnotation() { $vn_annotation_id = $this->request->getParameter('annotation_id', pInteger); $va_response = array('code' => 0, 'id' => $vn_annotation_id, errors => array()); $t_annotation = new ca_representation_annotations(); if ($t_annotation->load($vn_annotation_id)) { $t_annotation->setMode(ACCESS_WRITE); $t_annotation->delete(true); if ($t_annotation->numErrors()) { $va_response = array('code' => 10, 'id' => $vn_annotation_id, 'errors' => $t_annotation->getErrors()); } } else { $va_response = array('code' => 10, 'errors' => array(_t('Invalid annotation_id'))); } $this->view->setVar('response', $va_response); return $this->render('ajax_representation_annotation_delete_json.php'); }
<div class='col-sm-12 col-md-6 col-lg-6'> {{{<ifdef code="ca_objects.pbcoreFormatLocation"><H3>Location:</H3>^ca_objects.pbcoreFormatLocation<br/></ifdef>}}} {{{<ifdef code="ca_objects.idno"><H3>Identifier:</H3>^ca_objects.idno<br/></ifdef>}}} {{{<h3>MLA Citation:</h3><i>^ca_objects.preferred_labels.name</i>. <ifdef code="ca_objects.dateSet.setDisplayValue"><unit>^ca_objects.dateSet.setDisplayValue</unit>. </ifdef><ifcount code="ca_collections" min="1" max="1"><unit>^ca_collections.hierarchy.preferred_labels.name</unit>. </ifcount><i>New School Archives and Special Collections Digital Archive</i>. Web. ^DATE}}} <?php if (sizeof($va_audios > 1)) { foreach ($va_audios as $va_audio) { print "<H3>Additional Audio</H3>"; print caDetailLink($this->request, '<span class="glyphicon glyphicon-volume-up"></span> ' . $va_audio["label"], '', 'ca_objects', $t_object->get("object_id"), array("representation_id" => $va_audio["representation_id"])) . "<br/>"; } } if (sizeof($va_annotations)) { print "<H3>Clips</H3>"; $t_annotation = new ca_representation_annotations(); foreach ($va_annotations as $va_annotation) { $t_annotation->load($va_annotation["annotation_id"]); $va_labels = caExtractValuesByUserLocale($va_annotation["labels"]); print "<p>"; foreach ($va_labels as $vs_label) { print "<a href='#' onclick='caAnnoEditorPlayerPlay(" . $va_annotation["startTimecode_raw"] . "); return false;'><strong>" . $vs_label . "</strong></a><br/>"; } print "<a href='#' onclick='caAnnoEditorPlayerPlay(" . $va_annotation["startTimecode_raw"] . "); return false;'><span class='glyphicon glyphicon-play-circle'></span></a> " . $va_annotation["startTimecode"] . " - " . $va_annotation["endTimecode"]; print "<div class='indent'>"; if ($t_annotation->get("description")) { print "<p>" . $t_annotation->get("description") . "</p>"; } if ($t_annotation->get("ca_entities.preferred_labels")) { print "<strong class='uppercase'>" . _t("Related people/organizations") . "</strong><br/>" . $t_annotation->get("ca_entities.preferred_labels", array("delimiter" => ", ", "returnAsLink" => true)); } print "</div></p>"; }