Skip to content
This repository was archived by the owner on Sep 19, 2018. It is now read-only.
This repository was archived by the owner on Sep 19, 2018. It is now read-only.

Rearrange the ambassadors page and implement the "main contact" role #425

Description

@mitio

What needs to be done:

  • Move the current ambassador above the list of countries
  • List the countries in a vertical list, smaller flags on the left of a clickable country name and expand/collapse the ambassadors for that country below it.
  • Implement the "role" field and the "main contact" flag in the DB so that the listing can take advantage of them.

Activity

  1. michelesr commented on Sep 29, 2015

    @michelesr
    Contributor

    I inspected the model.

    User profiles belonging to the group 'ambassadors' are the current ambassadors.

    Maybe we can extend with a role field (blank for normal users) and add a proprerty that check if this field is == 'main contact'

  2. mitio commented on Sep 29, 2015

    @mitio
    MemberAuthor

    I also think we need a new free-text role field.

    However, the main ambassador's flag should be separate, I think. This would leave us to specify something else in the role field, if needed. I think that for the main ambassador, we can create a new group and use that as a "flag".

  3. michelesr commented on Sep 29, 2015

    @michelesr
    Contributor

    I propose:

    role = models.TextField(max_length=1000, blank=True)
    main_contact = models.BooleanField(default=0)
    

    The check would be (in pseudocode):

    is_main_contact = 'ambassador' in User.groups and main_contact
    

    Maybe the check can be avoided if we make sure that only ambassardors are able to subscribe as main contacts.

  4. mitio commented on Sep 29, 2015

    @mitio
    MemberAuthor

    @michelesr Note that users are marked as ambassadors manually via the admin. The main contact flag will be set manually via the admin as well.

    I am okay with the proposed model fields. Not sure why you'd prefer a boolean flag instead of a group for the main contact flag, but I'm okay with that as well--it was also my initial idea.

    The only thing is that the role field seems a bit too long to me, we're not supposed to keep that much info there. Maybe up to 255 symbols would be fine, but I'm also okay with a limit of 1000.

  5. michelesr commented on Sep 29, 2015

    @michelesr
    Contributor

    The only thing is that the role field seems a bit too long to me, we're not supposed to keep that much info there. Maybe up to 255 symbols would be fine, but I'm also okay with a limit of 1000.

    Yeah, that's was only an example, limit can be set to 255 i guess.

    @michelesr Note that users are marked as ambassadors manually via the admin. The main contact flag will be set manually via the admin as well.

    Good. I'll start the implementation soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions