From 8a7c3bd6f04b72374f29e6a88e4018964f7724d6 Mon Sep 17 00:00:00 2001 From: Bishwas Praveen Date: Mon, 24 Jun 2024 11:33:51 -0500 Subject: [PATCH 1/4] added migration file --- ...ter_candidateurl_document_type_and_more.py | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sde_collections/migrations/0056_alter_candidateurl_document_type_and_more.py diff --git a/sde_collections/migrations/0056_alter_candidateurl_document_type_and_more.py b/sde_collections/migrations/0056_alter_candidateurl_document_type_and_more.py new file mode 100644 index 00000000..50168981 --- /dev/null +++ b/sde_collections/migrations/0056_alter_candidateurl_document_type_and_more.py @@ -0,0 +1,54 @@ +# Generated by Django 4.2.9 on 2024-06-24 16:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("sde_collections", "0055_alter_workflowhistory_old_status_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="candidateurl", + name="document_type", + field=models.IntegerField( + choices=[ + (1, "Images"), + (2, "Data"), + (3, "Documentation"), + (4, "Software and Tools"), + (5, "Missions and Instruments"), + ], + null=True, + ), + ), + migrations.AlterField( + model_name="collection", + name="document_type", + field=models.IntegerField( + choices=[ + (1, "Images"), + (2, "Data"), + (3, "Documentation"), + (4, "Software and Tools"), + (5, "Missions and Instruments"), + ], + default=3, + ), + ), + migrations.AlterField( + model_name="documenttypepattern", + name="document_type", + field=models.IntegerField( + choices=[ + (1, "Images"), + (2, "Data"), + (3, "Documentation"), + (4, "Software and Tools"), + (5, "Missions and Instruments"), + ] + ), + ), + ] From ab7f1a468afda684948051a438cfa12201b88219 Mon Sep 17 00:00:00 2001 From: Bishwas Praveen Date: Mon, 24 Jun 2024 11:34:17 -0500 Subject: [PATCH 2/4] removed training and education from model choices --- sde_collections/models/collection_choice_fields.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sde_collections/models/collection_choice_fields.py b/sde_collections/models/collection_choice_fields.py index 37ac9412..9ab5b2e7 100644 --- a/sde_collections/models/collection_choice_fields.py +++ b/sde_collections/models/collection_choice_fields.py @@ -30,7 +30,6 @@ class DocumentTypes(models.IntegerChoices): DOCUMENTATION = 3, "Documentation" SOFTWARETOOLS = 4, "Software and Tools" MISSIONSINSTRUMENTS = 5, "Missions and Instruments" - TRAININGANDEDUCATION = 6, "Training and Education" @classmethod def lookup_by_text(cls, text: str) -> int | None: From a3188044fc9aee2de612df37b5abf2bb44c21c6c Mon Sep 17 00:00:00 2001 From: Bishwas Praveen Date: Mon, 24 Jun 2024 11:35:18 -0500 Subject: [PATCH 3/4] removed training and eductaion from front-end components --- .../static/js/candidate_url_list.js | 12 ++++-------- .../sde_collections/candidate_urls_list.html | 4 +--- .../sde_collections/collection_detail.html | 18 ++++++++---------- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/sde_indexing_helper/static/js/candidate_url_list.js b/sde_indexing_helper/static/js/candidate_url_list.js index c1bbfa90..971503e4 100644 --- a/sde_indexing_helper/static/js/candidate_url_list.js +++ b/sde_indexing_helper/static/js/candidate_url_list.js @@ -134,7 +134,6 @@ function initializeDataTable() { 3: "Documentation", 4: "Software and Tools", 5: "Missions and Instruments", - 6: "Training and Education", }; this.api() .columns() @@ -498,7 +497,6 @@ function initializeDataTable() { Documentation: 3, "Software and Tools": 4, "Missions and Instruments": 5, - "Training and Education": 6, }, }, }; @@ -663,7 +661,6 @@ function getDocumentTypeColumn() { 3: "Documentation", 4: "Software and Tools", 5: "Missions and Instruments", - 6: "Training and Education", }; button_text = data ? dict[data] : "Select"; button_color = data ? "btn-success" : "btn-secondary"; @@ -681,7 +678,6 @@ function getDocumentTypeColumn() { Documentation Software and Tools Missions and Instruments - Training and Education `; }, @@ -843,7 +839,7 @@ function postDocumentTypePatterns( newDocumentTypePatternsCount = newDocumentTypePatternsCount + 1; $("#documentTypePatternsTab").html( `Document Type Patterns ` + - newDocumentTypePatternsCount + " new" + + newDocumentTypePatternsCount + " new" + `` ); } @@ -890,7 +886,7 @@ function postExcludePatterns(match_pattern, match_pattern_type = 0, force) { newExcludePatternsCount = newExcludePatternsCount + 1; $("#excludePatternsTab").html( `Exclude Patterns ` + - newExcludePatternsCount + " new" + + newExcludePatternsCount + " new" + `` ); } @@ -932,7 +928,7 @@ function postIncludePatterns(match_pattern, match_pattern_type = 0) { newIncludePatternsCount = newIncludePatternsCount + 1; $("#includePatternsTab").html( `Include Patterns ` + - newIncludePatternsCount + " new" + + newIncludePatternsCount + " new" + `` ); } @@ -971,7 +967,7 @@ function postTitlePatterns( newTitlePatternsCount = newTitlePatternsCount + 1; $("#titlePatternsTab").html( `Title Patterns ` + - newTitlePatternsCount + " new" + + newTitlePatternsCount + " new" + `` ); } diff --git a/sde_indexing_helper/templates/sde_collections/candidate_urls_list.html b/sde_indexing_helper/templates/sde_collections/candidate_urls_list.html index c64778c3..4250c104 100644 --- a/sde_indexing_helper/templates/sde_collections/candidate_urls_list.html +++ b/sde_indexing_helper/templates/sde_collections/candidate_urls_list.html @@ -96,7 +96,6 @@

