This has been mentioned before in these two issues http://drupal.org/node/432798 and http://drupal.org/node/854122.

In Views, the "Theme: Information" shows available theme templates. It would be easier to read if the template files were shown as a bulleted list, rather than as a comma-separated list. eg:

Suggested layout:

  • Display output:
    • views-view.tpl.php
    • views-view--my-first-view.tpl.php
    • views-view--default.tpl.php
    • views-view--default.tpl.php
    • views-view--page.tpl.php
    • views-view--my-first-view--page.tpl.php
  • Comments

    StoraH’s picture

    Status: Needs work » Needs review
    StatusFileSize
    new436 bytes

    Here is a patch that lists the theme suggestions in a bullet list.

    dawehner’s picture

    Could you please post a screenshot, so people could do a visual review.

    StoraH’s picture

    StatusFileSize
    new197.05 KB
    new166.42 KB

    Yes I can, here's some before and after screenshots.

    dawehner’s picture

    Version: 7.x-3.x-dev » 8.x-3.x-dev
    Status: Needs review » Needs work
    Issue tags: +Needs backport to D7

    I totally agree that this looks much better, even if it will maybe need a lot of space.

    aspilicious’s picture

    Yes! Looks great!

    But I'm the only one who is seeing duplicates? o_O

    StoraH’s picture

    Yes that's true. To solved the space issue it could be an idea to make theme collapse like the main groups in views. Or what do you think?

    StoraH’s picture

    Here is the same patch ported for Drupal 8

    aspilicious’s picture

    Status: Needs work » Needs review

    I mean that in the same group there a duplicates

    views-view--default.tpl.php is listed twice just after each other

    StoraH’s picture

    I've seen the duplicate and it's an other issue. Thats why I think this patch is important, so you actually can se what's printed out.

    dawehner’s picture

    This is the cod used to generate such a theme suggestion:

        $themes[] = $hook . '__' . preg_replace('/[^a-z0-9]/', '_', strtolower($view->tag));
    
        // Add theme suggestions foreach single tag.
        foreach (drupal_explode_tags($view->tag) as $tag) {
          $themes[] = $hook . '__' . preg_replace('/[^a-z0-9]/', '_', strtolower($tag));
        }
    

    So basically you get one theme suggestion for all tags, and one theme suggestion per tag.
    I kind of agree that it would be possible in d8 to drop the first line as it is hard to see a use-case to use multiple tags as one key for the theme suggestion. Do you have any oppinion regarding that?

    dawehner’s picture

    dawehner’s picture

    Version: 8.x-3.x-dev » 7.x-3.x-dev
    Status: Needs review » Patch (to be ported)

    Let's get it in and fix the rest in the other issue. Committed and pushed to 8.x-3.x

    valentine94’s picture

    Issue summary: View changes
    Status: Patch (to be ported) » Needs review
    Issue tags: -Needs backport to D7
    StatusFileSize
    new436 bytes

    Back-port for 7.x-3.x-dev

    valentine94’s picture

    Assigned: StoraH » Unassigned
    StatusFileSize
    new436 bytes

    Re-attach patch for testing.

    chris matthews’s picture

    Status: Needs review » Reviewed & tested by the community

    The 4 year old back-ported patch in #14 to views_plugin_display.inc applied cleanly to the latest views 7.x-3.x-dev and works great for me.

    • DamienMcKenna committed 6713f91 on 7.x-3.x authored by StoraH
      Issue #1777580 by StoraH, Valentine94, dawehner, aspilicious, Chris2:...
    damienmckenna’s picture

    Status: Reviewed & tested by the community » Fixed
    Parent issue: » #2960871: Plan for Views 7.x-3.23 release

    Committed. Thank you.

    Status: Fixed » Closed (fixed)

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