pytition / Pytition

Django app for self-hosted privacy-friendly online petitions
https://pytition.org
BSD 3-Clause "New" or "Revised" License
97 stars 28 forks source link

Allow to chose which social network sharing button to show or not #311

Closed fallen closed 4 months ago

fallen commented 10 months ago

For now it's either all buttons or none. Allow to chose which are wanted per-petition.

rsk2 commented 8 months ago

Hi @fallen, how are you?

Can I work on this issue?

fallen commented 8 months ago

Hi @rsk2 ! I'm fine thanks! Yes you can, thanks a lot!

rsk2 commented 8 months ago

@fallen in order to implement this, we will need 7 boolean fields in the petition model (one for the email sharing button and remaining 6 for the social network sharing buttons). Each field will indicate whether a particular sharing button needs to be shown or not. Please let me know if you need any changes in this approach.

fallen commented 8 months ago

@fallen in order to implement this, we will need 7 boolean fields in the petition model (one for the email sharing button and remaining 6 for the social network sharing buttons). Each field will indicate whether a particular sharing button needs to be shown or not. Please let me know if you need any changes in this approach.

I think this is fine, also I think we should pay attention to the migrations and maybe do it by steps:

rsk2 commented 8 months ago

@fallen should I add make these field changes for the PetitionTemplate model as well?

fallen commented 8 months ago

@fallen should I add make these field changes for the PetitionTemplate model as well?

Ah yes, good idea. Indeed I can imagine someone could want to set in his/her template that some buttons are enabled.