admin.html 6.62 KB
Newer Older
Administrator committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
{% extends "base.html" %}
{% load static %}

{% block additionnal_css %}
<link rel="stylesheet" href="{% static 'css/datatables/datatables.min.css' %}">
<link rel="stylesheet" href="{% static 'css/datatables/responsive.min.css' %}">
<link rel="stylesheet" href="{% static 'css/shop_admin.css' %}">
<link rel="stylesheet" href="{% static 'jquery-ui-1.12.1/jquery-ui.min.css' %}">

{% endblock %}

{% block additionnal_scripts %}
  <script type="text/javascript" src="{% static 'jquery-ui-1.12.1/jquery-ui.min.js' %}"></script>
  <script type="text/javascript" src="{% static 'js/download.js' %}"></script>
  <script type="text/javascript" src="{% static 'js/datatables/datatables.min.js' %}"></script>
  <script type="text/javascript" src="{% static 'js/datatables/datatables.customized_cellEdit.js' %}"></script>
  <script type="text/javascript" src="{% static 'js/datatables/datatables.responsive.min.js' %}"></script>
  <script type="text/javascript" src="{% static 'js/datatables/datatables.buttons.min.js' %}"></script>
  <script type="text/javascript" src="{% static 'js/datatables/dom_sort.js' %}"></script>
  <script type="text/javascript" src="{% static 'js/datatables/buttons.html5.min.js' %}"></script>

{% endblock %}

{% block content %}
  {% include "common/conn_admin.html" %}
  <div id="main-msg-area"  style="float:left;">
    <div class="grid-4 has-gutter" style="max-width: 500px; width: 500px;">
      <div class="new">
        <span style="padding-left:2px;"></span>
      </div>
      <div class="update">
        <span style="padding-left:2px;"></span>
      </div>
      <div class="delete">
        <span style="padding-left:2px;"></span>
      </div>
      <div>
        <button id="download-arrivals" type="button" class="btn--primary fr"><i class="fa fa-download" aria-hidden="true"></i></button>
      </div>
    </div>

  </div>
  <div class="header txtcenter">
    <h1>Gestion des commandes en ligne</h1>
    <span class="max-carts-per-slot"><span class="nb">{{max_per_slot}}</span> commande(s) max. par créneau de <span class="slot-size">{{slot_size}}</span> minutes</span>
  </div>

  <section class="tabs autogrid">
    <div class="button tab active" id="tab_orders"><h5>Commandes</h5></div>
    <div class="button tab" id="tab_settings"><h5>Réglages</h5></div>
  </section>

  <div id="tab_orders_content" class="tab_content">
    <div id="multiple_actions_container" style="display:none;">
      <p>Action groupée :
        <select class="" id="batch_action_select">
          <option value="none" selected="selected"></option>
          <option value="delete">Supprimer</option>
        </select>
        <button id="batch_action" class="btn--primary">C'est parti !</button>
      </p>
    </div>
    <div id="main-content">
      <table class="orders" class="display" width="95%" cellspacing="0" ></table>
    </div>
  </div>

  <div id="tab_settings_content" class="tab_content" style="display:none;">
    <div id="shop_settings_content">
      <div id="capital_message">
        <h4>Message important (page connexion et boutique)</h4>
        <div class="change">
          <label for="capital_message">Texte</label>
          <textarea name="capital_message" cols="80" rows="5" wrap="hard"></textarea>
          <button type="button" class="btn--primary" id="save_capital_message">Enregistrer</button>
        </div>
        <hr />
      </div>
      <div id="settings_max_orders_per_slot">
        <h4>Nombres max. de commandes par créneau</h4>
        <div class="change">
          <label for="closing_date_picker">Nouvelle valeur : </label>
          <input type="number" step="1" name="new_max_orders_per_slot" />
          <button type="button" class="btn--primary" id="save_max_orders_ps">Enregistrer</button>
        </div>
        <hr />
      </div>
      <div id="settings_shop_closed">
        <h4>Dates auxquelles le magasin sera fermé :</h4>
        <div class="no_dates">
          <p> - Aucune date enregistrée - </p>
        </div>
        <div class="dates" style="display:none;">
          <p><i>(Format de la date : année-mois-jour)</i></p>
          <ul class="dates_list">
          </ul>
        </div>
        <div id="shop_closed_selector">
          <label for="closing_date_picker">Nouvelle date : </label>
          <input type="text" name="closing_date_picker" id="closing_date_picker">
          <button type="button" class="btn--primary" id="add_closing_date">Ajouter</button>
        </div>

      </div>
    </div>
  </div>


  <div id="templates" style="display:none;">
    <img src="/static/img/Pedro_luis_romani_ruiz.gif" id="rotating_loader"/>

    <div class="cart-details">
      <h2>Commande de <span class="member"></span></h2>
      <table class="cart" border=1>
        <tr>
          <th>Articles</th>
          <th>Quantités</th>
          <th>Prix</th>
        </tr>
      </table>

    </div>
    <div class="get-cart-ref">
      <h2>Commande de <span class="member"></span></h2>
      <i>Passée le <span class="date" style="font-weight: bold;"></span> <span class="bdate"></span></i><br/>
      <input type="text" placeholder="Réfence panier en attente" name="internal-ref" />
    </div>
    <div class="destroy-cart-msg">
      <h2>Commande de <span class="member"></span></h2>
      <i>Passée le <span class="date" style="font-weight: bold;"></span> <span class="bdate"></span></i><br/>
      Vous avez demandé de détruire l'enregistrement de la commande.<br/>
      Si vous le confirmez, l'action sera irreversible.
    </div>
    <div class="destroy-multiple-carts-msg">
      <div class="items">
      </div>
      Vous avez demandé de détruire l'enregistrement de ces commandes.<br/>
      Si vous le confirmez, l'action sera irreversible.
    </div>
    <div class="destroy-multiple-carts-item">
      <h5>Commande de <span class="member"></span></h5>
      <i>Passée le <span class="date" style="font-weight: bold;"></span> <span class="bdate"></span></i>
      <hr/>
    </div>
    <div class="remove-closing-date-msg">
      <p>Vous vous apprêtez à supprimer cette date des jours de fermeture du magasin :
      <b><span class="confirm_closing_date"></span></b>.</p>
      <p>Êtes-vous sûr ?</p>
    </div>
  </div>
  <script src='{% static "js/pouchdb.min.js" %}'></script>
  <script type="text/javascript">
    var couchdb_dbname = '{{db}}';
    var couchdb_server = '{{couchdb_server}}' + couchdb_dbname;
    var dbc = new PouchDB(couchdb_dbname);
    var sync = PouchDB.sync(couchdb_dbname, couchdb_server, {
      live: true,
      retry: true,
      auto_compaction: false
    });
  </script>
162 163
  <script src='{% static "js/all_common.js" %}?v=1651853225'></script>
  <script src='{% static "js/shop_admin.js" %}?v=1651853225'></script>
Administrator committed
164 165 166


{% endblock %}