Skip to content

Commit

Permalink
Add a column in bound table
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehuynh205 committed Feb 4, 2022
1 parent b8bccc1 commit 12e54bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ className: 'select-checkbox',
{data: 'select'},
{data: 'id'},
{data: 'PID'},
{data: 'redirect'},
//{data: 'LOCAL_ID'},
{data: 'ark_url'},
{data: 'metadata'},
Expand Down Expand Up @@ -313,21 +314,21 @@ className: 'select-checkbox',
orderable: false,
targets: 4
},
/*{
{
"targets": 3,
"data": "LOCAL_ID",
"data": "redirect",
"render": function (data, type, row) {
if (data) {
return data;
} else {
return " ";
return "0";
}

}
},*/
},

{
"targets": 4,
"targets": 5,
"data": "metadata",
"render": function (data, type, row) {
if (data !== undefined && data.indexOf("|") != -1) {
Expand All @@ -348,7 +349,7 @@ className: 'select-checkbox',
}
},
{
"targets": 3,
"targets": 4,
"data": "ark_url",
"render": function (data, type, row) {
data.sort();
Expand Down Expand Up @@ -1337,6 +1338,7 @@ function processPostSuccess(index, csvResult, data) {
<th></th>
<th>Ark ID</th>
<th>PID</th>
<th>Number <br />of Redirects</th>
<!-- <th>LOCAL_ID</th>-->
<th>Ark URL</th>
<th>Metadata</th>
Expand Down
2 changes: 2 additions & 0 deletions admin/rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ function selectBound()
$r['PID'] = (!empty($column['_value'])) ? $column['_value'] : ' ';
if ($key_data[1] == "LOCAL_ID")
$r['LOCAL_ID'] = (!empty($column['_value'])) ? $column['_value'] : ' ';
if ($key_data[1] == "REDIRECT")
$r['redirect'] = (!empty($column['_value'])) ? $column['_value'] : ' ';
$r['metadata'] = (!empty($r['metadata']) ? $r['metadata'] . "|" : "") . $key_data[1] .':' .$column['_value'];

// check if server have https://, if not, go with http://
Expand Down

0 comments on commit 12e54bc

Please sign in to comment.