To some users these tabs are not needed and can cause confusion, specially to anonymous users.

I suggest one of those three possible solutions:

  1. A permission could define which roles will see it.
  2. A new parameter to each location added in menu section at node form that define if this location will show, or not, those tabs .
  3. Both suggestions.

Suggestion 1 will handle well this feature request if it is clearly defined which roles shouldn't see it. But, probably is quite easy to implement.

Suggestion 2 enable a more restrict and specific approach. It also is considering that to some contents an user should view the tab and others contents the same user shouldn't. But, could be a hell set it in all menu items.

Suggestion 3 will give a robuster solution. But, will demand more work. Maybe could be defined those two solution as two different features.

CommentFileSizeAuthor
#5 hide_original_tab-1547396-1.patch514 bytesmoskito

Comments

wojtha’s picture

Ahh, I know what you mean. "Original node" tab is visible to anonymous users right? IMHO the simplest solution to this is just to use existing node access settings and change

'access arguments' => array('view', 1),

to

'access arguments' => array('update', 1),

for the "Original node" tab, since this link has meaning only for site editors anyway.

moskito’s picture

wojtha, your solution seems to me good enough for the main issue here. Anonymous (or another "view access" role user) pretty sure won't need to understand how the menu structure is created and where the info came from, just need view the content. That means IMHO, your solution could be set as a bug fix of UI in the actual beta version instead of a feature.

However, I'm not sure if all site editors, specially site content editors who may be a person not "tech friendly" enough, need to be aware about NodeSymlinks existence. A site content editor may only want to handle the content information, not menu stuff. It also makes me think about #1549300: Manage NodeSymlink through menu UI issue.

Atragene’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta1

Hello,

I have the same problem. I'd like hidding the tabs 'NodeSymlink/Original' and the link goes directly on the original node.

You said we have to change : 'access arguments' => array('view', 1), to 'access arguments' => array('update', 1), but where is this code ?

Thanks for you help

jmatuska’s picture

I was having the same issue and didn't want those tabs to show to anonymous users. i solved it by ONLY displaying those tabs if the user is logged in (in my case, an administrator). the tabs will not show up for anyone who is not logged in.

in page.tpl.php, i changed this line (#132):

print render($tabs);

to:

global $user; if ($user->uid) { print render($tabs); }

Cheers,
Jean

moskito’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new514 bytes

Here is a patch with #1 solution.

It is a really simple patch, but it' d nice to have someone else reviewing it.

kanani’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed and applied. Patch in #5 works. RTBC

Atragene’s picture

Thanks jmatuska

It works !

chrlvclaudiu’s picture

It works ok. Thank you.

wojtha’s picture

Title: Show/Hide NodeSymlink/Original tabs » NodeSymlink's original tabs are shown to everyone
Category: feature » bug
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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