Problem/Motivation

Add an option in admin in order to allow the administrator to hide the "clone" action links on node view.

A patch follows.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kgaut’s picture

Sylense’s picture

Works. Had to clear cache before it worked. Thanks!

Rustan’s picture

Works fine for me as well, thanks!

Anonymous’s picture

any chance to help me in the following feature request?
https://www.drupal.org/node/2482097

Morten Najbjerg’s picture

Any chance this might be included in a module release?

Kgaut’s picture

Last commit in the module is from 6 month ago, I don't know if pwolanin has the time/motivation to maintain this module.

If there's improvements to be done for the patch, let me know.

komlenic’s picture

The patch in #1 above had a minor discrepancy -- the default value for 'display_clone_menu_link' variable is set in hook_menu to a value of 1, and in the admin form to a value of 0. Both values, if specified should be the same. That being said, I think the best default is to display the clone action/menu link (since that is in line with the purpose of the node_clone module).

This patch addresses the above. Thanks!

komlenic’s picture

Status: Active » Needs review
komlenic’s picture

While we're at it, let's add a note to indicate that the cache needs to be cleared for this setting to take effect.

Kgaut’s picture

Great !

#9 is RTBC for me.

kopeboy’s picture

Please can we include this?

I was surprised that with so many installs this feature wasn't already in.
The action link is quite intrusive!

Kgaut’s picture

We need to reach pwolanin in order to get this comited.

pwolanin’s picture

Status: Needs review » Needs work

Motivation for this feature?

Also, if a setting is going to change the router, you'd need to handle the rebuild on form submit rather than telling the admin to clear caches.

pwolanin’s picture

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

I don't understand the motivation for this proposed feature.

komlenic’s picture

The motivation for this feature is to have the functionality that this module provides (cloning nodes) without necessarily needing or wanting the action link to appear by default.

Marking this as "won't fix" is certainly up to your discretion @pwolanin, but there are several working patches here that do not hinder or otherwise complicate the module, and that several users above have found a need/use for. This tiny feature seems all but complete.

Kgaut’s picture

Agreed with komlenic.

When I started this issue I wanted to get the ability to clone nodes but only from a specific dashboard.

For somes sites with a lot of contributors (non technical) we want to keep the administration as simple as possible.

So I created this patch to not display the clone links on nodes.

jlstrecker’s picture

I'd like this feature, too. I'm just using node clone in a rules action. I'd prefer not to have it affect the rest of the site by adding an action link to every node.

Thanks to the folks who submitted patches.

grahamvalue’s picture

I'd prefer not to have it affect the rest of the site by adding an action link to every node.

Thanks to the folks who submitted patches.

Seconded.

grahamvalue’s picture

In case it helps anyone, the following css placed on the affected nodes (possibly in a block) will hide the clone link.

But please note that this code will hide all action links on the node.
Hiding the clone link alone leaves an empty action section on the nodes.

<style>
.action-links
{
        display:none;
}
</style>
eit2103’s picture

@komlenic your patch helped me too, thank you!