Commit Graph

9 Commits

Author SHA1 Message Date
Katie Smith
ed84e0958a Stop Redis exception by not passing Redis an empty set to delete
We use `redis_client.delete` to delete multiple keys at once, but this
raises a `redis.exceptions.ResponseError` if it is called with an empty list
or set. We should only call `redis_client.delete` when there is at least
one item to delete.
2019-01-03 15:11:31 +00:00
Pea Tyczynska
91d309816b Build delete folder endpoint that calls template_folders_api_client 2018-11-15 10:51:44 +00:00
Pea Tyczynska
b5c78dc552 Add delete_folder method to template folder api client 2018-11-15 10:51:44 +00:00
Pea Tyczynska
c27b97380d Add decorator deleting cache for template folder client update method 2018-11-13 11:43:59 +00:00
Pea Tyczynska
565d29ed43 Add a new endpoint for managing a folder, use it to rename folder
- Add a GET / POST view: manage template folder
- Add a template for that view, where a user can rename their
folder
- Add an API client method for updating a folder

- Test the new feature, including the test that service without
permissions cannot manage a folder
2018-11-13 10:38:56 +00:00
Chris Hill-Scott
74a4400bc7 Update URLs to match change in API 2018-11-12 08:37:46 +00:00
Chris Hill-Scott
cdb5b47c4d Post to the API when moving folders and templates
This commit adds logic to:
- take the list of selected folders and templates
- split it into two lists (of folders and templates)
- `POST` that data to the API, to effect the movement of said folders
  and templates

I’ve tried to architect it in such a way that we can easily add more
template ‘operations’ in the future, as we add more forms to the choose
template page.
2018-11-12 08:37:46 +00:00
Leo Hemsted
078595da9d show list of template folders on the choose templates page
Not linking anywhere yet. Also not sorted, and not filtered by
parent_id.
2018-11-06 13:13:13 +00:00
Leo Hemsted
7cbf5de240 add new template folder
The add new templates page now has option to add template folders.
Tweaked wording of other options and h1 to clarify options since it's
not all about templates any more.

Added api client and stuff for it
2018-11-06 13:13:12 +00:00