From 2a7ebfd0d8354df51a1f94f671a68efefd7e8a35 Mon Sep 17 00:00:00 2001 From: John Kloor Date: Tue, 21 Sep 2021 09:19:50 -0400 Subject: [PATCH] Add support for tagging collections. --- .../themes/default/collections/form-tabs.php | 5 ++ admin/themes/default/collections/form.php | 5 ++ admin/themes/default/collections/show.php | 9 ++ admin/themes/default/collections/tag-form.php | 31 +++++++ admin/themes/default/collections/tag-list.php | 9 ++ admin/themes/default/collections/tags.php | 11 +++ .../controllers/CollectionsController.php | 14 +++ application/models/Api/Collection.php | 2 + application/models/Collection.php | 12 +++ application/models/Table/Collection.php | 85 +++++++++++++++++++ 10 files changed, 183 insertions(+) create mode 100644 admin/themes/default/collections/tag-form.php create mode 100644 admin/themes/default/collections/tag-list.php create mode 100644 admin/themes/default/collections/tags.php diff --git a/admin/themes/default/collections/form-tabs.php b/admin/themes/default/collections/form-tabs.php index c6c433965e..91d68d7bd1 100644 --- a/admin/themes/default/collections/form-tabs.php +++ b/admin/themes/default/collections/form-tabs.php @@ -10,6 +10,11 @@ $tabs[$tabName] = $tabContent; } +ob_start(); +require 'tag-form.php'; +$tabs['Tags'] = ob_get_contents(); +ob_end_clean(); + $tabs = apply_filters('admin_collections_form_tabs', $tabs, array('collection' => $collection)); ?> diff --git a/admin/themes/default/collections/form.php b/admin/themes/default/collections/form.php index a357e6126f..d49363bb82 100644 --- a/admin/themes/default/collections/form.php +++ b/admin/themes/default/collections/form.php @@ -1,10 +1,15 @@ +