Edgewall Software

Ticket #3921 (closed enhancement: duplicate)

Opened 2 years ago

Last modified 20 months ago

[PATCH] Permissions - update sort + compact permissions display

Reported by: awbacker@… Owned by: cboos
Priority: normal Milestone:
Component: admin/web Version: 0.10
Severity: minor Keywords: patch
Cc:

Description

I use webadmin to manage a fair number of users, and have created this patch to address 2 issues.

  • The permissions for a subject were not sorted
  • The list was quite long

The patch :

  1. Sorts by subject+permission, giving an ordered list inside the permissions
  2. Combines all permission checks into a single row per subject, reducing size

Issues: The only issue is that the size of the individual permission div is 150, so if the perm name/group name becomes longer it could break the layout a little.

- Andrew

Attachments

sort-and-perm-display-enhancement.patch (2.3 KB) - added by awbacker@… 2 years ago.
patch for perm.py and templates/admin_perm.py
screenshot-perm-grouping.gif (5.9 KB) - added by awbacker@… 2 years ago.
Screenshot of what the change looks like
sort-and-perm-display-enhancement.2.patch (2.1 KB) - added by awbacker@… 2 years ago.
(new) patch for perm.py&admin_perm.py, now with code style
perm-display-grouping-genshi.patch (2.8 KB) - added by awbacker@… 2 years ago.
For Genshi. Template, css, and js.
perm-display-grouping-genshi2.patch (1.5 KB) - added by awbacker@… 2 years ago.
perm-display-grouping-genshi3.patch (1.2 KB) - added by awbacker@… 2 years ago.
Genshi final. v2 was the wrong file! Only diff is the .JS file

Change History

Changed 2 years ago by awbacker@…

patch for perm.py and templates/admin_perm.py

Changed 2 years ago by awbacker@…

Screenshot of what the change looks like

Changed 2 years ago by awbacker@…

(new) patch for perm.py&admin_perm.py, now with code style

Changed 2 years ago by cboos

Can you please make a patch against source:sandbox/webadmin-genshi, instead?

You use typical ClearSilver constructions, like:

<?cs if:(firstRun=="0")?></td></tr><?cs /if ?> 
...

that don't map well to Genshi, so I'm personally not in favor of extending further the Clearsilver WebAdmin code base in a way that makes it painful to port to Genshi.

See TracDev/ApiChanges/0.11#MigratingawayfromClearsilver? for further details.

Other than that, the change looks ok to me.

Changed 2 years ago by awbacker@…

I will give the template port a shot once I can get a copy of the new one up and running. I was wondering if I should do that, but since I am actually using .10 in production (on my local dev box!) I just wrote it against that.

I'm going to go looking for how to convert to the new version w/o blowing things up.

Changed 2 years ago by awbacker@…

Here is the new patch for Genshi. The default sort now appears fine, so I did not modify perm.py. The CSS and JS have both been modified slightly. You can now check a box by clicking on its text.

Are there any CSS revisions in the works? We can comfortably fit 3 columns of permissions if the add boxes on the right don't get bigger than they need to be (max-width? inside a wrapper div?)

Changed 2 years ago by awbacker@…

For Genshi. Template, css, and js.

Changed 2 years ago by cboos

  • owner changed from cmlenz to cboos
  • milestone set to 0.11

Thanks!

I've not verified it, but wouldn't

<label for="$p.key">$p.action</label>

achieve the same effect than your <span>+toggleChecked()?

Changed 2 years ago by awbacker@…

I always forget about labels, since they don't have much use for the other inputs. I am altering the patch to use labels instead. I usually put the 'hand' over the checkbox text but I have removed it for this rev since that means no other files are modified.

Could someone do me a favor and delete all attachments other than the latest. I am anon, so I can't even overwrite the previous patch.

Changed 2 years ago by awbacker@…

Changed 2 years ago by awbacker@…

Genshi final. v2 was the wrong file! Only diff is the .JS file

Changed 2 years ago by cboos

  • keywords patch added

Changed 23 months ago by awbacker@…

Will this be addressed, or do I need to reverify and submit as a patch under a different category?

Changed 20 months ago by Andrew Backer <awbacker@…>

  • status changed from new to closed
  • resolution set to duplicate

Resumitted as #4873 now that it is in trunk.

Changed 20 months ago by cboos

  • milestone 0.11 deleted

Add/Change #3921 ([PATCH] Permissions - update sort + compact permissions display)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.