From b72dadbfeea73f9c040b6d0d00c557b608a0482d Mon Sep 17 00:00:00 2001 From: Martin Cording Date: Tue, 15 Dec 2015 16:04:06 +0100 Subject: [PATCH] easyDDB changes to module: ting_relation --- modules/ting_relation/includes/ting_relation.field.inc | 5 ++++- modules/ting_relation/templates/ting-relation.tpl.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/ting_relation/includes/ting_relation.field.inc b/modules/ting_relation/includes/ting_relation.field.inc index d1a6848cc5..effef01237 100644 --- a/modules/ting_relation/includes/ting_relation.field.inc +++ b/modules/ting_relation/includes/ting_relation.field.inc @@ -213,7 +213,7 @@ function ting_relation_get_abstract($relation) { break; } - return empty($abstract) ? FALSE : $abstract; + return empty($abstract) ? FALSE : strip_tags($abstract); } /** @@ -228,6 +228,7 @@ function ting_relation_get_abstract($relation) { function ting_relation_get_online_url($relation) { $url = FALSE; $title = ''; + $external = 'target="_blank"'; switch ($relation->type) { case 'dbcaddi:hasReview': case 'dbcaddi:hasSubjectDescription': @@ -237,6 +238,7 @@ function ting_relation_get_online_url($relation) { if (in_array(strtolower($relation->object->getAc_source()), $reservable_sources)) { $title = t('Read more about the material'); $url = '/ting/object/' . $relation->object->id; + $external = ''; } else { $title = t('Read more at %source', array('%source' => $relation->object->getAc_source())); @@ -276,6 +278,7 @@ function ting_relation_get_online_url($relation) { return array( 'url' => $url, 'title' => $title, + 'external' => $external, ); } diff --git a/modules/ting_relation/templates/ting-relation.tpl.php b/modules/ting_relation/templates/ting-relation.tpl.php index a5c34540dd..657846c8f0 100644 --- a/modules/ting_relation/templates/ting-relation.tpl.php +++ b/modules/ting_relation/templates/ting-relation.tpl.php @@ -7,7 +7,7 @@ * - $title: Relation title string. * - $abstract: Short description of the relation (from the entities * description field or abstract field). - * - $online: Array with title and url to more information online. + * - $online: Array with title, url, external to more information online. * - $fulltext_link: Link to docbook format inserted by ting_fulltext module. */ ?>