Skip to content
This repository has been archived by the owner on May 23, 2018. It is now read-only.

Algorithm for arrow visualisation #2

Open
StanimirTsankov opened this issue Apr 4, 2017 · 0 comments
Open

Algorithm for arrow visualisation #2

StanimirTsankov opened this issue Apr 4, 2017 · 0 comments

Comments

@StanimirTsankov
Copy link

I think that algorithm for arrows is wrong, because they are always the same like in the beginning. This is my suggestion.
list__action_down.html
{% block field %} {% spaceless %} {%if object.parent is not null and object.parent.right-1 > object.right%} <a class="btn btn-sm btn-default" href="{{ admin.generateObjectUrl('down', object) }}"> &darr; </a> {%endif%} {% endspaceless %} {% endblock %}
list__action_up.html
{% block field %} {% spaceless %} {%if object.parent is not null and object.left > object.parent.left+1%} <a class="btn btn-sm btn-default" href="{{ admin.generateObjectUrl('up', object) }}"> &uarr; </a> {%endif%} {% endspaceless %} {% endblock %}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant