For some reason the view embedding on My Workbench doesn't provide the contextual links that usually go along with Views. Here's a feature request to change that.

Files: 
CommentFileSizeAuthor
#5 workbench-contextual_links-1287166-5.patch2.01 KBdrupalmonkey
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]
#3 workbench-contextual_links-1287166-3.patch1.96 KBdrupalmonkey
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

Comments

robeano’s picture

Assigned:Unassigned» stevector
Category:feature» task
Priority:Normal» Minor

Yep, both views are missing the context menu. This needs to be fixed. Lowering priority and assigning to stevector to work on this when he has some time.

agentrickard’s picture

Category:task» bug

I suspect this is the culprit.

<?php
 
// Transform the Views into markup.
  // @see views_embed_view()
 
foreach (element_children($output) as $key) {
    if (isset(
$output[$key]['#view']) && $view = views_get_view($output[$key]['#view'])) {
     
$output[$key] += array('#markup' => '', '#view_display' => 'default');
     
$display_id = $output[$key]['#view_display'];
      if (
$view->access($display_id)) {
       
$output[$key]['#markup'] .= $view->preview($display_id, array());
        if (
$title = $view->get_title()) {
         
$output[$key]['#title'] = $title;
        }
      }
     
$view->destroy();
    }
  }
?>

views_embed_view() doesn't include the contextual links.

drupalmonkey’s picture

Status:Active» Needs review
StatusFileSize
new1.96 KB
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

Got the contextual links to work, please test!

agentrickard’s picture

Status:Needs review» Needs work

This would all need to be wrapped in an if (module_exists('contextual')) { call, wouldn't it?

drupalmonkey’s picture

Status:Needs work» Needs review
StatusFileSize
new2.01 KB
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

You are quite correct, agentrickard!

Rerolled patch with the module check.

Please test with core Contextual Links module enabled and disabled.

agentrickard’s picture

Status:Needs review» Fixed

Committed!

8969ed2..b26284b

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.