minor bugfix to contextual block
This commit is contained in:
		@ -20,7 +20,6 @@ function opencase_block_access(\Drupal\block\Entity\Block $block, $operation, \D
 | 
			
		||||
    $routes_where_it_should_be_shown = [
 | 
			
		||||
      'entity.oc_actor.canonical',
 | 
			
		||||
      'entity.oc_actor.edit_form',
 | 
			
		||||
      'entity.oc_actor.add_form',
 | 
			
		||||
      'view.cases.page_1',
 | 
			
		||||
      'entity.oc_case.canonical',
 | 
			
		||||
      'entity.oc_case.edit_form',
 | 
			
		||||
 | 
			
		||||
@ -125,8 +125,7 @@ class ContextualMenu extends BlockBase {
 | 
			
		||||
    $link = Link::fromTextAndUrl(t($case->getName() .": Case Details and Files"), $url)->toString();
 | 
			
		||||
    $markup = $this->asNavLinks([$link]);
 | 
			
		||||
    $current_path = \Drupal::service('path.current')->getPath();
 | 
			
		||||
    $query =  ['case_id' => $case_id];
 | 
			
		||||
    return $markup . Utils::generateAddLinks('oc_activity', "Add activity", $query);
 | 
			
		||||
    return $markup . Utils::generateAddLinks('oc_activity', "Add activity", ['case_id' => $case_id, 'destination' => $current_path]);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user