Comments

Bojhan’s picture

Sure, though I am not sure if one would really want all possible tabs as contextual links. I don't necessarily think that is a good practice.

aspilicious’s picture

StatusFileSize
new10.88 KB

Here isa picture of the current links

contextual_edit.png

aspilicious’s picture

Status: Reviewed & tested by the community » Active

I know some people wanting this. So I guess it has a use case.

swentel’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

This should at least do it when using the old translation module for nodes and probably enable it for any entity when using entity translation.

yesct’s picture

Status: Needs review » Active

I think aspilicious is suggesting adding translation, not all possible tabs.

Also, for people like me who didn't know... can see that gear and drop down shown in #2 on the site default front page after content is created.

swentel’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

Woops forgot a constant, better patch.

swentel’s picture

Status: Active » Needs review

They relate in a way yes, but they have added it to a different place.

yesct’s picture

Manual testing of the patch from #6 just on nodes with basic page not translation enabled, article translation enabled.

Only thing I noticed right off was the order of the tabs is different than the order contextual links. (needs work for this, unless someone else thinks otherwise)

Patch works.
The translation contextual link that it ads does work too and goes to the translation overview as expected.

This next bit is a won't fix and has to do with the label on the translations tab: And it's more noticeable as contextual links that view and edit look like actions and "translations" looks like an overview of the translations tab (which it is) instead of an action like "translate". The translate action is really not from the tabs, but from the "add" link available from the translations overview table. or the "edit" link from those same rows (which edit the node or edit the translation).

contextual-s01-basic-no-T-tab-2012-11-22_1758.png

contextual-s02-article-t-tab-2012-11-22_1759.png

contextual-s03-front-basic-no-t-2012-11-22_1800.png

contextual-s04-article-with-t-2012-11-22_1800.png

contextual-s05-transtab-2012-11-22_1809.png

yesct’s picture

Status: Needs work » Needs review

Oh, I didn't notice that the tabs are view and edit and the contextual links are edit and delete. hmm.

Then the order makes sense. (edit, translations, delete)

needs review for general approach/code review.

gábor hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

I think the code change looks good. It modifies both modules. The contextual menu item should only show up if the menu tab would (by definition and existing tests for contextual links). So I think this is good to go.

webchick’s picture

Category: feature » task
Status: Active » Fixed

This makes a lot of sense to me, as this is one of the primary actions users are going to want to perform on their sites if the translation module's enabled. I don't view this as a feature, merely updating the existing UI to be more consistent, so re-classifying as a task.

Committed and pushed to 8.x. Thanks!

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