Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch prettifies the content types admin screen. Screenshots attached
Comment | File | Size | Author |
---|---|---|---|
#19 | node-content_type_overview-302120-19.patch | 3.11 KB | dmitrig01 |
#17 | Picture 5.png | 81.44 KB | ultimateboy |
#17 | Picture 4.png | 23 KB | ultimateboy |
#16 | node-content_type_overview-302120-16.patch | 3.15 KB | dmitrig01 |
#12 | screen_content_type_overview.png | 44.2 KB | maartenvg |
Comments
Comment #1
dmitrig01 CreditAttribution: dmitrig01 commentedTo explain: The themes page already looks like this, and I'm hoping to convert more pages to this look - like the modules page (if people don't object).
Comment #2
nielsbom CreditAttribution: nielsbom commentedGood call, but isn't it even better to skip the whole machine-name/system name thing and let Drupal lowercase it all, make underscores out of spaces and use numbers if there are double entries?
Why let a person do a computer's job? I don't really care how a content type is called inside Drupal, as long as it uses the regular name for me.
One less input field to read and fill out.
Comment #3
Dries CreditAttribution: Dries commentedLooks prettier to me. Not sure the machine name is really that valuable for end-users.
Comment #4
BioALIEN CreditAttribution: BioALIEN commentedAny use cases where machine_name would be needed?
I doubt anybody would give identical names to 2 or more content types. However, I am against the comments in #2, definitely keep machine_name in screenshot 2. There are too many modules that depend on this. Flexibility is a good thing (tm).
Comment #5
maartenvg CreditAttribution: maartenvg commentedLooks nice and +1 for consistency. With or without displaying the machine name is fine by me. If it stays, then this way of displaying it is a nice, unobtrusive method.
Concerning the slightly off-topic debate: I'm not a big proponent for automatically creating the machine readable name, because if you alter the Human readable name of the node type, you don't want to break the links to the pages that use the machine readable name.
Example.
Creating Blog item becomes blog_item.
Editing blog to Personal blog item becomes personal_blog_item. Now all references to blog_item (like node/add/blog_item) cease to exist and you have to resort to the path module to fix it.
Comment #6
nielsbom CreditAttribution: nielsbom commented#5
> I'm not a big proponent for automatically creating the machine readable name, because
True, but we can probably solve this in a good way, maybe by using an id instead of a "name", machines don't care :)
Comment #7
dmitrig01 CreditAttribution: dmitrig01 commented#2 - I care what the name is.
#5 - that is completely off-topic.
Comment #8
Pasquallethe default machine readable name should be filled in automatically with javascript (like the admin email at install), and changed manually if needed. but it is an another issue..
Comment #9
dmitrig01 CreditAttribution: dmitrig01 commented#8 - see #302054: Usability: Hide machine readable name of node type by default.
Comment #10
Dries CreditAttribution: Dries commentedLet's go with the patch as is. However, it will need a quick re-roll to replace "'Machine Name" with "Machine name" and stuff. Should be trivial.
Comment #11
alpritt CreditAttribution: alpritt commentedThe titles should be in header tags. The themes page uses h2 and I think that works here too.
I think we can lose the 'name' table header. It's not strictly accurate now that there are 3 items under it, and it is self explanatory anyway. Ditto with operations; IMO it's just chart junk.
I don't think that grey for the descriptions has enough contrast, but perhaps that is another issue. The machine name should probably have less contrast as it is still too prominent and difficult for non-developers to ignore. Possibly, it should be repositioned too so it is not automatically read when reading the content type titles.
Before committing, it should also be checked over in our alternate themes.
Comment #12
maartenvg CreditAttribution: maartenvg commentedPatch applies, but the effect is broken. See attached screenshot
Comment #13
alpritt CreditAttribution: alpritt commented@#12: You just need to clear the cache.
Comment #14
illuminaut CreditAttribution: illuminaut commentedI don't think the machine name should be displayed in the overview, as it's only of marginal value to end users. It's fine to display the field in the edit window, and if you need to know the machine name you can look it up that way.
I also don't particularly like the term "Machine name" and would prefer "System identifier", but I'm sure this has been discussed before and someone can direct me to the appropriate thread for that one.
Comment #15
catchUse cases for choosing machine name - views content type arguments and pathauto - very important IMO. De-emphasising the descriptions on that page is probably a good thing.
Comment #16
dmitrig01 CreditAttribution: dmitrig01 commentedRe-rolled
Comment #17
ultimateboy CreditAttribution: ultimateboy commentedAlthough the add content type form correctly displays the new "Machine Name" (see Picture 5), the content types list is still not functional (see Picture 4).
Comment #18
dmitrig01 CreditAttribution: dmitrig01 commentedRebuild the theme registry
Comment #19
dmitrig01 CreditAttribution: dmitrig01 commentedOops code style errors
Comment #20
Dries CreditAttribution: Dries commentedThe code looks good. I think this is RTBC if all tests pass. The testbed results in #19 seem to be out of whack. I'm running on battery so I can't really run all the unit tests right now. Good job, dmitri.
Comment #21
catchHEAD had testbed failures for a couple of days which I think was the cause of the testbed failures. Ran all tests with this and reviewed the patch + visually, all looks good, so marking RTBC.
Comment #22
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.