From af652da915ae263eac56c3b7ea255be31a7fccaa Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 14 Apr 2021 20:25:15 +0000 Subject: Added option to set default collection to collections/view.html --- wqflask/wqflask/templates/collections/view.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index 8d5e3616..9ec98ab1 100644 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -14,6 +14,7 @@ {{ uc.name }} +

This collection has {{ '{}'.format(numify(trait_obs|count, "record", "records")) }}

@@ -231,6 +232,21 @@ $('#collection_name').css('display', 'inline'); } }); + + make_default = function() { + alert("The current collection is now your default collection.") + let uc_id = $('#uc_id').val(); + $.cookie('default_collection', uc_id, { + expires: 365, + path: '/' + }); + + let default_collection_id = $.cookie('default_collection'); + }; + + $("#make_default").on("click", function(){ + make_default(); + }); }); -- cgit v1.2.3