entries.html 3.24 KB
{% extends "base.html" %}

{% load i18n %}
{% load static %}
{% load crispy_forms_tags %}

{% block title %}Hasła{% endblock %}

{% block styles %}
    <!-- for autocomplete -->
    <link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
    <!--link rel="stylesheet" type="text/css" href="{% static 'entries/css/panels.css' %}"-->
    <link rel="stylesheet" type="text/css" href="{% static 'entries/css/entries.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'common/css/role_colours.css' %}">
{% endblock %}

{% block scripts %}
    <script src="{% static 'common/js/csrf.js' %}"></script>
    <!--script src="{% static 'entries/js/panels.js' %}"></script-->
    <script src="{% static 'entries/js/entries.js' %}"></script>
{% endblock %}

{% block content %}

<!--TODO remove or remodel status and warning-->

<!--div class="card info bg-dark border-0" id="status">
    <div class="card-body"></div>
</div>

<div class="card info" id="warning">
    <div class="card-body bg-warning"></div>
</div-->

<div class="row h-100">
    <!-- left panel: list of entries -->
    <div id="entries-list" class="col-2 h-100 px-0 overflow-auto border-right border-primary">
        <button type="button" id='filter-button' class="btn btn-primary" data-toggle="modal" data-target="#entry-filters">
            {% trans "Filtrowanie" %}
        </button>
        {% include "entries_list.html" %}
    </div>
    
    <!-- right panel: entry display (syntax, semantics, examples) -->
    <div class="col h-100">
        <div id="entry-display" class="container-fluid h-75 overflow-auto">
            {% include "entry_display.html" %}
        </div>
        <div id="examples-display" class="row h-25 overflow-auto border-top border-primary">
            <table id="examples-table" class="table table-sm table-hover table-responsive">
                <thead>
                    <tr>
                        <th scope="col">{% trans "Przykład" %}<i id="examples-argument"></i><i id="examples-schema"></i></span></th>
                        <th scope="col">{% trans "Źródło" %}</th>
                        <th scope="col">{% trans "Opinia" %}</th>
                    </tr>
                </thead>
                <tbody id="examples-list">
                </tbody>
            </table>
            <p class="mx-1 my-1"id="no-examples">{% trans "Brak przykładów" %}</p>
        </div>
    </div>
</div>

<div class="modal fade" id="entry-filters" tabindex="-1" role="dialog" aria-labelledby="entry-filtersLabel" aria-hidden="true">
  <div class="modal-dialog modal-xl" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="entry-filtersLabel">{% trans "Filtrowanie haseł" %}</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        {% crispy entries_form %}
      </div>
      <!--div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div-->
    </div>
  </div>
</div>

{% endblock %}