When viewing a blog listing page, there are some blog actions at the top which allow the user to add a new blog post. The problem is that these blog actions are given no CSS classes, which makes it very difficult to select and manipulate them with CSS. The patch adds some contextual CSS classes to the blog actions, making it a bit easier to manipulate the links.

Comments

Status: Needs review » Needs work

The last submitted patch, blogactionsclasses.patch, failed testing.

robloach’s picture

Status: Needs work » Needs review
StatusFileSize
new1006 bytes

Grrr.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Still apllies.
Adding a class to an element is always usefull.

Lets get this in!

realityloop’s picture

#2: blogactions.patch queued for re-testing.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Hm. This seems like odd special-casing. If this is a problem for Blog, it's going to be a problem for Forum, too (at least; probably elsewhere as well). Let's develop a standard and apply it consistently.

Also, 'node-add-blog'? Can we choose something a bit more semantic, or not really?

robloach’s picture

Status: Needs work » Needs review
StatusFileSize
new2.22 KB

Good call. This moves it over to hook_menu_local_tasks_alter() instead, like the Forum module. This gives us the "action-links" class on the ul.

joachim’s picture

naheemsays’s picture

Or the other way around - this seems to cover more stuff correctly from what I can see. Lets see what the bot says.

joachim’s picture

For consistency with forum module, maybe do this:

          $links['disallowed'] = array(
            '#theme' => 'menu_local_action',
            '#link' => array(
              'title' => t('You are not allowed to post new content in the forum.'), // change to blog
            ),
naheemsays’s picture

#6: blog-action-links.patch queued for re-testing.

dries’s picture

Using hook_menu_local_tasks_alter() is the proper thing to do. Happy to commit this when marked RTBC.

naheemsays’s picture

Status: Needs review » Reviewed & tested by the community

Patch seems simple enough. No white space issues and it does what it says on the tin.

Not really sure what Joachim was asking for in #9 and the current stuff seems to work.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks!

joachim’s picture

> Not really sure what Joachim was asking for in #9 and the current stuff seems to work.

Consistency in code with forum module! ;)

joachim’s picture

Status: Fixed » Needs work

Forum module keys its 'You are not allowed...' link with a different key. This is perhaps important?

// blog
      $data['actions']['output']['blog']['#link']['title'] = t('You are not allowed to post a new blog entry.');

// forum

          $links['disallowed'] = array(
            '#theme' => 'menu_local_action',
            '#link' => array(
              'title' => t('You are not allowed to post new content in the forum.'),
            ),
          );
marcingy’s picture

Status: Needs work » Closed (won't fix)

This is a string change, blog module is no longer in d8 so the follow up is won't fix.

joachim’s picture

Project: Drupal core » Blog
Version: 7.x-dev » 8.x-2.x-dev
Component: blog.module » Code
Status: Closed (won't fix) » Active

Moving to the Blog module.

chris_hall_hu_cheng’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

As this issue was carried over from Core, when Blog was in core, and is no longer relevant I am closing it.