django-fluent-pages icon indicating copy to clipboard operation
django-fluent-pages copied to clipboard

Bulk actions in admin but no checkboxes

Open cdvv7788 opened this issue 9 years ago • 4 comments

There are 2 actions in admin for the pages: publish and delete...however there is no way to select them currently.

cdvv7788 avatar Jun 01 '15 21:06 cdvv7788

+1

bashu avatar Jun 02 '15 04:06 bashu

Agreed, and thanks for drawing attention to it.

Ideally, I would like to see django-polymorphic-tree (which provides this part) to support this. It could seriously use a different JavaScript logic for this, so it can also handle partial pages (e.g. pagination, search results) better. This is an area where some help or input would be really welcome!

Right now the checkboxes were removed because it was nearly impossible to get them properly aligned while keeping an tree indent. With other/newer JavaScript tree plugins that would probably be easier to get sorted out.

cc edoburu/django-polymorphic-tree#2 edoburu/django-polymorphic-tree#3 edoburu/django-fluent-pages#10

vdboor avatar Jun 04 '15 11:06 vdboor

Any tip we could get inspiration from feincms' tree ? Gave that a try and seems at least page tree with checkbox seem quite stable and works as expected. Not sure what packages are used though.

sunjoomoon avatar Mar 06 '16 14:03 sunjoomoon

In fact checkboxes could be added to the right the same way as it is done in \polymorphic_tree\admin\parentadmin.py

actions.append( u''.format(title=_('Select to delete or activate'), id=node.pk, static=settings.STATIC_URL) ) now in change list ( \polymorphic_tree\templates\admin\polymorphic_tree\change_list.html ) I tried to add following code

{% block extrahead %} {{ block.super }} {{ media.js }}

{% endblock %}

see li input.action-select instead of tr input.action-select in standard django change-list

now - there is need to get standard actions.js and change it so that during click does not focus wrong parent element and put this modified actions.js somewhere, otherwise it works ok for formatting issues it seems it is better to have 'grayed' world icon - so that checkboxes are aligned on the right

the remaining issue - to add checkbox with action-toggle class to the header ( I looked in templates - headers are rendered in for loop -so adding 'select all' checkbox for the last column is not such convenient ( but I hope possible - maybe if in template? and then render additional checkbox with action-toggle class )

Kurdakov avatar Jul 21 '16 13:07 Kurdakov