The Fields component of the View editing UI has long names, especially when fields are implemented via relationships. Wrapping each individual element in spans allows for more targeting theming.

Before:

<a href="/admin/structure/views/nojs/config-item/bestselling_products/default/field/field_product_image" class="views-ajax-link views-ajax-processed-processed">
(Content entity referenced from field_commerce_product) Content: Product Image
</a>

After:

<a href="/admin/structure/views/nojs/config-item/bestselling_products/default/field/field_product_image" class="views-ajax-link views-ajax-processed-processed">
<span class="views-field-entity-type">Content:</span>
<span class="views-field-title">Product Image</span>
<span class="views-field-relationship">Content entity referenced from field_commerce_product</span>
</a>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Cameron Tod’s picture

Cleaned up, should now only add spans when content is present.

Bcwald’s picture

Works good, although the Patch does not affect fields under "Contextual filters" and "Relationships". For consistency, this should apply to these areas as well.

Cameron Tod’s picture

Bcwald’s picture

patch in #3 does not work for me.

Bcwald’s picture

Status: Active » Needs work
Cameron Tod’s picture

Status: Needs work » Needs review
FileSize
4.48 KB

Let's try again.

  • Bcwald committed 350af10 on 7.x-2.x authored by cam8001
    Issue #2430573 by cam8001: Views Admin UI: Add wrappers around field...
  • Bcwald committed ef24776 on 7.x-2.x
    add in styles associated with #2430573
    
Bcwald’s picture

Status: Needs review » Closed (fixed)