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

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

Open
2 of 3 tasks
mitio opened this issue Sep 28, 2015 · 5 comments
Open
2 of 3 tasks

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

mitio opened this issue Sep 28, 2015 · 5 comments

Comments

@mitio
Copy link
Member

mitio commented Sep 28, 2015

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.
@michelesr
Copy link
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'

@mitio
Copy link
Member Author

mitio commented Sep 29, 2015

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".

@michelesr
Copy link
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.

@mitio
Copy link
Member Author

mitio commented Sep 29, 2015

@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.

@michelesr
Copy link
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants