|
|
|
@ -69,16 +69,17 @@ function initTable() {
|
|
|
|
|
} |
|
|
|
|
}}, |
|
|
|
|
{targets: 6, createdCell: function (td, cellData, rowData) { |
|
|
|
|
var name = htmlEscape(rowData.name); |
|
|
|
|
var update_btn = '<a href="{% url "terminal:terminal-update" pk=DEFAULT_PK %}" class="btn btn-xs btn-info">{% trans "Update" %}</a>' |
|
|
|
|
.replace('{{ DEFAULT_PK }}', cellData); |
|
|
|
|
var delete_btn = '<a class="btn btn-xs btn-danger m-l-xs btn-del" data-id="{{ DEFAULT_PK }}" data-name="99991938">{% trans "Delete" %}</a>' |
|
|
|
|
.replace('{{ DEFAULT_PK }}', cellData) |
|
|
|
|
.replace('99991938', rowData.name); |
|
|
|
|
.replace('99991938', name); |
|
|
|
|
var accept_btn = '<a class="btn btn-xs btn-primary btn-accept" data-id="{{ DEFAULT_PK }}">{% trans "Accept" %}</a> ' |
|
|
|
|
.replace('{{ DEFAULT_PK }}', cellData); |
|
|
|
|
var reject_btn = '<a class="btn btn-xs btn-danger m-l-xs btn-del" data-id="{{ DEFAULT_PK }}" data-name="99991938">{% trans "Reject" %}</a>' |
|
|
|
|
.replace('{{ DEFAULT_PK }}', cellData) |
|
|
|
|
.replace('99991938', rowData.name); |
|
|
|
|
.replace('99991938', name); |
|
|
|
|
if (rowData.is_accepted) { |
|
|
|
|
$(td).html(update_btn + delete_btn); |
|
|
|
|
} else { |
|
|
|
|