diff --git a/docroot/sites/all/modules/contrib/entity/includes/entity.controller.inc b/docroot/sites/all/modules/contrib/entity/includes/entity.controller.inc
index c9023c7..a0c19e2 100644
--- a/docroot/sites/all/modules/contrib/entity/includes/entity.controller.inc
+++ b/docroot/sites/all/modules/contrib/entity/includes/entity.controller.inc
@@ -667,6 +667,19 @@ class EntityAPIController extends DrupalDefaultEntityController implements Entit
         '#language' => $langcode,
         '#page' => $page,
       );
+
+      // Add in contextual links, but only if we are not at the entity's page as
+      // tabs are usually available there.
+      if (!$page && isset($this->entityInfo['admin ui']['path'])) {
+        $key = isset($entity->{$this->idKey}) ? $entity->{$this->idKey} : NULL;
+        $build['#contextual_links'] = array(
+          'fragment' => array(
+            $this->entityInfo['admin ui']['path'] . '/manage',
+            array($key),
+          ),
+        );
+      }
+
       // Allow modules to modify the structured entity.
       drupal_alter(array($this->entityType . '_view', 'entity_view'), $build, $this->entityType);
       $key = isset($entity->{$this->idKey}) ? $entity->{$this->idKey} : NULL;
diff --git a/docroot/sites/all/modules/contrib/entity/includes/entity.ui.inc b/docroot/sites/all/modules/contrib/entity/includes/entity.ui.inc
index 0c897ad..a021dab 100644
--- a/docroot/sites/all/modules/contrib/entity/includes/entity.ui.inc
+++ b/docroot/sites/all/modules/contrib/entity/includes/entity.ui.inc
@@ -76,6 +76,7 @@ class EntityDefaultUIController {
       'title' => 'Edit',
       'load arguments' => array($this->entityType),
       'type' => MENU_DEFAULT_LOCAL_TASK,
+      'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE
     );
 
     // Clone form, a special case for the edit form.
diff --git a/docroot/sites/all/modules/contrib/entity/theme/entity.tpl.php b/docroot/sites/all/modules/contrib/entity/theme/entity.tpl.php
index cfe94dd..c07265e 100644
--- a/docroot/sites/all/modules/contrib/entity/theme/entity.tpl.php
+++ b/docroot/sites/all/modules/contrib/entity/theme/entity.tpl.php
@@ -18,6 +18,12 @@
  *   the parts enclosed by {} are replaced by the appropriate values:
  *   - entity-{ENTITY_TYPE}
  *   - {ENTITY_TYPE}-{BUNDLE}
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
  *
  * Other variables:
  * - $classes_array: Array of html class attribute values. It is flattened
@@ -31,6 +37,7 @@
 <div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
 
   <?php if (!$page): ?>
+    <?php print render($title_prefix); ?>
     <h2<?php print $title_attributes; ?>>
       <?php if ($url): ?>
         <a href="<?php print $url; ?>"><?php print $title; ?></a>
@@ -38,6 +45,7 @@
         <?php print $title; ?>
       <?php endif; ?>
     </h2>
+    <?php print render($title_suffix); ?>
   <?php endif; ?>
 
   <div class="content"<?php print $content_attributes; ?>>
