| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 | {% extends "layout/backend.j2" %}{% block content %}<h1>Backend</h1><div class="row">    <div class="col-sm">        <div class="card">            <div class="card-header">                Pages            </div>            <div class="card-body">                <table class="table table-striped table-sm">                    <thead>                        <tr>                            <th>Action</th>                            <th>Title</th>                            <th>Author</th>                        </tr>                    </thead>                    <tbody>                        {%- for page in pages recursive -%}                        <tr>                            <td>                                <div class="btn-group">                                    <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">                                        Action                                    </button>                                    <div class="dropdown-menu">                                        <a class="dropdown-item" href="{{ url_for('backend_page.view', page_id=page.id) }}">View</a>                                        <a class="dropdown-item" href="{{ url_for('backend_page.edit', page_id=page.id) }}">Edit</a>                                        <a class="dropdown-item" href="{{ url_for('backend_page.remove', page_id=page.id) }}">Remove</a>                                    </div>                                </div>                            </td>                            <td>                                {{ '> ' * (loop.depth - 1) }}<a href="{{ url_for('backend_page.view', page_id=page.id) }}">                                    {{ page.title if page.title else 'page %s' % page.id }}                                </a>                            </td>                            <td>{{ page.user.name }}</td>                        </tr>                        {{ loop(page.children) }}                        {%- endfor -%}                    </tbody>                </table>            </div>        </div>    </div>    <div class="col-sm">        <div class="card">            <div class="card-header">                Files            </div>            <div class="card-body">                <table class="table table-striped table-sm">                    <thead>                        <tr>                            <th>Action</th>                            <th>Title</th>                            <th>Author</th>                        </tr>                    </thead>                    <tbody>                        {% for file in files %}                        <tr>                            <td>                                <div class="btn-group">                                    <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">                                        Action                                    </button>                                    <div class="dropdown-menu">                                        <a class="dropdown-item" href="{{ url_for('backend_file.view', file_id=file.id) }}">View</a>                                        <a class="dropdown-item" href="{{ url_for('backend_file.edit', file_id=file.id) }}">Edit</a>                                        <a class="dropdown-item" href="{{ url_for('backend_file.remove', file_id=file.id) }}">Remove</a>                                    </div>                                </div>                            </td>                            <td>                                <a href="{{ url_for('backend_file.view', file_id=file.id) }}">                                    {{ file.title if file.title else 'file %s' % file.id }}                                </a>                            </td>                            <td>{{ file.user.name }}</td>                        </tr>                        {%- endfor -%}                    </tbody>                </table>            </div>        </div>    </div></div>{% endblock %}
 |