#419 Fix functionality of the Memberships widget
Merged by abompard. Opened by ryanlerch.
ryanlerch/fedora-hubs membership-widget  into  develop

Download 419.patch

This commit fixes a number of small issues with
the membership widget.

First (Fixes #418) was kind of the source of a lot of the other issues. This widget behaved differently when on a user hub vs a group hub. On the group hub it showed who was a member of that hub. On a User hub it showed what hubs the hub was a member of. In this commit, the widget just focuses on showing who is a member of the hub. Of course, on a user hub there will
be only one member, the user.

Fix #417 -- Previously, the label that changed from member to owner if a member was an owner did not work. All users were listed as members only. This commit fixes this

Fix #416 -- Previously the links to users listed in the widget were not showing or working. This was because the widget was using member.name rather than member.username. This is now fixed.

Fix #415 -- Previously the title of the widget was "hubs". This has now been changed to "Members"

Fix #414 -- Previously when trying to add the Membership widget to a hub, it was listed in the list of widgets as "Hubs" it is now listed as "Memberships"

Fix #357 -- Previously the links in the Memberships widget used hard links rather than url_for. this is now fixed.

Additionally, the avatars on the view more modal in this widget were extremly stretched vertically. This commit fixes that issue too.

Signed-off-by: Ryan Lerch rlerch@redhat.com

You can just set label to "Members" here, no need to set display_title.

rebased onto 7bbcae9217d994539482323dec00e91ae38454de

@abompard thanks! updated the commit, changing display_title to label.

cheers,
ryanlerch

I got two errors when I ran tox -e lint, can you fix them please?

./hubs/widgets/memberships/__init__.py:3:1: F401 'hubs.models' imported but unused
./hubs/widgets/memberships/__init__.py:15:1: E302 expected 2 blank lines, found 1

Then it's good to merge.

rebased onto a93091ccef6c0e4bf4b5427e019e1c4df997cc04

Fixed the two linting issues!

Thanks for reviewing, @abompard

Pull-Request has been merged by abompard

Metadata