mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Link template folders to their contents
Clicking on template folder navigates to a page that displays that folder's contents. This reuses the existing choose template view by adding a filter based on optional `template_folder_id` argument. Service model methods are rewritten to match `all_templates` and `get_template`. New `get_template_folder_path` method returns a list of folders (from root to the current one) that the selected folder is nested inside.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import uuid
|
||||
import json
|
||||
import os
|
||||
from contextlib import contextmanager
|
||||
@@ -3241,6 +3240,4 @@ def url_for_endpoint_with_token(endpoint, token):
|
||||
|
||||
@pytest.fixture
|
||||
def mock_get_template_folders(mocker):
|
||||
return mocker.patch('app.template_folder_api_client.get_template_folders', return_value=[
|
||||
{'id': uuid.uuid4(), 'name': 'Template Folder', 'parent_id': None}
|
||||
])
|
||||
return mocker.patch('app.template_folder_api_client.get_template_folders', return_value=[])
|
||||
|
||||
Reference in New Issue
Block a user