Discussion:
[Erp5-dev] All selection deleter for Managers
Łukasz Nowak
2008-08-28 12:49:30 UTC
Permalink
Hello,

Very often while playing with developer site, and some times after
upgrades I'd like to be able to delete all portal selections. I did it
often by scripts, etc, but it is much easier for me to navigate into
portal_selections/manage_viewSelections and do something there.

So I added method to remove all selections and update management screen.

Patch attached, what is your opinion?

Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SelectionTool.py-all-selection-deletion.patch
Type: text/x-patch
Size: 1733 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080828/2459537c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SelectionTool_manageViewSelections.dtml-all-selection-deletion.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080828/2459537c/attachment-0001.bin>
Łukasz Nowak
2008-08-28 12:57:38 UTC
Permalink
Hello,
Post by Łukasz Nowak
Hello,
Very often while playing with developer site, and some times after
upgrades I'd like to be able to delete all portal selections. I did it
often by scripts, etc, but it is much easier for me to navigate into
portal_selections/manage_viewSelections and do something there.
So I added method to remove all selections and update management screen.
Patch attached, what is your opinion?
There is a problem - getSelectionNameList returns selections for current
user, not every selection in system. And there is no
getGlobalSelectionNameList.

AFAIK getSelectionNameList is used in same management screen, so is
currently logged manager did not use selection, used by normal user, he
is not able to operate on it from management screen - same applies for
methods provided by me...

As I'd like such selection preview functionality, user-mapped, global,
etc, I'd like to work more on it. Is it acceptable to merge it with
current management screen - so I would try to do it generic enough.

Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.
Łukasz Nowak
2008-08-28 13:17:51 UTC
Permalink
Hello,
Post by Łukasz Nowak
Hello,
Post by Łukasz Nowak
Hello,
Very often while playing with developer site, and some times after
upgrades I'd like to be able to delete all portal selections. I did it
often by scripts, etc, but it is much easier for me to navigate into
portal_selections/manage_viewSelections and do something there.
So I added method to remove all selections and update management screen.
Patch attached, what is your opinion?
There is a problem - getSelectionNameList returns selections for current
user, not every selection in system. And there is no
getGlobalSelectionNameList.
AFAIK getSelectionNameList is used in same management screen, so is
currently logged manager did not use selection, used by normal user, he
is not able to operate on it from management screen - same applies for
methods provided by me...
As I'd like such selection preview functionality, user-mapped, global,
etc, I'd like to work more on it. Is it acceptable to merge it with
current management screen - so I would try to do it generic enough.
Ok - attached corrected version - I still show only current user
selections, but now it is possible to delete all selections globally for
all users.

Waiting for your comments.

Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SelectionTool.py-all-selection-deletion-global.patch
Type: text/x-patch
Size: 3220 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080828/c8c2f6fe/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SelectionTool_manageViewSelections.dtml-all-selection-deletion-global.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080828/c8c2f6fe/attachment-0001.bin>
Loading...