Sindbad~EG File Manager
{% if data %}
<div class="container py-3">
<div class="table-responsive mobile-responsive">
<table class="table table-bordered table-striped" id="save_table1">
<thead class="text-center thead-dark">
<th scope="col">ORDER NO</th>
<th scope="col">INSTRUCTOR DETAILS</th>
<th scope="col">TOPIC</th>
<th scope="col">DURATION</th>
<th scope="col">INSTRUCTOR AGE</th>
<th scope="col"></th>
</thead>
{% for i in data %}
<tbody class="text-center">
<tr>
<td data-label="ORDER NO">{{i.order_no or '' }}</td>
<td data-label="INSTRUCTOR DETAILS">{{i.full_name or '' }} ({{i.membership_no or 'Non-Member' }}), {{i.email or '' }}, {{i.mobile or '' }}</td>
<td data-label="TOPIC">{{i.topic or '' }}</td>
<td data-label="DURATION">{{i.duration or '' }}</td>
<td data-label="INSTRUCTOR AGE">{{i.misc1 or '' }}</td>
<td data-label="EDIT,DELETE,ADD TOPIC">
<button class="btn btn-primary btn-sm addtopicbtn" title="Add Topic" type="button" value="{{i.user_id or '' }}"><i class="fa fa-plus"> Add More Topic </i></button>
<div class="mt-2">
<button class="btn btn-primary" title="Edit" onclick="return editbtn({{i.topic_id or '' }})"><i class="fa fa-pencil"></i></button>
<button class="btn btn-primary deletebtn" title="Delete" type="button" value="{{i.topic_id or '' }}"><i class="fa fa-trash"></i></button>
</div>
</td>
</tr>
{% endfor %}
<tr>
<td colspan="3" style="text-align: center;">Total duration(include panel discussion : {{data[0].panel_discussion or '' }} Mins)</td>
<td data-label="DURATION">{{total_duration or '' }} Mins</td>
<td colspan="2"></td>
</tr>
</tbody>
</table>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-12 text-center" {% if limit == 1 %} hidden {% endif %} >
<input type="button" name="cheifinst" id="cheifinst" class="btn btn-danger mr-2 mt-1" value="Add a topic to Chief Instructor" />
<input type="button" name="searchcoins" id="searchcoins" class=" btn btn-danger ml-2 mt-1" value="Click here to search for a co-instructor" />
</div>
</div>
<div class="row mt-5">
<div class="col-md-7 col-sm-12 ">
<label> <b>PANEL DISCUSSION/AUDIENCE INTERACTION (If any) :</b></label>
</div>
<div class="col-md-3 col-sm-12 form-group ">
<input type="text" maxlength="2" name="panel_discussion" id="panel_discussion" class="form-control p-1" value="{{panel_discussion.panel_discussion or 0 }}" />
</div>
<div class="col-md-2">
{% if panel_discussion.panel_discussion %}<span style="color: #00166B;">Mins</span>{% endif %}
</div>
<input type="hidden" name="total_duration" id="total_duration" value="{{total_duration or 0 or '' }}" />
<input type="hidden" name="duration_db" id="duration_db" value="{{duration_db or '' }}">
<input type="hidden" name="conf_id" id="conf_id" value="{{ conf_id }}">
<input type="hidden" name="conf_key" id="conf_key" value="{{ conf_key }}">
</div>
{% block script %}
<script type="text/javascript">
var abs_type = $("#abs_type").val();
$("#searchcoins").click(function () {
$("#searchcoinst").modal('show');
});
$("#cheifinst").click(function () {
var user_id = $("#chief_user_id").val();
var conf_id = $("#conf_id").val();
var conf_key = $("#conf_key").val();
$.ajax({
type: "GET",
url: BaseUrl +"/step3model/"+abs_type+"/"+conf_id+"/"+conf_key,
data: {'searchvalue':user_id,'abs_type':"IC" },
dataType: "html",
success: function (data) {
// alert(data);
$("#demo_modal").modal("show");
$("#over_duration").hide();
$("#modal_body_1").html(data);
// $("#addcoinst").modal('show');
},
});
});
var BaseUrl = document.location.origin;
var conf_id = $("#conf_id").val();
var conf_key = $("#conf_key").val();
var total_duration = $("#total_duration").val();
var duration_1 = $("#duration_db").val();
if (total_duration >= duration_1) {
$("#buttons").hide();
} else {
$("#buttons").show();
}
$(document).ready(function () {
$(".deletebtn").click(function () {
var topic_id = $(this).val();
var r = confirm("confirm to delete!");
if (r == true) {
$.ajax({
type: "GET",
url: BaseUrl +"/step3deleteauthor/"+conf_id+"/"+conf_key,
data: {
'topic_id': topic_id,
},
dataType: "json",
success: function (data) {
getauthordata();
},
});
} else {
}
});
$(".addtopicbtn").click(function() {
var user_id = $(this).val();
var conf_key = $("#conf_key").val();
var conf_id = $("#conf_id").val();
$.ajax({
type: 'GET',
url: BaseUrl +"/step3model/"+abs_type+"/"+conf_id+"/"+conf_key,
data: {'searchvalue':user_id,'abs_type':"IC" },
dataType: 'html',
success: function(data) {
$("#demo_modal").modal('show');
$("#modal_body_1").html(data);
}
})
return false;
})
$("#panel_discussion").on("change", function () {
var panel_discussion_val = $("#panel_discussion").val();
var duration = 0;
// alert("panel_discussion")
get_total_duration(panel_discussion_val, duration);
});
function get_total_duration(panel_discussion_val, duration) {
var abs_id = $("#abs_id").val();
var panel_discussion_val = panel_discussion_val;
var duration = duration;
// alert(duration)
$.ajax({
type: "GET",
url: BaseUrl +"/total_duration/"+abs_type+"/"+conf_id+"/"+conf_key,
data: {
abs_id: abs_id,
panel_discussion: panel_discussion_val,
duration_model: duration,
},
dataType: "json",
success: function (data) {
// alert(data);
// alert(duration_1)
if (duration_1 < data) {
$("#total_duration_msg").show();
}
else {
$("#total_duration_msg").hide();
getauthordata();
}
},
});
}
function getauthordata() {
var abs_id = $("#abs_id").val();
$.ajax({
type: "GET",
url: BaseUrl +"/step3getauthor/"+abs_type+"/"+conf_id+"/"+conf_key,
data: {
abs_id: abs_id,abs_type:"IC"
},
dataType: "html",
success: function (data,data1,panel_discussion) {
$("#save_table").html(data);
},
});
}
});
function editbtn(topic_id) {
// alert("in editbtn")
// alert(topic_id)
$.ajax({
type: "GET",
url: BaseUrl +"/step3editauthor/"+abs_type+"/"+conf_id+"/"+conf_key,
data: {
topic_id: topic_id,
},
dataType: "html",
success: function (data) {
$("#demo_modal").modal('show');
$("#modal_body_1").html(data);
// alert(data)
},
});
return false;
}
</script>
{% endblock %}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists