这是indexloc提供的服务,不要输入任何密码
Skip to content

Create a new <document type> #366

@DennisAlund

Description

@DennisAlund

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

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions