Skip to content

Group Tree #101

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Group Tree #101

wants to merge 10 commits into from

Commits on Sep 25, 2020

  1. requirements: Add django-treebeard

    Add django-treebeard [1] to requirements. Note, that django-treebeard is
    already requested by wagtail, because it is also used by wagtail for its
    pages.
    
    [1] https://django-treebeard.readthedocs.io/
    donald committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    a7679a9 View commit details
    Browse the repository at this point in the history
  2. Update requirements

    Update requirements with
    
        (cd requirements && make)
    donald committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    da7b166 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3701d8a View commit details
    Browse the repository at this point in the history
  4. Make Group into a tree node

    Use MP_Node for Group and remove priority field.
    donald committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    bfc088b View commit details
    Browse the repository at this point in the history
  5. Add migration for personal Group model

    Add migration. Add the column "path" without the unique constraint
    and an invalid value first.
    
    Next, go over all group objects and set a path from a
    sequential index. Use alphabetical order, so that menus displayed be
    tree are in the same order as before unless sorted by the admin.
    
    As a last step add the unique contraint.
    donald committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    1a25760 View commit details
    Browse the repository at this point in the history
  6. Add admin interace for group tree management

    Add TreeAdmin for groups.
    
    Note, that TreeAdmin is based on Djangos ModelAdmin, not on Wagtails
    ModelAdmin. So we hook into Djangos admin-interface (available at
    /django-admin)
    
    Disable CSRF_COOKIE_HTTPONLY, because TreeAdmin uses Ajax over
    http to arrange the group tree.
    donald committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    22a7af8 View commit details
    Browse the repository at this point in the history
  7. Remove unneeded <hr>

    The <hr> before the "Reset filter" entry is not needed, because its at
    the top of the box.
    
    We already have a visual separation between "Reset filter" and the group
    names, because the later are in the .dropdown-content div, which as a
    little border.
    
    Remove <hr> element.
    donald committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    40dca95 View commit details
    Browse the repository at this point in the history
  8. Show groups in tree order in menu

    Add groups in tree order instead of alphabetical order to the
    context of the contacts page alphabetical order. Groups will be shown in
    that order in the drop-down menu.
    donald committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    3b4bc3b View commit details
    Browse the repository at this point in the history
  9. Group: Add get_depth_fill method

    Add a method which can be used by a template to get a number of &nbsp;
    entities based on the depth of the group,
    
    Note: Yes, this is an ugly mixture of code and style. Should be fixed up
    by some clever CSS using the depth attribute only.
    donald committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    5db26fb View commit details
    Browse the repository at this point in the history
  10. Show groups intended by depth in pulldown menu

    Use Group.get_depth_fill method to get some indention into the group
    pulldown menu.
    donald committed Sep 25, 2020
    Configuration menu
    Copy the full SHA
    931b5a6 View commit details
    Browse the repository at this point in the history