mirror of https://github.com/gophish/gophish
add condition to show completed date only for archived campaign
parent
2aa0a725e0
commit
78aa421f89
|
@ -381,7 +381,6 @@ $(document).ready(function () {
|
||||||
var row = [
|
var row = [
|
||||||
escapeHtml(campaign.name),
|
escapeHtml(campaign.name),
|
||||||
moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a'),
|
moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a'),
|
||||||
moment(campaign.completed_date).format('MMMM Do YYYY, h:mm:ss a'),
|
|
||||||
"<span class=\"label " + label + "\" data-toggle=\"tooltip\" data-placement=\"right\" data-html=\"true\" title=\"" + quickStats + "\">" + campaign.status + "</span>",
|
"<span class=\"label " + label + "\" data-toggle=\"tooltip\" data-placement=\"right\" data-html=\"true\" title=\"" + quickStats + "\">" + campaign.status + "</span>",
|
||||||
"<div class='pull-right'><a class='btn btn-primary' href='/campaigns/" + campaign.id + "' data-toggle='tooltip' data-placement='left' title='View Results'>\
|
"<div class='pull-right'><a class='btn btn-primary' href='/campaigns/" + campaign.id + "' data-toggle='tooltip' data-placement='left' title='View Results'>\
|
||||||
<i class='fa fa-bar-chart'></i>\
|
<i class='fa fa-bar-chart'></i>\
|
||||||
|
@ -394,6 +393,7 @@ $(document).ready(function () {
|
||||||
</button></div>"
|
</button></div>"
|
||||||
]
|
]
|
||||||
if (campaign.status == 'Completed') {
|
if (campaign.status == 'Completed') {
|
||||||
|
row.splice(2, 0, moment(campaign.completed_date).format('MMMM Do YYYY, h:mm:ss a'));
|
||||||
rows['archived'].push(row)
|
rows['archived'].push(row)
|
||||||
} else {
|
} else {
|
||||||
rows['active'].push(row)
|
rows['active'].push(row)
|
||||||
|
|
Loading…
Reference in New Issue