apeisa / UserGroups

Adds users groups and page based permission to ProcessWire
GNU General Public License v2.0
11 stars 4 forks source link

Group description #31

Closed rlanvin closed 9 years ago

rlanvin commented 10 years ago

In the project I'm working on, there is a lot of groups that have meaningless names (e.g. a number, or an alphanumeric code). I think I'll need to add a new field "group description" in addition to the title, where the admin can write a quick explanation. I can do that as a completely separate fork of the module for this project only, but I think it could be a nice feature that would benefit to everybody. What do you think?

apeisa commented 10 years ago

I think it's a good idea. What do you guys think?

niklaka commented 10 years ago

Sounds reasonable. I'd say let's go for it.

I've got a few other things on my mind regarding groups as well and I'll add them as issues later on. But while at it, shouldn't there be a way to edit the group name (title) as well? Currently that isn't even shown when editing a group...

Will you @apeisa make the changes? I'm willing to stay away from groups (apart from commenting and opening issues). Take care of the pull requests as well, they looked good to me.

rlanvin commented 10 years ago

Ok I added a column group_description and made a pull request (I didn't find how to add the pull request to an existing issue though, it used to exist but it seems it's been disabled by github?).

My only problem now is regarding the select used to select groups (in the "Access" tab). I don't know what to do with it. Would it be better to have some kind of autocomplete field based on group name and group description? Having a autocomplete would also make it easier when you have a lot of groups (like I have a the moment in this project). But this is made with AngularJS and I have absolutely no idea how it works...

apeisa commented 10 years ago

I merged your changes (I did manage go through conflicts, huh!) and also added changed the headline from "Edit group" to $group->title. New admin theme gives very little weight on page headline (only shown at breadcrumb), but at least it's there.

I think it won't be small change to make select to autocomplete there...? I am pretty much angular rookie myself too, so this goes to Nik (who is at "Ok, that's pretty sweet!" level already: http://www.bennadel.com/blog/2439-My-Experience-With-AngularJS-The-Super-heroic-JavaScript-MVW-Framework.htm).

teppokoivula commented 10 years ago

@rlanvin After pulling this update, while creating groups, I can add a description.. but I can't see an obvious way to edit it for existing groups. Am I doing something wrong, is this intended behaviour (guess not..) or is this simply something that was overlooked earlier? :)

/cc @apeisa

teppokoivula commented 9 years ago

Editing group descriptions (and names) is currently implemented in the feature-edit-group-details branch. Unless someone has a reason why this shouldn't be possible, I'm thinking of merging this as soon as I've done some testing.

@apeisa, @rlanvin, @niklaka?

apeisa commented 9 years ago

Just skimmed through the code (I didn't really test - need to take kids to skiing soon) and didn't spotted anything cautious. Nice that you have added some docblocks also!

teppokoivula commented 9 years ago

Just merged aforementioned feature. Group titles and descriptions are now editable in the group details view.

Regarding the only open question here, selecting groups with an autocomplete in the access tab, that's definitely possible (and not too complicated), but personally I'd be against it. Mostly because I prefer to see a list of groups, rather than having to remember how I've named them.

Either way, this has very little to do with group details anymore, so to keep things in order, I'm closing this issue. I'd suggest opening a new issue for access tab group select via autocomplete, if it still feels important :)