Skip to content

Commit

Permalink
Issue #226: Remove "Add new data set" button from dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
lkmorlan committed Nov 23, 2023
1 parent 179a84d commit c2cdb5b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,6 @@ public static function create(ContainerInterface $container, array $configuratio
public function build(): array {
$links = [];

// Button to create a data_set.
$url = Url::fromRoute('node.add', ['node_type' => 'data_set'], ['query' => ['display' => 'section_1']]);
if ($url->access()) {
$links[] = [
'#title' => $this->t('Add new data set'),
'#type' => 'link',
'#url' => $url,
'#attributes' => [
'class' => [
'button',
'button--action',
'button--primary',
],
],
];
}

// Link to saved searches.
$url = Url::fromRoute('view.saved_searches.page', ['user' => $this->currentUser->id()]);
if ($url->access()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,6 @@ public function test(): void {
// Data set dashboard.
$this->drupalGet('dashboard');
$this->assertSession()->statusCodeEquals(200);
// The create-new link exists.
$this->assertSession()->elementExists('xpath', '//a[@href = "/node/add/data_set?display=section_1"][text() = "Add new data set"]');
// View link.
$args = [
':data_set_title' => $data_set_title,
Expand Down

0 comments on commit c2cdb5b

Please sign in to comment.