- @@ -236,7 +235,6 @@

- @@ -402,4 +400,4 @@

Customize Column -{% endblock content %} \ No newline at end of file +{% endblock content %} diff --git a/sde_indexing_helper/templates/sde_collections/collection_detail.html b/sde_indexing_helper/templates/sde_collections/collection_detail.html index 0f534b10..09553e3d 100644 --- a/sde_indexing_helper/templates/sde_collections/collection_detail.html +++ b/sde_indexing_helper/templates/sde_collections/collection_detail.html @@ -26,7 +26,7 @@

{{ colle data-match-pattern remove_protocol row - url> + url> - + {{ entry.curated_by }} {{entry.created_at|timesince}} @@ -261,8 +259,8 @@ @@ -285,10 +283,10 @@
@@ -300,4 +298,4 @@

{% block javascripts %} -{% endblock javascripts %} \ No newline at end of file +{% endblock javascripts %} From 68f167a644c1092933757d9115074e78b3a76a41 Mon Sep 17 00:00:00 2001 From: Bishwas Praveen Date: Wed, 26 Jun 2024 13:26:48 -0500 Subject: [PATCH 4/4] changed css to not let urls overflow the column width --- .../static/css/candidate_url_list.css | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sde_indexing_helper/static/css/candidate_url_list.css b/sde_indexing_helper/static/css/candidate_url_list.css index 304887af..dba99d85 100644 --- a/sde_indexing_helper/static/css/candidate_url_list.css +++ b/sde_indexing_helper/static/css/candidate_url_list.css @@ -90,11 +90,11 @@ border-color: #fafafa; font-size: 0.6875rem; box-shadow: 0 2px 2px 0 rgba(153, 153, 153, 0.14), 0 3px 1px -2px rgba(153, 153, 153, 0.2), 0 1px 5px 0 rgba(153, 153, 153, 0.12); } - + .select-dropdown:hover { box-shadow: 0 14px 26px -12px rgba(250, 250, 250, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(250, 250, 250, 0.2); } - + .select-dropdown:focus, .select-dropdown.focus { box-shadow: none, 0 0 0 0.2rem rgba(76, 175, 80, 0.5); @@ -194,7 +194,7 @@ letter-spacing: -0.02em; display: flex; align-items: baseline; } - + .checkbox-wrapper label { font-weight: 600; font-size: 16px; @@ -228,7 +228,7 @@ letter-spacing: -0.02em; width: 600px; color: #65B1EF; } - + .title-dropdown { width: fit-content !important; margin-top:20px; @@ -237,7 +237,7 @@ letter-spacing: -0.02em; .table tbody tr:nth-child(odd) { background-color: #050E19 !important; } - + .table tbody tr:nth-child(even) { background-color: #3F4A58 !important; } @@ -247,7 +247,7 @@ letter-spacing: -0.02em; } - + .custom-select, .buttons-csv, .customizeColumns, .addPattern{ border-style: solid !important; border-color: #A7BACD !important; @@ -346,7 +346,7 @@ div.dt-buttons .btn.processing:after { align-items: center; /* justify-content: space-between; */ } - + .headerDiv{ display: flex; justify-content: space-between; @@ -356,6 +356,12 @@ div.dt-buttons .btn.processing:after { display:flex; align-items: center; justify-content: space-between; + word-wrap: break-word; + word-break: break-all; + white-space: normal; + overflow-wrap: break-word; + min-width: 500px; + max-width: 500px; } .url-icon { @@ -415,4 +421,4 @@ div.dt-buttons .btn.processing:after { div.dt-container div.dt-paging ul.pagination { position: absolute; right: 60px; -} \ No newline at end of file +}