Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to order results in the frontend #59

Open
chavu opened this issue Oct 1, 2018 · 7 comments
Open

No way to order results in the frontend #59

chavu opened this issue Oct 1, 2018 · 7 comments

Comments

@chavu
Copy link

chavu commented Oct 1, 2018

I'm trying to change the order of activities or result area entries but it is not working. I'm doing that in the backend by change the value of the 'Order' field. It would nice if you can provide drag-and-drop visual ordering in the front-end (Dashboard)

@martinburchell
Copy link
Contributor

Thanks for the suggestion

@martinburchell
Copy link
Contributor

It looks like we're not using the Order field as you note

It might be as simple as setting up ordering on the model to use this field. It might have ramifications elsewhere though

class Result(models.Model):
    class Meta:
        ordering = ['order']

This doesn't give you the drag and drop of course

@chavu
Copy link
Author

chavu commented Oct 18, 2018

Has this ordering been fixed and checked-in? How do I update my live instance of Kashana?

@martinburchell
Copy link
Contributor

martinburchell commented Oct 19, 2018

@chavu I haven't made this change because I am not sure if it will break functionality.
If you're willing to test this for us I can make the change on a branch.

To update your local instance of Kashana you can do git pull origin master from within the folder where you have Kashana checked out.

If you're using our fabric deployment script to deploy Kashana to a remote server, just rerunning the script should suffice

@chavu
Copy link
Author

chavu commented Oct 19, 2018

Yes I'm willing to test the changes.

@chavu
Copy link
Author

chavu commented Oct 25, 2018

I made the change below on my kashana instance and its working ok. So I think you can make the change in the main branch.

class Result(models.Model):
class Meta:
ordering = ['order']

However it's still a pain to manage the ordering manually from the admin page. For example to insert something in the middle of the list I have to manually re-enter the ordering for all entries downwards. Therefore we still need drag and drop. Alternatively in the Admin you can provide a drop-down field to select the entry on which you want the new entry to follow, then the program does the re-numbering.

@martinburchell
Copy link
Contributor

martinburchell commented Oct 29, 2018

Ordering in the model fixed in #75

@martinburchell martinburchell changed the title List items ordering not working No way to order results in the frontend Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants