Problem/Motivation

This module is great and has been a great fit for one of our current projects. I might be missing something, but I think it would be really cool if the add content block included an option for the destination.

If I include a manage content view, (I cloned one from the admin/content view), the destinations are baked into the operations automatically. For the add content block they're not.

I imagine that some workflows might want to be redirected to the node view page itself, that's why it can be a configuration that's default is 0.

CommentFileSizeAuthor
#2 3349167.patch3.12 KBasherry

Comments

asherry created an issue. See original summary.

asherry’s picture

StatusFileSize
new3.12 KB

Here's a patch to start things off. I'm going to move this to "needs review" to see if it's something that is worth moving forward on.

asherry’s picture

asherry’s picture

I forgot to mention that in the configuration form there is an accent in the title "Menü items". I fixed that as well in this same patch, but let me know if I should create another ticket.

erik seifert’s picture

Assigned: asherry » erik seifert
Status: Active » Needs review
erik seifert’s picture

We should have a better label than "Include destination". Something like "Return to dashboard after create content".

erik seifert’s picture

Assigned: erik seifert » Unassigned
asherry’s picture

Sorry, I was just following precedent, the views entity operation links has the same label.

Drupal\views\Plugin\views\field\EntityOperations

    $form['destination'] = [
      '#type' => 'checkbox',
      '#title' => $this->t('Include destination'),
      '#description' => $this->t('Enforce a destination parameter in the link to return the user to the original view upon completing the link action. Most operations include a destination by default and this setting is no longer needed.'),
      '#default_value' => $this->options['destination'],
    ];

I'm not saying I'm in love with the label of "include destination", haha, but at least for developers it matches other interfaces, and it's clearer as to what will actually happen. "Return to dashboard after create content" to me might mean we'd be doing a redirect.

Is there an ability also for these dashboard blocks to be placed with the regular block layout? Or might there be any possibility in the future for placing a dashboard entity in another context? That would also be confusing for this label.

Maybe, "Include destination query parameter"?

  • Erik Seifert committed 5d06b35a on 2.1.x
    Issue #3349167 by asherry, Erik Seifert: Include destination option for...
erik seifert’s picture

Version: 2.1.x-dev » 2.1.5
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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