noyainrain / meetling

Web app for collaboratively preparing meetings.
https://meetling.org/
GNU General Public License v3.0
15 stars 2 forks source link

Delete (and restore) agenda items #6

Closed noyainrain closed 8 years ago

noyainrain commented 9 years ago

Add the possibility to delete agenda items. If an item has been deleted by accident, it should be possible to restore it.

noyainrain commented 8 years ago

API draft:

class Object:
    """
    .. attribute:: trashed

       Indicates if the object has been trashed (deleted).
    """

class Editable:
    def edit:
        """
        A *trashed* (deleted) object cannot be edited. In this case a :ref:`ValueError`
        (`object_trashed`) is returned.
        """

class Meeting:
    """
    .. attribute:: trashed_items

       Ordered map of trashed (deleted) :class:`AgendaItem` s.
    """

    def trash_agenda_item(self, item):
        """
        http:post:: /api/meetings/(id)/trash-agenda-item

        ``{"item_id"}``

        Trash (delete) the :ref:`AgendaItem` with *item_id*.

        If there is no item with *item_id* for the meeting, an :ref:`ValueError` (`item_not_found`)
        is returned.

        Permission: Authenticated users.
        """

    def restore_agenda_item(self, item):
        """
        http:post:: /api/meetings/(id)/restore-agenda-item

        ``{"item_id"}``

        Restore the previously trashed (deleted) :ref:`AgendaItem` with *item_id*.

        If there is no trashed item with *item_id* for the meeting, an :ref:`ValueError`
        (`item_not_found`) is returned.

        Permission: Authenticated users.
        """
noyainrain commented 8 years ago

UI draft: https://app.moqups.com/NoyaInRain/zqvfwQiAkh/view/page/a5793fa1a