Created
August 13, 2014 17:49
-
-
Save dasginganinja/c5630b3c57b6ffebcd41 to your computer and use it in GitHub Desktop.
Drupal Field Translation links (from fields list in admin)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('.page-admin-reports-fields .content table.sticky-table td:first-child').each(function() { | |
var enabledFields = ["field_subtitle", "field_text", "field_video", "title_field", "field_related_products", "field_resources", "field_product_categories", "architect_body", "body", "field_architect_specifications", "field_event_link", "field_event_location", "field_file", "field_hero_title", "field_link", "field_news_publication_title"]; | |
var url = 'http://' + window.location.host + '/admin/config/regional/entity_translation/translatable/' + jQuery(this).text() + '?destination=admin/reports/fields'; | |
var $sibling = jQuery(this).next('td'); | |
$sibling.text(''); | |
if (enabledFields.indexOf(jQuery(this).text()) != -1) { | |
var $link = jQuery('<a href="' + url + '" target="_blank">' + jQuery(this).text() + '</a>').css('font-weight','700'); | |
$link.appendTo($sibling); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment