From 9b1777e6b595f65b22120d8ec9817f64ed1521d2 Mon Sep 17 00:00:00 2001 From: Michael Stenta Date: Mon, 13 Apr 2015 17:03:20 -0400 Subject: [PATCH] Link to the Equipment list in the farm asset breadcrumb. --- farm_equipment.module | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/farm_equipment.module b/farm_equipment.module index 46bbbcf70..a7d8f44d1 100644 --- a/farm_equipment.module +++ b/farm_equipment.module @@ -35,6 +35,20 @@ function farm_equipment_farm_admin_actions() { return $actions; } + +/** + * Implements hook_farm_asset_breadcrumb(). + */ +function farm_equipment_farm_asset_breadcrumb($farm_asset) { + + // If the asset is equipment, add a link to the animals list. + $breadcrumb = array(); + if ($farm_asset->type == 'equipment') { + $breadcrumb[] = l(t('Equipment'), 'farm/equipment'); + } + return $breadcrumb; +} + /** * Implements hook_farm_asset_view_views(). */