qgis / QGIS-Django

Django project for QGIS related activities such as plugin repository
http://qgis.org
GNU General Public License v2.0
86 stars 59 forks source link

Select multiple owners in management page in huge owners select box #289

Closed rduivenvoorde closed 5 months ago

rduivenvoorde commented 1 year ago

Though related to #191 I think we have to come up with a way to handle the huge list of owners we have now...

See this mailing list thread: https://lists.osgeo.org/pipermail/qgis-developer/2023-June/065947.html

We have > 4000 owners now, and it is pretty hard to set multiple owners. The tip from #191 only works if you have 1 owner

Not sure how to implement this easily though...

@nyalldawson proposed to use a javascript hack to set multiple owners

owners_input = document.getElementById('id_owners')
const users = ["some_user", "another_user", "another_person"];
for (var i = 0; i < owners_input.options.length; i++) {
    if ( users.includes(owners_input.options[i].text))
    {
      console.log(owners_input.options[i].text);
      owners_input.options[i].selected = true;
    }
    else
    {
      owners_input.options[i].selected = false;
    }
}
dimasciput commented 1 year ago

@rduivenvoorde What if I make the selection like this? Screen Recording 2023-06-29 at 5.38.51 PM.webm

rduivenvoorde commented 12 months ago

@dimasciput SUPER!!!! Thanks! Sorry for this late message...

nyalldawson commented 11 months ago

@dimasciput that looks BRILLIANT! Thank you!

dimasciput commented 11 months ago

@rduivenvoorde The fix has been deployed to the site.

gacarrillor commented 7 months ago

Can somebody with proper rights close this and https://github.com/qgis/QGIS-Django/issues/191?

gacarrillor commented 5 months ago

Thanks @Xpirix.

Xpirix commented 5 months ago

@gacarrillor You're welcome.