Provide a UI to associate a date entry when creating a Date Content entity

Created on 7 September 2021, almost 3 years ago
Updated 15 April 2024, 2 months ago

Problem/Motivation

An admin can go to /admin/content/date_content and create Date Content entities, without a connection to an existing date. Since there isn't really a way to associate a date after the fact, this makes the entity orphaned and of limited usefulness.

Proposed resolution

The interface to add/edit a date content entity should include an autocomplete to choose a piece of content. Based on that, a secondary dropdown could allow the admin to choose in which field to find a value, and finally another dropdown to select which date the content should be associated with.

It might be worth having a separate permission to allow reassigning existing Date Content to different content and/or dates.

Also, it might be worth having a setting on the bundle to allow associating a specific entity type, to be used by the autocomplete.

Remaining tasks

- Add the new permission
- Add bundle setting for an entity type (default to node)
- Update the form to check the permission, then add the new fields
- Implement conditional logic and AJAX callbacks for the new elements
- Create an update hook to update existing installs with the updated schema

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada mandclu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΉπŸ‡­Thailand manarak

    Hello and thanks for these great date modules

    I have been experimenting with smart date and date content augmenter and have a different idea about the process.

    Here is how I imagine it :

    Let's imagine an example for course lectures and rooms, and a user adds the dates and content.

    The expected behaviour would be:
    User creates a new "Course" and adds Lectures into the same form in the smart date field.
    In each smart date field, he types a title, a formatted text and specifies a room (referenced entity).

    Currently, the "Date Content" must be added using Content -> Date Content, which is not workable for end users.

    I think the date content type should be configurable in the smart date widget in the form display settings of the parent entity where the smart date field is used.

Production build 0.69.0 2024