{% extends 'stela_control/base_list.html' %}
{% load static %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block bsCall %}

{% endblock  %}

{% block title %}
            <h1 class="oxanium mx-4 text-dark pt-3">{% trans "Reviews" %} <i class="fa-solid fa-ranking-star"></i></h1>
{% endblock  %}

{% block side_title %}
            <h3 class="oxanium mx-4 d-flex justify-content-end"><b>STELA {% trans "CONTROL DYNAMIC" %} | {% trans "Operations" %}</b></h3>
{% endblock  %}

{% block topButtons %}
    <div class="col-lg-2 col-md-6">
        <button type="submit" data-bs-toggle="modal" data-bs-target="#removeObj" onclick="removeObjListRequest('Reviews')" class="btn btn-danger btn-danger px-3 mb-3 mx-2 delete-product hide" id="delete_btn">{% trans "Remove" %} <i class="fas fa-trash"></i></button>
    </div>
{% endblock  %}
{% block listTitle %}
        <h3 class="text-center fw-bold oxanium fs-4 my-2">{% trans "Reviews List" %}</h3>
{% endblock  %}

{% block thead %}
    <th style="width: 5%;">Id</th>
    <th style="width: 35%;">User</th>
    <th style="width: 20%;" class="text-center">Status</th> 
    <th style="width: 10%;">{% trans "View" %}</th>
    <th style="width: 10%;" class="text-center"> <input type="checkbox"  name="" id="parent"></th>   
{% endblock  %} 

{% block tbody %}
    {% for item in reviews %}
    <tr>
        <th scope="row">{{item.id}}</th>
        <td>{{item.user.username}}</td>
        {% if item.status == 'Draft' %}
            <td class="text-center">{% trans "Check Comment" %} <i class="fa-solid fa-magnifying-glass"></i></td>
        {% else %}
            <td class="text-center">{% trans "Comment Aproved " %}<i class="fa-solid fa-circle-check text-success"></i></td>
        {% endif %}
        <td class="my-1"><button class="btn btn-shappire" onclick="loadForm('MasterReviewsForm','','Reviews','','loadBasicForm','cke_content','','{{item.pk}}')" data-bs-toggle="modal" data-bs-target="#FormSender"><i class="fa-solid fa-right-to-bracket"></i></button></td>
        <td class="text-center check-product"><input type="checkbox" class="child" name="product_id[]" value="{{item.id}}" id="delete_product"></td>
    </tr>
    {% endfor %}
{% endblock  %}








