From a9c437fc1a301d004071c105910124daabf53599 Mon Sep 17 00:00:00 2001 From: pjohans Date: Tue, 18 Aug 2015 13:55:03 +0200 Subject: [PATCH 1/2] Issue 774 by Pjohans: Handle creators and materialtype in preprocess function --- ding_base.module | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ding_base.module b/ding_base.module index c3b442e..a133aed 100644 --- a/ding_base.module +++ b/ding_base.module @@ -371,6 +371,14 @@ function ding_base_preprocess_material_item(&$variables) { // Render the checkbox. $variables['checkbox'] = drupal_render($element[$element['#id']]); + // Get the creator, materialtype, title and cover + if (isset($element['#creators'])) { + $variables['creators'] = $element['#creators']; + } + if (isset($element['#material_type'])) { + $variables['material_type'] = $element['#material_type']; + } + // Get the title and cover. $variables['title'] = $element['#title']; $variables['cover'] = drupal_render($element['#cover']); From da7c894e8e1ab15d853edb3e1eef2f7624b71356 Mon Sep 17 00:00:00 2001 From: pjohans Date: Tue, 18 Aug 2015 13:55:33 +0200 Subject: [PATCH 2/2] Issue 774 by Pjohans: Show creator and materialtype on loans-list --- templates/material_item.tpl.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/templates/material_item.tpl.php b/templates/material_item.tpl.php index 0a90d35..4b6a2ab 100644 --- a/templates/material_item.tpl.php +++ b/templates/material_item.tpl.php @@ -8,17 +8,25 @@
+ +

+
-

+ +

+ +

-
+
    -
  • +
  • -
    :
    +