<!DOCTYPE html>
<html lang="fa" dir="rtl">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Cuba admin is super flexible, powerful, clean &amp; modern responsive bootstrap 5 admin template with unlimited possibilities.">
    <meta name="keywords" content="admin template, Cuba admin template, dashboard template, flat admin template, responsive admin template, web app">
    <meta name="author" content="pixelstrap">
    <link rel="icon" href="../../../adminassets/images/favicon.png" type="image/x-icon">
    <link rel="shortcut icon" href="../../../adminassets/images/favicon.png" type="image/x-icon">
    <title>آنسه</title>
    <!-- Google font-->
    <link href="https://fonts.googleapis.com/css?family=Rubik:400,400i,500,500i,700,700i&amp;display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900&amp;display=swap" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/font-awesome.css">
    <!-- ico-font-->
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/vendors/icofont.css">
    <!-- Themify icon-->
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/vendors/themify.css">
    <!-- Flag icon-->
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/vendors/flag-icon.css">
    <!-- Feather icon-->
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/vendors/feather-icon.css">
    <!-- Plugins css start-->
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/vendors/scrollbar.css">
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/vendors/prism.css">
    <!-- Plugins css Ends-->
    <!-- Bootstrap css-->
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/vendors/bootstrap.css">
    <!-- App css-->
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/style.css">
    <link id="color" rel="stylesheet" href="../../../adminassets/css/color-1.css" media="screen">
    <!-- Responsive css-->
    <link rel="stylesheet" type="text/css" href="../../../adminassets/css/responsive.css">
  </head>
  <body class="rtl">
    <!-- tap on top starts-->
    <div class="tap-top"><i data-feather="chevrons-up"></i></div>
    <!-- tap on tap ends-->
    <!-- page-wrapper Start-->
    <div class="page-wrapper compact-wrapper" id="pageWrapper">
      <!-- Page Header Start-->

        <%- include('../../partials/header') %>

        <!-- Page Sidebar Ends-->
        <div class="page-body">
          <div class="container-fluid">
            <div class="page-title">
              <div class="row">
                <div class="col-6">
                  <h3>مدیریت دسته بندی پروژه
                     <% if(parent !== null){ %>
                      <%= parent.Name %>
                     <% } %>

                    </h3>
                </div>
                <div class="col-6">
                  <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="index.html"><i data-feather="home"></i></a></li>
                    <li class="breadcrumb-item">پروژه ها</li>
                    <li class="breadcrumb-item active"> دسته بندی پروژه ها</li>
                  </ol>
                </div>
              </div>
            </div>
          </div>
          <!-- Container-fluid starts-->
          <!-- Container-fluid starts-->
          <div class="container-fluid">
            <div class="row">
              <div class="col-sm-12 col-xl-12">
                <div class="row">
                  <div class="col-sm-10" style="margin:0 auto">
                    <div class="card">
                      <div class="card-header">
                        <h5>ثبت انواع پروژه در سامانه آنسه</h5><span>برای مشاهده لیست پروژه ها میتوانید از  <a href="../../project/admin/list">اینجا </a> کلیک کنید</span>
                      </div>
                      <div class="card-body">
                       <form class="form-space theme-form row" action="/projectType/admin/add" method="post">
                          <div class="col-sm-6">
                            <label class="form-label"> نام دسته‌بندی</label>
                            <input class="form-control" name="Name" id="Name" type="text" placeholder="نام دسته بندی">
                          </div>

                           <% if(parent !== null){ %>
                             <div class="col-sm-6" style="display:none">
                               <input  class="form-control" name="Parent" value="<%= parent._id %>" id="Parent" type="text">
                             </div>
                           <% } %>

                          <div class="col-sm-6">
                            <label class="form-label"> توضیحات</label>
                            <input class="form-control" name="Caption" id="Caption" type="text" placeholder="توضیحات">
                          </div>

                          <div class="col-sm-6">
                              <label class="form-label"> نوع نمایش</label>
                          <select  name="Parts" id="Parts" class="form-select form-control-lg">
                            <option value="0">داخلی</option>
                            <option value="1">نمایش عمومی</option>
                          </select>
                        </div>

                      <div class="col-sm-6">
                          <label class="form-label"> دسته بندی پیش فرض </label>
                      <select  name="Default" id="Default" class="form-select form-control-lg">
                        <option value="0"> دسته بندی پیش فرض نیست</option>
                        <option value="1">دسته بندی پیش فرض هست</option>
                      </select>
                    </div>
                         <div class="card-footer text-end">
                        <button class="btn btn-primary" type="submit">ثبت دسته بندی</button>
                          <a href="https://amarify.com/projectType/admin/list" class="btn btn-secondary">بازگشت</a>
                        <a href="../../project/admin/list" class="btn btn-success">مشاهده پروژه ها</a>
                      </div>
                        </form>
                      </div>

                    </div>
                  </div>
                </div>
              </div>
                 <div class="col-sm-12">
                <div class="card">
                  <div class="card-header">
                    <h5>مشاهده لیست دسته بندی پروژه ها آنسه </h5>
                  </div>
                  <div class="table-responsive">
                    <table class="table">
                      <thead>
                        <tr class="border-bottom-primary" style="text-align:center">
                          <th scope="col">#</th>
                          <th scope="col"> نام دسته بندی</th>
                          <th scope="col">توضیحات</th>
                          <th scope="col">وضعیت</th>
                          <th scope="col">مدیریت زیردسته ها</th>
                          <th scope="col">تصاویر</th>
                          <th scope="col">ویرایش</th>
                          <th scope="col">حذف</th>
                        </tr>
                      </thead>
                      <tbody>
                      <% for (var i = 0; i < projectTypes.length; i++) { %>
                        <tr class="border-bottom-info" style="text-align:center">
                          <th scope="row"><%= i+1 %></th>
                          <td><%= projectTypes[i].Name %></td>
                          <td><%= projectTypes[i].Caption %></td>
                          <td><a class="btn btn-pill btn-outline-warning btn-sm">فعال</a></td>
                         <td><a href="/projectType/admin/get/<%= projectTypes[i]._id %>" class="btn btn-square btn-info-gradien"><i class="fa fa-sitemap"></i></a></td>
                         <td><a href="/projectType/admin/uploadimage/<%= projectTypes[i]._id %>" class="btn btn-square btn-primary-gradien"><i class="fa-regular fa-image"></i></a></td>
                         <td><a href="/projectType/admin/edit/<%= projectTypes[i]._id %>" class="btn btn-square btn-primary-gradien"><i class="fa fa-edit"></i></a></td>
                         <td><a href="/projectType/admin/remove/<%= projectTypes[i]._id %>" class="btn btn-square btn-success-gradien"><i class="fa fa-trash-o"></i></a></td>
                             <% } %>

                        </tr>

                      </tbody>
                    </table>
                    <nav aria-label="...">
                      <ul class="pagination pagination-primary m-3">
                        <li class="page-item"><a class="page-link" href="javascript:void(0)">بعدی</a></li>
                        <li class="page-item"><a class="page-link" href="javascript:void(0)">3</a></li>
                        <li class="page-item "><a class="page-link" href="javascript:void(0)">2 <span class="sr-only">(current)</span></a></li>
                        <li class="page-item active"><a class="page-link" href="javascript:void(0)">1</a></li>
                        <li class="page-item disabled"><a class="page-link" href="javascript:void(0)" tabindex="-1">قبلی</a></li>
                      </ul>
                    </nav>
                  </div>
                </div>
              </div>

          </div>

          </div>
          <!-- Container-fluid Ends-->

          <!-- Container-fluid Ends-->
        </div>
        <!-- footer start-->
        <footer class="footer">
          <div class="container-fluid">
            <div class="row">
              <div class="col-md-12 footer-copyright text-center">
                <p class="mb-0">Copyright 2021 © by AliFatahi  </p>
              </div>
            </div>
          </div>
        </footer>
      </div>

    <!-- latest jquery-->
    <script src="../../../adminassets/js/jquery-3.5.1.min.js"></script>
    <!-- Bootstrap js-->
    <script src="../../../adminassets/js/bootstrap/bootstrap.bundle.min.js"></script>
    <!-- feather icon js-->
    <script src="../../../adminassets/js/icons/feather-icon/feather.min.js"></script>
    <script src="../../../adminassets/js/icons/feather-icon/feather-icon.js"></script>
    <!-- scrollbar js-->
    <script src="../../../adminassets/js/scrollbar/simplebar.js"></script>
    <script src="../../../adminassets/js/scrollbar/custom.js"></script>
    <!-- Sidebar jquery-->
    <script src="../../../adminassets/js/config.js"></script>
    <!-- Plugins JS start-->
    <script src="../../../adminassets/js/sidebar-menu.js"></script>
    <script src="../../../adminassets/js/prism/prism.min.js"></script>
    <script src="../../../adminassets/js/clipboard/clipboard.min.js"></script>
    <script src="../../../adminassets/js/custom-card/custom-card.js"></script>
    <script src="../../../adminassets/js/tooltip-init.js"></script>
    <!-- Plugins JS Ends-->
    <!-- Theme js-->
    <script src="../../../adminassets/js/script.js"></script>
    <!-- login js-->
    <!-- Plugin used-->
  </body>
</html>
