Problem/Motivation

Lately, we added a link for the content type fields on the node edit page. I think it makes sense to have a configuration for this function, to let decide show this link on the node edit page or not.
Because, for some themes, as for example Gin, it shows only the node title on the edit page and we should display the content type name with a link as well.

Proposed resolution

  • Add a configuration page and allow to choose node content types (with checkboxes) to show a link;
  • Add functionality to display links based on the configuration settings;
  • If there are no settings, display for all content types;

Remaining tasks

Create MR.
Review.
Merge.

User interface changes

A configuration page will be added.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#5 Screenshot 2024-03-22 at 2.24.01 PM.png180.86 KBnidhi27
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

_shY created an issue. See original summary.

_shy’s picture

Title: Create a configurations for the "Edit Content type fields" link on the node page. » Create a configuration page to allow to configure "Edit Content type fields" link displaying on the node edit pages.
nidhi27’s picture

Assigned: Unassigned » nidhi27

nidhi27’s picture

Assigned: nidhi27 » Unassigned
Status: Active » Needs review
StatusFileSize
new180.86 KB

Hello,

I have created #MR8 for this. Created one configuration form listing all the content type names. If you select the content type than it will show the link on node edit page.

Let me know if there are any suggestions!

raveen_thakur51’s picture

Hello Guys, I have implemented the changes as per MR! And configuration link was added successfully as you can see in the attached screenshot here: https://prnt.sc/5cYTgeFwOXJk

raveen_thakur51’s picture

The changes can be imported. Thank You!!

_shy’s picture

Status: Needs review » Needs work

Still need to fix some phpstan and cspell issues.

------ ------------------------------------------------------------------------------ 
  Line   src/Form/EditLinkConfigForm.php                                               
 ------ ------------------------------------------------------------------------------ 
  47     Unsafe usage of new static().                                                 
         💡 See:                                                                       
            https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static  
 ------ ------------------------------------------------------------------------------ 
 [ERROR] Found 1 error                                                          
./src/Form/EditLinkConfigForm.php:82:32     - Unknown word (entitiess)  -- Section for configuring entitiess.
	 Suggestions: [entities, enmities, entitles, nettie's, entices]
CSpell: Files checked: 9, Issues found: 1 in 1 files
nidhi27’s picture

Resolved phpstan and cspell issues.

nidhi27’s picture

Status: Needs work » Needs review
_shy’s picture

Status: Needs review » Fixed

Thanks, everyone!

Merged to the 1.0.x branch. Will be added in the next release version!

Status: Fixed » Closed (fixed)

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