Motivation
Some users go to the content section, rather than the structure section, looking for options to edit content types.
Proposed resolution
On the node/add page, add links to edit the content types as well, for users who have the right permissions. This provides another way of navigating to admin/structure/types/manage/[node-type]
Remaining tasks
Summary of API changes
Needs usability review; see #59
User interface changes
Adds links to admin/structure/types/manage/[node-type] for each node type on the node/add page
Screenshot of UI before patch:
Latest screenshot of UI after patch (from comment #50):
Latest screenshot of UI after patch (from comment #61):
Proposed by YesCT in #384150-59: Cross-link content type settings from node add/edit form
Related Issues
Original report by catch
Many users go to the node/add and node/edit forms looking for settings (submitted information, input formats). We should consider adding links there to the admin screens for those form elements when users have the relevant permissions.
Comment | File | Size | Author |
---|---|---|---|
#69 | drupal-add-content-description-384150-69.patch | 1.51 KB | zaporylie |
#69 | Screen Shot 2015-01-17 at 12.11.24.png | 28.74 KB | zaporylie |
#69 | Screen Shot 2015-01-17 at 12.11.00.png | 30.34 KB | zaporylie |
#62 | drupal-add-content-description-384150-61.patch | 1.37 KB | aschiwi |
#61 | add-content.jpg | 153.91 KB | aschiwi |
Comments
Comment #1
catchFixing tag.
Comment #2
karschsp CreditAttribution: karschsp commentedThis might be good for the novice queue.
Comment #3
karschsp CreditAttribution: karschsp commentedSorry, I screwed up the tags.
Comment #4
lucaswoj CreditAttribution: lucaswoj commentedHey, I'm completely new to Drupal development, but this looks like a great starter project. I'll see if I can get a patch done by tonight.
- Lucas
Comment #5
lucaswoj CreditAttribution: lucaswoj commentedFirst open source patch!
The method I use to do this is arguably a little hack-ey, but because of the way that drupal handles the node/add page, its the easiest and most efficient way. The node/add page stores the content types as menu items, and displays them back without any knowledge of the content type its describing. For me to provide a link to edit the content type, I have to reverse engineer the URL that goes with the menu item.
Comment #6
lucaswoj CreditAttribution: lucaswoj commentedComment #8
lucaswoj CreditAttribution: lucaswoj commentedFixed patch. Relative filename problems...
Comment #9
lucaswoj CreditAttribution: lucaswoj commentedNot sure why this failed to attach the first time
Comment #11
lucaswoj CreditAttribution: lucaswoj commentedFixed errors with declaring variables. That will teach me to run my server in E_ALL...
Comment #12
lucaswoj CreditAttribution: lucaswoj commentedPlease, please be the last try. I have to manually change the file path because diff is being mean to me.
Comment #13
lucaswoj CreditAttribution: lucaswoj commentedComment #14
Dries CreditAttribution: Dries commentedHey lucaswoj, your code is not adhering to the Drupal coding standards. If you look at the patch, you'll see that you're using tabs instead of spaces. It would be great if you could re-roll the patch with Drupal's coding standards in mind.
Comment #15
lucaswoj CreditAttribution: lucaswoj commentedI'm sorry, I thought my IDE was already configured for spaces... I guess I've never really worried about it before.
For the 5th time, here we go....
Comment #16
sheise CreditAttribution: sheise commentedthis worked for me.
Comment #17
jpoesen CreditAttribution: jpoesen commentedThanks for your patch. It almost works as advertised - here are some remarks:
Inconsistency:
The patch indicates that line 25 replaces line 23, but they're identical so the patch should not indicate changes.
Markup error:
On line 28 of your patch you're adding:
but you really wanted to close the DD element opened on line 26, so line 28 should be:
Usability:
The patch adds an 'Edit Content Type' link to the end of each Content Type definition on /node/add. However I only noticed that link after clicking around trying to find the changes introduced by the patch.
Wouldn't it make more sense to add the edit link next to the Content Type title? See attached screenshot.
Entities / wrapper:
I personally don't like the addition of a non-breaking space entity and wrapping the "Edit Content Type" link in small tags. The entity clutters up the code and by using the small tags we make assumptions on how this link should be displayed.
Adding a meaningful css class name is more versatile and less imposing.
Comment #18
lucaswoj CreditAttribution: lucaswoj commentedThanks for the thoughtful feedback jpoesen. I think this updated patch fixes all of your concerns.
Comment #20
rschwab CreditAttribution: rschwab commentedThis has unfortunately missed the string freeze for 7.
Comment #21
mlncn CreditAttribution: mlncn commentedYes, please.
Comment #22
Anonymous (not verified) CreditAttribution: Anonymous commentedI was bored this evening, so here's a patch that brings #18 to D8, along with a clarification that the link is to edit the content type, rather than a link to bring up a view or something that would list all nodes of that type available for editing.
Comment #24
Anonymous (not verified) CreditAttribution: Anonymous commentedRetry...
Comment #25
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #26
oriol_e9gCoding standards
http://drupal.org/coding-standards
else if
should be:
elseif
Use one line dot concatenation or the operator .=
Same here:
better:
Comment #27
Anonymous (not verified) CreditAttribution: Anonymous commentedBetter adherence to coding standards. (Sorry, got wrapped up in "80 characters per line".)
Comment #28
Kristen PolBased on other patches I've looked at recently, my understanding is that comments are supposed to have a space after the "//" and have sentence formatting, e.g.
Note that I applied the patch (in D8) and am not seeing anything come up on the
node/add
page while logged in as super-admin. I cleared the cache and that had no effect either.Comment #29
Kristen PolDrush wasn't working for clearing the caches so I changed the theme to clear the theme registry and now I see the links.
I think it would be good to add a space between the content type name and the "[", e.g.
Comment #30
yoroy CreditAttribution: yoroy commentedAlso, there is no node.css anymore, that bit probably needs to be moved into node.admin.css
Comment #31
Anonymous (not verified) CreditAttribution: Anonymous commentedUpdated patch.
Also noticed that the links don't appear when using the Seven theme. Tried applying the patch, creating a new empty database, then installing Drupal, used another browser that had not accessed my dev environment, and still didn't see them on Seven. That *should* rule out caching issues.
Comment #32
Anonymous (not verified) CreditAttribution: Anonymous commentedAhh... there's a template.php override in Seven...
Here's an updated patch...
Also cleaned up the "if" surrounding the addition. When I first worked on this in December, I admit that I was just being introduced to the ...?...:... syntax at the time.
Comment #33
jaredsmith CreditAttribution: jaredsmith commentedI've cleaned up the patch so that it works with modern Drupal 8 code... the previous patch was suffering from some bit-rot. The attached patch is functionally the same as the previous patch.
I've tested the attached patch myself, but would love to see some additional review so that we can get this pushed through.
Comment #34
rwinikates CreditAttribution: rwinikates commentedApplied patch, looks good, works for core and custom content types.
Comment #35
catchHmm I think I'd probably place the permissions check directly in the theme function rather than overloading the node type objects. Also is the new CSS absolutely necessary in node.admin.css or could that be put in seven theme instead?
Comment #36
Anonymous (not verified) CreditAttribution: Anonymous commentedThis patch moves the CSS to Seven theme since it is not necessary to provide a default here. It also moves the call to user_access() and generation of content type edit links to theme_node_add_list().
Comment #37
pbz1912 CreditAttribution: pbz1912 commented#36: content-type-edit-384150-36.patch queued for re-testing.
Comment #38
pbz1912 CreditAttribution: pbz1912 commentedApplied #36 to bc1da65 and rerolled it.
It seems to work.
Comment #40
pbz1912 CreditAttribution: pbz1912 commented#38: content-type-edit-384150-38.patch queued for re-testing.
Comment #41
YesCT CreditAttribution: YesCT commented#38: content-type-edit-384150-38.patch queued for re-testing.
Comment #42
YesCT CreditAttribution: YesCT commenteddid a standards review. mostly looks good.
comments should wrap at 80 chars. See: http://drupal.org/node/1354
Comment #43
mahaprasad CreditAttribution: mahaprasad commentedApplied #38 and rerolled it.
Hope it will work.
Comment #44
xjmThanks @mahaprasad!
Comment #45
YesCT CreditAttribution: YesCT commentedscreenshots embedded in the issue summary with before and after would help. Also it would help to update the issue summary using the issue summary template.
Comment #46
pameeela CreditAttribution: pameeela commentedDid a manual test of this patch. Works well but some minor issues.
1. There are brackets appearing in the output - see screenshot
2. The hover state for the 'Edit content type' links doesn't work - doesn't get an underline, as it should.
Also uploading a screenshot of the UI before to add to summary.
Comment #47
pameeela CreditAttribution: pameeela commentedDoes this patch include any updates to node/edit pages? Couldn't find any, only saw changes to node/add. If there are proposed changes to the edit screen as well can someone provide more detail?
Comment #47.0
pameeela CreditAttribution: pameeela commentedUpdates summary to use template.
Comment #48
rootworkUpdated the patch from #43 to remove the extraneous brackets and give it the right span wrapper.
Comment #49
rootworkHere's a new screenshot of the add content page with my revised patch.
It looks like the underlines on hover still aren't appearing. I'm going to try to track down what's going on in the CSS.
Comment #50
rootworkSorry, changing status back to needs work and embedding the new screenshot.
Comment #50.0
rootworkUpdates [username] with link to OP
Comment #51
mahaprasad CreditAttribution: mahaprasad commentedFixed the hover link & aligned the links in one line.
Please find the attached patch.
Comment #52
xjmThanks @mahaprasad, @rootwork, and @pameeela! The updates make it much easier to understand the proposed change.
The proposed pattern seems pretty confusing to me, and it's different from any pattern we have elsewhere. We have two links that say "edit content type" with nothing to distinguish them aside from their spacial placement. I would have no idea which link I was supposed to click on when going to this page.
For this to work at all, I think the link texts would need to be more specific, like "Add new basic page" and "Configure basic pages" or something. Also, elsewhere when we have multiple operations related to one thing, we use the dropbutton pattern.
Tagging for the UX team to give feedback.
Comment #53
mahaprasad CreditAttribution: mahaprasad commentedApplied the #51 patch & tested screen shot is attached.
Comment #54
oriol_e9gMinor in style.css
\ No newline at end of file
Comment #55
oriol_e9gComment #56
rootwork@xjm (and useability reviewers), what if the pattern was more like the screenshot in #50? I actually thought that's what the previous patch was trying to create. I agree having the two links next to each other, with one in brackets, would be confusing.
What if they were on two separate lines, with the second line saying "Edit article content type," "Edit page content type," etc.?
Another option I could see is tacking it on to the end of the help text. So then it would say something like "Use articles for time-sensitive content like news, press releases or blog posts. Edit this content type." The edit link could be in parentheses, brackets, or italicized, although I think the fact that it's a link would probably set it apart enough.
Comment #57
pameeela CreditAttribution: pameeela commented@rootwork @xjm I also think this is really confusing. I frequently do training for users new to Drupal and the concept of editing content vs editing content types is already hard to grasp. I think this blurs the line even further, by eliminating the content/structure split - which I see as a small hurdle to get over up front, but from there it makes a lot of sense.
I do appreciate this as an attempt to make things less confusing, so I am keen to see what the UX team thinks!
Comment #58
xjm@rootwork, #50 is exactly what I found very confusing. My review is about that screenshot.
Comment #58.0
YesCT CreditAttribution: YesCT commentedupdating latest screenshot
Comment #59
YesCT CreditAttribution: YesCT commentedI'm reading the motivation in the issue summary:
I've seen this in Usability testing the multilingual stuff.
http://groups.drupal.org/node/285978 (g.d.o post). I have not gone through all the video to make notes yet. I'll come back and provide a specific example when I find it.
But, from memory, I think where they actually went was: admin/content (not the shortcut to add content):
And then tried the edit link for a particular piece of content when attempting to configure the content type in general.
on the add content page
But back to the add content page...
the text in [ ] reminds me of the [edit] [clone] [delete] links that used to show up when hovering over a view.
Consider:
1. What about using the word *structure*.
2. Also, since this is the add content page. We do not want the main emphasis to appear to be to edit the content type. (which it is I think in the screenshots previously posted)
3. Being specific about the links, so they are not identical.. there might be some code reusable from #1810386: Create workflow to setup multilingual for entity types, bundles and fields because we had to figure out the type of things when building the label for in input items.
a. Article[ Edit Article content type structure ]
b. Article[ Edit Article content type ]
c. Article[ Edit Article structure ]
d. Add an Article[ Edit Article structure ]
this shows a and b:
but I think my favorite might be:
I would mark this needs work for that. But I think we still want a Usability review to point this in an acceptable direction.
[edit: added width= on the img's because my retina display yields giant screenshots]
Comment #60
YesCT CreditAttribution: YesCT commentedadded related issues section to summary with #1440678: New users have difficulty finding where to adjust the content model
Comment #61
aschiwi CreditAttribution: aschiwi commentedJust got to this issue via the Prague code sprint (http://drupalmentoring.org/node/425/). I'm not sure this is still relevant, since the UX team hasn't given any feedback and there's still discussion about it. Also the patch is pretty outdated by now.
I think one major part of the problem is that only the content types are listed here, but not the "action" - in my experience people forget to read the page title, which states "Add content" (that title is also hard to see with Overlay module on). So they click on "Article" thinking they can edit the content type. Proposed quick fix: Make the links say "Add Article" and "Add Page".
Here's a screenshot, what do you guys think?
Comment #62
aschiwi CreditAttribution: aschiwi commentedHere's a small patch to theme_node_add_list and seven_node_add_list for testing purposes. See comment #61 for a screenshot of the result.
Comment #63
aschiwi CreditAttribution: aschiwi commentedComment #65
rootworkI like the idea in #61.
But we still desperately need useability reviewers, for instance for the other ideas in #59.
Comment #65.0
rootworkadded related issues
Comment #66
xjm(Merging "node system" and "node.module" components for 8.x; disregard.)
Comment #67
rootworkSorry, didn't realize this was still assigned to me. This still needs a useability review.
Comment #68
rootworkUpdating issue summary and removing my misspelled tag.
Comment #69
zaporylieSeven
Bartik
Comment #71
rootworkThere are a lot of proposals here (just look at the issue summary); the reroll in #69 was of #50, but there's also YesCT's idea from #59 (which you might like better zaporylie). Also obviously a lot of things are out of date here since overlay doesn't even exist in D8 anymore.
I wonder if any usability folks can let us know if there are demonstrated problems with this page on recent D8 betas, and if so what they think about some of the solutions in this issue. Otherwise we're just going to keep pushing forward new patches based on an analysis of a Drupal interface that is no longer in place.
So, again, "needs usability review"...
Comment #72
rootworkComment #73
Patrick Storey CreditAttribution: Patrick Storey commentedI am removing the novice tag.
I am removing the novice tag from this issue because: it was added 6 years ago. It is long, without clearly defined remaining tasks, and in the last few comments it looks like the direction of the issue is lacking consensus.
Novice tag documentation of tasks or issues to avoid: https://www.drupal.org/core-mentoring/novice-tasks#avoid
Comment #74
Bojhan CreditAttribution: Bojhan as a volunteer commentedComment #75
rootwork@Bojhan needs usability review was added because the interface had changed since this was first proposed. I said in #71:
Are you removing it because you disagree, or because you think there are no longer usability issues with this interface? If it's the latter, maybe we should just close this issue, as plenty has changed on these pages in the meantime.
Comment #77
yoroy CreditAttribution: yoroy at Roy Scholten commented