Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a new <document type> #366

Open
DennisAlund opened this issue Jun 5, 2024 · 0 comments
Open

Create a new <document type> #366

DennisAlund opened this issue Jun 5, 2024 · 0 comments
Assignees
Labels
priority:high 🚑 High priority issue type:enhancement 😃 New feature or request
Milestone

Comments

@DennisAlund
Copy link
Member

DennisAlund commented Jun 5, 2024

Description

Add a button to "create a new <document type>" where <document type> is the current document type being viewed (e.g., "Article").

Requirements

  1. Button Text:

    • The button should display text like "Add new Article". The exact text is available in the document type object titleSingular field.
  2. Create New Document:

    • Clicking the button should create a new empty document in the documents collection.
    • All fields should be set, and the data field should be set to an empty object {}.
  3. Navigation:

    • After creating the new document, navigate to the "edit document" page for that document.

Steps

  1. Add the Button:

    • Place the button prominently on the current document type page.
  2. Button Functionality:

    • Implement the button click functionality to:
      • Create a new document in the tanam-documents collection.
      • Set all fields appropriately, with data being an empty object {}.
      • Navigate to the "edit document" page for the newly created document.

Example

In this example, the button should say "Add new Article". Upon clicking the button:

  • A new document is created in the tanam-documents collection.
  • The user is redirected to the edit page for the new document.

Acceptance Criteria

  • The button is visible and appropriately labeled based on the current document type.
  • Clicking the button successfully creates a new document in the tanam-documents collection.
  • The user is redirected to the "edit document" page for the newly created document.

Screenshot

image

Related Issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high 🚑 High priority issue type:enhancement 😃 New feature or request
Projects
Status: In progress
Development

No branches or pull requests

2 participants