Skip to content

Commit

Permalink
Merge branch 'dev-enhanced' into 77-center-select-dropdown-button
Browse files Browse the repository at this point in the history
  • Loading branch information
emshahh committed May 30, 2024
2 parents 6d62eb3 + 282c64c commit 18fcebb
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 25 deletions.
7 changes: 7 additions & 0 deletions sde_indexing_helper/static/css/candidate_url_list.css
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ letter-spacing: -0.02em;

.title-dropdown {
width: fit-content !important;
margin-top:20px;
margin-bottom:20px;
}
.table tbody tr:nth-child(odd) {
background-color: #050E19 !important;
Expand Down Expand Up @@ -284,4 +286,9 @@ letter-spacing: -0.02em;
/* display: flex; */
align-items: center;
/* justify-content: space-between; */
}

.headerDiv{
display: flex;
justify-content: space-between;
}
9 changes: 5 additions & 4 deletions sde_indexing_helper/static/css/collection_detail.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@
color: #0066CA;
font-weight: 700;
border-bottom: 2px solid #FF3D57;
padding-bottom: 30px;
padding-bottom: 20px;
}

/* line under the tab options */
div > .nav {
padding-bottom: 30px;
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
padding-bottom: 20px;
border-bottom: 1px solid;
border-bottom-color:rgba(167, 186, 205, 1);
}

/* badge container to fix size of div and prevent hugging single line titles */
Expand Down Expand Up @@ -191,4 +192,4 @@ color:black;

.tableHeaderRow{
background-color:#050E19
}
}
3 changes: 2 additions & 1 deletion sde_indexing_helper/static/css/project.css
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,12 @@ body {

.tabStyle{
color:#8697A8 !important;
padding-top:10px;
}

.nav-item .active{
color:#65B1EF !important;

background-color:rgba(255, 255, 255, 0.07);
}

.buttonColor{
Expand Down
3 changes: 1 addition & 2 deletions sde_indexing_helper/static/js/candidate_url_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ function modalContents(tableName) {
var $label = $("<label>")
.attr("for", "checkbox_" + columnName.replace(/\s+/g, "_"))
.text(columnName);

var $caption = $("<p>")
.text(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore."
candidateTableHeaderDefinitons[columnName]
)
.attr({
id: "caption",
Expand Down
9 changes: 4 additions & 5 deletions sde_indexing_helper/static/js/collection_list.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var uniqueId; //used for logic related to contents on column customization modal


function modalContents(tableName) {
var checkboxCount = $("#modalBody input[type='checkbox']").length;

Expand Down Expand Up @@ -29,10 +30,9 @@ function modalContents(tableName) {
var $label = $("<label>")
.attr("for", "checkbox_" + columnName.replace(/\s+/g, "_"))
.text(columnName);

var $caption = $("<p>")
.text(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore."
tableHeaderDefinitions[columnName]
)
.attr({
id: "caption",
Expand Down Expand Up @@ -70,7 +70,7 @@ let table = $("#collection_table").DataTable({
layout: {
topStart: "searchPanes",
},
dom: "PiBf",
dom: "PiB",
buttons: [
{
text: "Customize Columns",
Expand All @@ -85,8 +85,7 @@ let table = $("#collection_table").DataTable({
targets: 8,
visible: false,
},
{ width: "200px", targets: 1 },
{
{ width: "200px", targets: 1 }, {
searchPanes: {
options: [
{
Expand Down
23 changes: 23 additions & 0 deletions sde_indexing_helper/static/js/project.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@


/* Project specific Javascript goes here. */
const tableHeaderDefinitions = {
"Name": "The designated name of the collection.",
"URL": "The primary URL of the collection from which the scraping process begins.",
"Division": "The specific division to which the collection belongs. It can be one of: Astrophysics, Heliophysics, Biological and Physical Sciences, Earth Science, or Planetary Science.",
"Candidate URLs" : "The URLs crawled from the base URL by Sinequa. These are curated and sent for indexing.",
"Workflow Status": "The current stage of the collection within the workflow.",
"Curator": "The individual responsible for curating this collection.",
"Connector Type": "Indicates whether the connector is a web crawler or API-based."
}


const candidateTableHeaderDefinitons = {
"URL": "A scraped URL.",
"Exclude": "Whether or not this URL is excluded from the collection.",
"Scraped Title": "Title scraped from the document.",
"New Title" : "New title set by a user.",
"Document Type": "{insert description here}",
"Match Pattern" : "Pattern that is used to match against URLs in the collection.",
"Match Pattern Type": "{Insert explanation here}",
"Reason": "{Insert explanation here}",
"Affected URLs": "The URLs that match the pattern.",
"Actions": "Delete a pattern."
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,36 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js"></script>
<script src="//cdn.datatables.net/plug-ins/2.0.5/pagination/input.js"></script>
<script src="{% static 'js/candidate_url_list.js' %}"></script>
<script src="{% static 'js/project.js' %}"></script>
<script src="{% static 'js/core/bootstrap.min.js' %}"></script>
{% endblock javascripts %}

{% block content %}
{% csrf_token %}
<div class="headerDiv">
<h1 class="pageTitle">Candidate URLs</h1>
<button class="btn badge {{ collection.workflow_status_button_color }} dropdown-toggle title-dropdown btn-sm"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
id="workflow-status-button-{{ collection.id }}"
aria-expanded="false">{{ collection.get_workflow_status_display }}</button>
<div class="dropdown-menu"
aria-labelledby="workflow-status-button-{{ collection.id }}">
{% for choice in workflow_status_choices %}
<a class="dropdown-item workflow_status_select" value="{{ choice }}" data-collection-id={{ collection.id }} >{{ choice.label }}</a>
{% endfor %}
</div>
</div>
<div class="candidateUrlContainer">
<h3 class="whiteText candidateTitle">
{{ candidate_urls.count|intcomma }} Candidate URLs for <a
href="{% url 'sde_collections:detail' collection.pk %}"><strong class="urlStyle underline">{{ collection.name }}</strong></a>
<button class="btn badge {{ collection.workflow_status_button_color }} dropdown-toggle title-dropdown btn-sm"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
id="workflow-status-button-{{ collection.id }}"
aria-expanded="false">{{ collection.get_workflow_status_display }}</button>
<div class="dropdown-menu"
aria-labelledby="workflow-status-button-{{ collection.id }}">
{% for choice in workflow_status_choices %}
<a class="dropdown-item workflow_status_select" value="{{ choice }}" data-collection-id={{ collection.id }} >{{ choice.label }}</a>
{% endfor %}
</div>
<br>
<!-- <small class="muted">Base URL: <a href="{{ collection.url }}" target="_blank">{{ collection.url }}</a></small> -->
</h3>

<div>

<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="nav-item">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,5 @@ <h5 class="modalTitle" id="hideShowColumnsModalTitle">Customize Columns</h5>
<script src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
<script src="//cdn.datatables.net/v/bs4/jszip-3.10.1/dt-2.0.5/af-2.7.0/b-3.0.2/b-colvis-3.0.2/b-html5-3.0.2/b-print-3.0.2/cr-2.0.1/fc-5.0.0/fh-4.0.1/kt-2.12.0/r-3.0.2/rg-1.5.0/rr-1.5.0/sc-2.4.1/sp-2.3.1/sl-2.0.1/datatables.min.js"></script>
<script src="{% static 'js/collection_list.js' %}"></script>
<script src="{% static 'js/project.js' %}"></script>
{% endblock javascripts %}

0 comments on commit 18fcebb

Please sign in to comment.