{% block content %}
-<div class="card mt-4">
+<div class="card">
<div class="card-header">
<h1>
<a class="btn btn-light" href='{% url "catalogue_activity" prev_day.isoformat %}'><</a>
<!--#include file='/pozor.html'-->
-<nav class="navbar navbar-expand-lg bg-light ">
+<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="{% url 'catalogue_document_list' %}">
<img src="{% static "img/wl-orange.png" %}" alt="Platforma">
</a>
- <ul class="nav nav-pills mr-auto">
+ <ul class="navbar-nav mr-auto">
{% main_tabs %}
</ul>
- <ul class="nav nav-pills">
+ <ul class="navbar-nav">
{% include "catalogue/head_login.html" %}
</ul>
</nav>
-<div class="container">
+<div class="container mt-4 mb-4">
{% block content %}
<div class="row">
{% block titleextra %}{% trans "Append book" %}{% endblock %}
{% block content %}
-<div class="card mt-4">
+<div class="card">
<div class="card-body">
<form enctype="multipart/form-data" method="POST" action="">
{% csrf_token %}
</form>
-<div class="card mt-4">
+<div class="card">
<div class="card-body">
{% block content %}
-<div class="card mt-4">
+<div class="card">
<div class="card-header">
<h1>{% trans "Split chunk" %}</h1>
</div>
{% block content %}
-<div class="card mt-4">
+<div class="card">
<div class="card-header">
<h1>{% trans "Chunk settings" %}</h1>
</div>
{% extends "catalogue/base.html" %}
{% load i18n %}
+{% load bootstrap4 %}
{% block titleextra %}{% trans "Create a new book" %}{% endblock %}
{% block content %}
+<div class="card">
+ <div class="card-header">
<h1>{% trans "Create a new book" %}</h1>
+ </div>
+ <div class="card-body">
+
<form enctype="multipart/form-data" method="POST">
{% csrf_token %}
- <table class='editable'>
- {{ form.as_table}}
- <tr><td></td><td><button type="submit">{% trans "Create book" %}</button></td></tr>
- </table>
+ {% bootstrap_form form %}
+ {% buttons %}
+ <button class="btn btn-primary" type="submit">{% trans "Create book" %}</button>
+ {% endbuttons %}
</form>
+</div>
+</div>
{% endblock content %}
{% extends "catalogue/base.html" %}
{% load i18n %}
+{% load bootstrap4 %}
{% block titleextra %}{% trans "Bulk document upload" %}{% endblock %}
-{% block leftcolumn %}
+{% block content %}
+<div class="card">
+ <div class="card-header">
<h2>{% trans "Bulk documents upload" %}</h2>
+ </div>
+ <div class="card-body">
<p>
{% trans "Please submit a ZIP with UTF-8 encoded XML files. Files not ending with <code>.xml</code> will be ignored." %}
<form enctype="multipart/form-data" method="POST" action="{{ request.path }}">
{% csrf_token %}
-{{ form.as_p }}
-<p><button type="submit">{% trans "Upload" %}</button></p>
+{% bootstrap_form form %}
+{% buttons %}
+<button class="btn btn-primary" type="submit">{% trans "Upload" %}</button>
+{% endbuttons %}
</form>
-<hr/>
{% if error_list %}
+ <hr>
<p class='error'>{% trans "There have been some errors. No files have been added to the repository." %}
<h3>{% trans "Offending files" %}</h3>
</ul>
{% endif %}
+ </div>
+</div>
-{% endblock leftcolumn %}
+{% endblock content %}
-
-{% block rightcolumn %}
-{% endblock rightcolumn %}
{% extends "catalogue/base.html" %}
{% load book_list i18n %}
+{% load bootstrap4 %}
{% block titleextra %}{{ object.title }}{% endblock %}
{% block content %}
+<div class="card mt-4">
-
+ <div class="card-header">
<h1>{{ object.title }}</h1>
+ </div>
+ <div class="card-body">
{% if editable %}<form method='POST'>{% csrf_token %}{% endif %}
-<table class='editable'><tbody>
- {{ form.as_table }}
+ {% bootstrap_form form %}
{% if editable %}
- <tr><td></td><td><button type="submit">{% trans "Save" %}</button></td></tr>
+ {% buttons %}
+ <button class="btn btn-primary" type="submit">{% trans "Save" %}</button>
+ {% endbuttons %}
{% endif %}
</tbody></table>
{% if editable %}</form>{% endif %}
+ </div>
+</div>
-<div class='section'>
+<div class='card mt-4'>
+ <div class="card-header">
<h2>{% trans "Editor" %}</h2>
+ </div>
+ <div class="card-body">
- <p><a href="{% url 'wiki_img_editor' object.slug %}">{% trans "Proceed to the editor." %}</a></p>
+ <p><a class="btn btn-primary" href="{% url 'wiki_img_editor' object.slug %}">{% trans "Proceed to the editor." %}</a></p>
+</div>
</div>
-<div class='section'>
-
+<div class='card mt-4'>
+ <div class="card-header">
<h2>{% trans "Publication" %}</h2>
+ </div>
+ <div class="card-body">
<p>{% trans "Last published" %}:
{% if object.last_published %}
{% endif %}
</div>
+</div>
{% endblock content %}
<tr>
<td><input type="checkbox" name="select_chunk" value="{{image.id}}"/></td>
- <td><a href="{% url 'catalogue_image' image.slug %}" title='{% trans "Image settings" %}'>[B]</a></td>
- <td><a target="_blank"
+ <td><a href="{% url 'catalogue_image' image.slug %}" class="btn btn-sm btn-secondary"><small>{% trans "Image settings" %}</small></a></td>
+ <td><a class="btn btn-primary" target="_blank"
href="{% url 'wiki_img_editor' image.slug %}">
+ {% trans "Edit:" %}
{{ image.title }}</a></td>
<td>{% if image.stage %}
{{ image.stage }}
{% endif %}</td>
<td class='user-column'>{% if image.user %}<a href="{% url 'catalogue_user' image.user.username %}">{{ image.user|username }}</a>{% endif %}</td>
<td>
- {% if image.published %}P{% endif %}
- {% if image.new_publishable %}p{% endif %}
- {% if image.changed %}+{% endif %}
+ {% if image.published %}
+ <div><small>{% trans "published" %}</small></div>
+ {% endif %}
+ {% if image.new_publishable %}
+ <div><small>{% trans "publishable" %}</small></div>
+ {% endif %}
+ {% if image.changed %}
+ <div><small>{% trans "changed" %}</small></div>
+ {% endif %}
</td>
<td>{{ image.project.name }}</td>
</tr>
{% load pagination_tags %}
{% load username from common_tags %}
+<div class="card">
+ <div class="card-body">
<form name='filter' action='{{ request.path }}'>
<input type='hidden' name="project" value="{{ request.GET.project }}" />
</form>
-<table id="file-list"{% if viewed_user %} class="book-list-user"{% endif %}>
+<table id="file-list" class="table {% if viewed_user %}book-list-user{% endif %}">
<thead><tr>
<th></th>
<th></th>
<th class='book-search-column'>
<form>
<input title='{% trans "Search in book titles" %}' name="title"
- class='text-filter' value="{{ request.GET.title }}" />
+ class='form-control text-filter' value="{{ request.GET.title }}" />
</form>
</th>
- <th><select name="stage" class="filter">
+ <th><select name="stage" class="form-control filter">
<option value=''>- {% trans "stage" %} -</option>
<option {% if request.GET.stage == '-' %}selected="selected"
{% endif %}value="-">- {% trans "none" %} -</option>
</select></th>
{% if not viewed_user %}
- <th><select name="user" class="filter">
+ <th><select name="user" class="form-control filter">
<option value=''>- {% trans "editor" %} -</option>
<option {% if request.GET.user == '-' %}selected="selected"
{% endif %}value="-">- {% trans "none" %} -</option>
</select></th>
{% endif %}
- <th><select name="status" class="filter">
+ <th><select name="status" class="form-control filter">
<option value=''>- {% trans "status" %} -</option>
{% for state, label in states %}
<option {% if request.GET.status == state %}selected="selected"
{% endfor %}
</select></th>
- <th><select name="project" class="filter">
+ <th><select name="project" class="form-control filter">
<option value=''>- {% trans "project" %} -</option>
<option {% if request.GET.project == '-' %}selected="selected"
{% endif %}value="-">- {% trans "none" %} -</option>
</tr></thead>
- {% with cnt=objects|length %}
- {% autopaginate objects 100 %}
+ {% autopaginate objects 100 as objects_page %}
<tbody>
- {% for image in objects %}
+ {% for image in objects_page %}
{% include 'catalogue/image_short.html' %}
{% endfor %}
- <tr><th class='paginator' colspan="6">
- {% paginate %}
- {% blocktrans count c=cnt %}{{c}} image{% plural %}{{c}} images{% endblocktrans %}</th></tr>
</tbody>
- {% endwith %}
</table>
+ {% paginate %}
+ {% blocktrans count c=objects|length %}{{c}} image{% plural %}{{c}} images{% endblocktrans %}</th></tr>
{% if not objects %}
<p>{% trans "No images found." %}</p>
{% endif %}
{% endif %}value="{{ user.username }}">{{ user|username }} ({{ user.count }})</option>
{% endfor %}
</select>
+
+ </div>
+</div>
{% endblock leftcolumn %}
{% block rightcolumn %}
-<div class="card mt-4">
+<div class="card">
<div class="card-header">
<h2>{% trans "Your last edited documents" %}</h2>
</div>
{% block titleextra %}{% trans "Users" %}{% endblock %}
-{% block leftcolumn %}
+{% block content %}
+<div class="card">
+ <div class="card-header">
<h1>{% trans "Users" %}</h1>
+ </div>
+<div class="card-body">
<ul>
{% for user in users %}
{% endfor %}
</ul>
-{% endblock leftcolumn %}
+</div>
+</div>
+
+{% endblock content %}
{% block leftcolumn %}
- <h1 class="mt-4">{{ viewed_user|nice_name }}</h1>
+ <h1 class="mb-4">{{ viewed_user|nice_name }}</h1>
{% book_list viewed_user %}
{% endblock leftcolumn %}
{% block rightcolumn %}
-<div class="card mt-4">
+<div class="card">
<div class="card-header">
<h2>{% trans "Recent activity for" %} {{ viewed_user|nice_name }}</h2>
</div>
{% extends "catalogue/base.html" %}
{% load i18n %}
+{% load bootstrap4 %}
{% block titleextra %}{% trans "Add image" %}{% endblock %}
-{% block add_js %}
- {{block.super}}
- <script>
- $(function() {
- var radio_buttons = $('input[type=radio][name=upload_type]'),
- image_fields = $('.upload_type input[type=text],input[type=file]');
-
- var enable_image_field = function(field) {
- field.attr('disabled', false);
- },
- disable_image_fields = function() {
- image_fields.attr('disabled', true);
- }
-
- radio_buttons.change(function() {
- var radio_button = $(this),
- related_image_field = $('#'+radio_button.attr('data-for'));
- disable_image_fields();
- enable_image_field(related_image_field);
- });
-
- /* initial state */
- disable_image_fields();
- enable_image_field($('#id_download_url'));
- });
- </script>
-{% endblock %}
-
{% block content %}
+<div class="card mt-4 mb-4">
+ <div class="card-header">
<h1>{% trans "Add image" %}</h1>
-
+ </div>
+ <div class="card-body">
<form method="post">{% csrf_token %}
<input type="hidden" name='form_id' value="flickr" />
<table class='editable'><tbody>
- {{ ff.as_table }}
- <tr><td></td><td><button type="submit">{% trans "Load from Flickr" %}</button></td></tr>
+ {% bootstrap_form ff %}
+ {% buttons %}
+ <button class="btn btn-primary" type="submit">{% trans "Load from Flickr" %}</button>
+ {% endbuttons %}
</tbody></table>
</form>
<form method="post" enctype="multipart/form-data">{% csrf_token %}
-{{ form.non_field_errors }}
-<table class='editable'><tbody>
- {% for field in form %}
- {% if field.name != 'download_url' and field.name != 'file' %}
- <tr>
- <th>{{field.errors}} {{field.label}}</th>
- <td>{{field}}</td>
- </tr>
- {% endif %}
- {% endfor %}
- <tr class="upload_type">
- <th>{{ form.download_url.errors }} <input style="width: auto;" checked data-for="id_download_url" type="radio" name="upload_type" value="url"/>{{form.download_url.label}}</th>
- <td>{{form.download_url}}</td>
- <th>{{ form.file.errors }} <input style="width: auto;" data-for="id_file" type="radio" name="upload_type" value="file"/> Lub {{form.file.label}}</th>
- <td>{{form.file}}</td>
-
- </tr>
- <tr><td></td><td><button type="submit">{% trans "Add image" %}</button></td></tr>
-</tbody></table>
+ {% bootstrap_form form %}
+ {% buttons %}
+ <button class="btn btn-primary" type="submit">{% trans "Add image" %}</button>
+ {% endbuttons %}
</form>
+ </div>
+</div>
{% endblock %}
{% block titleextra %}{% trans "Cover images" %}{% endblock %}
{% block content %}
+<div class="card mt-4 mb-4">
+ <div class="card-header">
<h1>{% trans "Cover images" %}</h1>
+ </div>
+ <div class="card-body">
{% if can_add %}
- <a href="{% url 'cover_add_image' %}">{% trans "Add new" %}</a>
+ <a class="btn btn-primary" href="{% url 'cover_add_image' %}">{% trans "Add new" %}</a>
{% endif %}
-<ul>
+<div class="row">
{% autopaginate object_list 100 %}
{% for image in object_list %}
- <a href="{{ image.get_absolute_url }}" style="display:inline-block; width:200px;">
-
- <img style="height: 100px"
- src="{% thumbnail image.file "x100" as thumb %}
+<div class="col-md-3">
+<div class="card">
+ <a href="{{ image.get_absolute_url }}">
+ <img style="height: 100px; width: auto;" class="card-img-top" src="{% thumbnail image.file "x100" as thumb %}
{{ thumb.url }}
{% empty %}
{{ image.file.url }}
{% endthumbnail %}" />
- <br/>
- {{ image }}</a>
+ <div class="card-body">
+
+ {{ image }}
+ </div>
+</a>
+</div>
+</div>
{% endfor %}
+</div>
+
{% paginate %}
-</ul>
+ </div>
+</div>
{% endblock %}
*/
body {
- background: #eee;
+ background: #f7f7f7;
}
img {