Skip to content

Commit e56ac20

Browse files
added column
1 parent 8de1210 commit e56ac20

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

sde_indexing_helper/static/js/candidate_url_list.js

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -256,38 +256,38 @@ function initializeDataTable() {
256256
getScrapedTitleColumn(),
257257
getGeneratedTitleColumn(),
258258
getDocumentTypeColumn(),
259-
//getDivisionColumn(),
259+
getDivisionColumn(),
260260
{ data: "id", visible: false, searchable: false },
261261
{ data: "generated_title_id", visible: false, searchable: false },
262262
{ data: "match_pattern_type", visible: false, searchable: false },
263263
{ data: "candidate_urls_count", visible: false, searchable: false },
264264
{ data: "excluded", visible: false, searchable: false },
265-
// {
266-
// data: null,
267-
// render: function (data, type, row) {
268-
// if (!row.document_type) return "Select";
269-
// return dict[row.document_type];
270-
// },
271-
// visible: false,
272-
// },
273-
// {
274-
// data: null,
275-
// render: function (data, type, row) {
276-
// const excludedDict = {
277-
// true: "Yes",
278-
// false: "No",
279-
// };
280-
// return excludedDict[row.excluded];
281-
// },
282-
// visible: false,
283-
// },
284-
// {
285-
// data: null,
286-
// render: function (data, type, row) {
287-
// return row.generated_title;
288-
// },
289-
// visible: false,
290-
// },
265+
{
266+
data: null,
267+
render: function (data, type, row) {
268+
if (!row.document_type) return "Select";
269+
return dict[row.document_type];
270+
},
271+
visible: false,
272+
},
273+
{
274+
data: null,
275+
render: function (data, type, row) {
276+
const excludedDict = {
277+
true: "Yes",
278+
false: "No",
279+
};
280+
return excludedDict[row.excluded];
281+
},
282+
visible: false,
283+
},
284+
{
285+
data: null,
286+
render: function (data, type, row) {
287+
return row.generated_title;
288+
},
289+
visible: false,
290+
},
291291
// ...(is_multi_division === 'true' ? [getDivisionColumn()] : []),
292292
// getDivisionColumn(),
293293
],
@@ -829,6 +829,7 @@ function getDivisionColumn() {
829829
return {
830830
data: "division",
831831
width: "10%",
832+
visible: ((is_multi_division)? 'true' : 'false'), searchable: is_multi_division,
832833
render: function (data, type, row) {
833834
let button_text = data ? divisionDict[data] : "Select";
834835
let button_color = data ? "btn-success" : "btn-secondary";

0 commit comments

Comments
 (0)