fnp-django-pagination==2.2.4
django-gravatar2==1.4.2
django-extensions==2.1.6
+django-bootstrap4==1.0.1
sentry-sdk==0.12.2
{% block content %}
-<h1><a href='{% url "catalogue_activity" prev_day.isoformat %}'><</a>
+<div class="card mt-4">
+ <div class="card-header">
+<h1>
+ <a class="btn btn-light" href='{% url "catalogue_activity" prev_day.isoformat %}'><</a>
{% trans "Activity" %}: {{ day }}
{% if next_day %}
- <a href='{% url "catalogue_activity" next_day.isoformat %}'>></a>
+ <a class="btn btn-light" href='{% url "catalogue_activity" next_day.isoformat %}'>></a>
{% endif %}
</h1>
+ </div>
+ <div class="card-body">
{% day_wall day %}
+ </div>
{% endblock content %}
+<!DOCTYPE html>
{% load pipeline i18n %}
+{% load static %}
{% load catalogue %}
<!DOCTYPE html>
<html>
<head lang="{{ LANGUAGE_CODE }}">
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="icon" href="{{ STATIC_URL }}img/pr-icon.png" type="image/png" />
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
{% stylesheet 'catalogue' %}
<title>{% block title %}{% block titleextra %}{% endblock %} ::
{% trans "Platforma Redakcyjna" %}{% endblock title %}</title>
</head>
<body>
<!--#include file='/pozor.html'-->
-<div id="tabs-nav">
- <a href="{% url 'catalogue_document_list' %}">
- <img id="logo" src="{{ STATIC_URL }}img/wl-orange.png" alt="Platforma" />
- </a>
- <div id="tabs-nav-left">
+<nav class="navbar navbar-expand-lg bg-light ">
+ <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">
{% main_tabs %}
- </div>
+ </ul>
- <span id="login-box">
- {% include "registration/head_login.html" %}
- </span>
+ <ul class="nav nav-pills">
+ {% include "catalogue/head_login.html" %}
+ </ul>
- <div class='clr' ></div>
-</div>
+</nav>
-<div id="content">
+<div class="container">
{% block content %}
-<div id="catalogue_layout_left_column">
+<div class="row">
+<div class="col-lg-8">
{% block leftcolumn %}
{% endblock leftcolumn %}
</div>
-<div id="catalogue_layout_right_column">
+<div class="col-lg-4">
{% block rightcolumn %}
{% endblock rightcolumn %}
</div>
+</div>
{% endblock content %}
-</div>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
{% extends "catalogue/base.html" %}
{% load i18n %}
+{% load bootstrap4 %}
{% block titleextra %}{% trans "Append book" %}{% endblock %}
-{% block leftcolumn %}
+{% block content %}
+<div class="card mt-4">
+ <div class="card-body">
<form enctype="multipart/form-data" method="POST" action="">
{% csrf_token %}
- {{ form.as_p }}
-
- <p><button type="submit">{% trans "Append book" %}</button></p>
+ {% bootstrap_form form %}
+ {% buttons %}
+ <button class="btn btn-primary" type="submit">{% trans "Append book" %}</button>
+ {% endbuttons %}
</form>
-{% endblock leftcolumn %}
+ </div></div>
+{% endblock content %}
-{% block rightcolumn %}
-{% endblock rightcolumn %}
{% extends "catalogue/base.html" %}
{% load book_list i18n %}
+{% load bootstrap4 %}
{% block titleextra %}{{ book.title }}{% endblock %}
{% block content %}
-
-<h1>{{ book.title }}</h1>
+ <div class="card mt-4">
+ <div class="card-header">
+ <h1>{{ book.title }}</h1>
+ </div>
+ <div class="card-body">
+
{% if editable %}<form method='POST'>{% csrf_token %}{% endif %}
-<table class='editable'><tbody>
- {{ form.as_table }}
- {% if editable %}
- <tr><td></td><td><button type="submit">{% trans "Save" %}</button></td></tr>
+ {% bootstrap_form form %}
+ {% if editable %}
+ {% buttons %}
+ <button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
+ {% endbuttons %}
{% endif %}
-</tbody></table>
{% if editable %}</form>{% endif %}
{% if editable %}
<p><a href="{% url 'catalogue_book_gallery' book.slug %}">{% trans "Edit gallery" %}</a></p>
{% endif %}
- <p><a href="{% url 'catalogue_book_append' book.slug %}">{% trans "Append to other book" %}</a></p>
+ <p style="text-align:right"><a class="btn btn-sm btn-danger" href="{% url 'catalogue_book_append' book.slug %}">{% trans "Append to other book" %}</a></p>
{% endif %}
+ </div>
+ </div>
+ <div class="card mt-4">
+ <div class="card-header">
+ <h2>{% trans "Chunks" %}</h2>
+ </div>
+ <div class="card-body">
-<div class='section'>
-
- <h2>{% trans "Chunks" %}</h2>
-
- <table class='single-book-list'><tbody>
+ <table class='single-book-list table'><tbody>
{% for chunk in book %}
{% include 'catalogue/book_list/chunk.html' %}
{% endfor %}
</tbody></table>
-
-</div>
+ </div>
+ </div>
-<div class='section'>
+<div class='card mt-4'>
-<h2>{% trans "Publication" %}</h2>
-
-<div class="cover-preview">
+<div class="card-header">
+ <h2>{% trans "Publication" %}</h2>
+ </div>
+<div class="card-body">
+ <div class="row">
+<div class="col-lg-3">
<img class="cover-preview" src="{% url 'cover_preview' book.slug %}" />
{% if book.dc_cover_image %}
<a href="{{ book.dc_cover_image.get_absolute_url }}">{{ book.dc_cover_image }}</a>
{% endif %}
</div>
-
+<div class="col-lg-9">
<p>{% trans "Last published" %}:
{% if book.last_published %}
{{ book.last_published }}
<ul><li>{{ publishable_error }}</li></ul>
{% endif %}
-<div style="clear: both;"></div>
</div>
-
-
+ </div>
{% endblock content %}
{% with chunk as chunk %}
<tr>
<td><input type="checkbox" name="select_book" value="{{book.id}}" data-chunk-id="{{chunk.id}}"/></td>
- <td><a href="{% url 'catalogue_book' book.slug %}" title='{% trans "Book settings" %}'>[B]</a></td>
- <td><a href="{% url 'catalogue_chunk_edit' book.slug chunk.slug %}" title='{% trans "Chunk settings" %}'>[c]</a></td>
- <td><a target="_blank"
+ <td><a class="btn btn-sm btn-secondary" href="{% url 'catalogue_book' book.slug %}"><small>{% trans "Book settings" %}</small></a></td>
+ <td><a class="btn btn-sm btn-secondary" href="{% url 'catalogue_chunk_edit' book.slug chunk.slug %}"><small>{% trans "Chunk settings" %}</small></a></td>
+ <td><a class="btn btn-primary" target="_blank"
href="{% url 'wiki_editor' book.slug %}">
+ {% trans "Edit:" %}
{{ book.title }}</a></td>
<td>{% if chunk.stage %}
{{ chunk.stage }}
{% endif %}</td>
<td class='user-column'>{% if chunk.user %}<a href="{% url 'catalogue_user' chunk.user.username %}">{{ chunk.user|username }}</a>{% endif %}</td>
<td>
- {% if chunk.published %}P{% endif %}
- {% if book.new_publishable %}p{% endif %}
- {% if chunk.changed %}+{% endif %}
+ {% if chunk.published %}
+ <div><small>{% trans "published" %}</small></div>
+ {% endif %}
+ {% if book.new_publishable %}
+ <div><small>{% trans "publishable" %}</small></div>
+ {% endif %}
+ {% if chunk.changed %}
+ <div><small>{% trans "changed" %}</small></div>
+ {% endif %}
</td>
<td>{{ book.project.name }}</td>
</tr>
{% else %}
<tr>
<td><input type="checkbox" name="select_book" value="{{book.id}}"/></td>
- <td class='book-settings-link'><a href="{% url 'catalogue_book' book.slug %}" title='{% trans "Book settings" %}'>[B]</a></td>
+ <td><a class='btn btn-sm btn-secondary' href="{% url 'catalogue_book' book.slug %}"><small>{% trans "Book settings" %}</small></a></td>
<td></td>
<td>{{ book.title }}</td>
<td></td>
<td class='user-column'></td>
<td>
- {% if book.published %}P{% endif %}
- {% if book.new_publishable %}p{% endif %}
+ {% if book.published %}
+ <div><small>{% trans "published" %}</small></div>
+ {% endif %}
+ {% if book.new_publishable %}
+ <div><small>{% trans "publishable" %}</small></div>
+ {% endif %}
</td>
<td>{{ book.project.name }}</td>
</tr>
</form>
-<table id="file-list"{% if viewed_user %} class="book-list-user"{% endif %}>
+<div class="card mt-4">
+ <div class="card-body">
+
+
+<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>
<th style='display: none'></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=books|length %}
- {% autopaginate books 100 %}
+ {% autopaginate books 100 as books_page %}
<tbody>
- {% for item in books %}
+ {% for item in books_page %}
{% with book=item.book chunk=item.chunks.0 %}
{% include 'catalogue/book_list/book.html' %}
{% if not book.single %}
{% endif %}
{% endwith %}
{% endfor %}
- <tr><th class='paginator' colspan="6">
- {% paginate %}
- {% blocktrans count c=cnt %}{{c}} book{% plural %}{{c}} books{% endblocktrans %}</th></tr>
</tbody>
- {% endwith %}
</table>
+{% paginate %}
+ {% blocktrans count c=books|length %}{{c}} book{% plural %}{{c}} books{% endblocktrans %}
+
+
{% if not books %}
<p>{% trans "No books found." %}</p>
{% endif %}
+ </div>
+</div>
+
<form id='chunk_mass_edit' action='{% url "catalogue_chunk_mass_edit" %}' style="display:none;">
{% csrf_token %}
<input type="hidden" name="ids" />
{% load i18n %}
{% load username from common_tags %}
-<tr>
+<tr class="table-secondary table-sm">
<td><input type="checkbox" name="select_chunk" value="{{chunk.id}}" data-book-id="{{chunk.book.id}}" /></td>
<td class='book-settings-column'></td>
- <td><a href="{% url 'catalogue_chunk_edit' chunk.book.slug chunk.slug %}" title='{% trans "Chunk settings" %}'>[c]</a></td>
- <td><a target="_blank" href="{{ chunk.get_absolute_url }}">
- <span class='chunkno'>{{ chunk.number }}.</span>
+ <td><a class="btn btn-secondary btn-sm" href="{% url 'catalogue_chunk_edit' chunk.book.slug chunk.slug %}"><small>{% trans "Chunk settings" %}</small></a></td>
+ <td><a class="btn btn-primary" target="_blank" href="{{ chunk.get_absolute_url }}">
+ {% trans "Edit:" %}
+ {{ chunk.number }}.
{{ chunk.title }}</a></td>
<td>{% if chunk.stage %}
{{ chunk.stage }}
</a>{% else %}
{% endif %}</td>
+
</td>
<td>
- {% if chunk.new_publishable %}p{% endif %}
- {% if chunk.changed %}+{% endif %}
+ {% if chunk.new_publishable %}
+ <small>
+ {% trans "publishable" %}
+ </small>
+ {% endif %}
+ {% if chunk.changed %}
+ <small>
+ {% trans "changed" %}
+ </small>
+ {% endif %}
</td>
+<td></td>
</tr>
{% extends "catalogue/base.html" %}
{% load i18n %}
+{% load bootstrap4 %}
{% block titleextra %}{% trans "Split chunk" %}{% endblock %}
{% block content %}
+<div class="card mt-4">
+ <div class="card-header">
<h1>{% trans "Split chunk" %}</h1>
+ </div>
+ <div class="card-body">
<form enctype="multipart/form-data" method="POST">
{% csrf_token %}
- <table class='editable'>
- <tr><th>{% trans "Insert empty chunk after" %}:</th>
- <td><a href="{{ chunk.get_absolute_url }}">{{ chunk.pretty_name }}</a></td></tr>
- {{ form.as_table }}
- <tr><td></td><td><button type="submit">{% trans "Add chunk" %}</button></td></tr>
- </table>
+ <div class='editable'>
+ <p>{% trans "Insert empty chunk after" %}:
+ <a href="{{ chunk.get_absolute_url }}">{{ chunk.pretty_name }}</a></p>
+ {% bootstrap_form form %}
+ {% buttons %}
+ <button class="btn btn-primary" type="submit">{% trans "Add chunk" %}</button>
+ {% endbuttons %}
+ </div>
</form>
+ </div>
+</div>
{% endblock content %}
{% extends "catalogue/base.html" %}
{% load i18n %}
+{% load bootstrap4 %}
{% block titleextra %}{% trans "Chunk settings" %}{% endblock %}
{% block content %}
+<div class="card mt-4">
+ <div class="card-header">
<h1>{% trans "Chunk settings" %}</h1>
+ </div>
+ <div class="card-body">
<form enctype="multipart/form-data" method="POST" action="{% if go_next %}?next={{ go_next }}{% endif %}">
{% csrf_token %}
- <table class='editable'>
- <tr><th>{% trans "Book" %}:</th><td>{{ chunk.book }} ({{ chunk.number }}/{{ chunk.book|length }})</td></tr>
- {{ form.as_table}}
- <tr><td></td><td><button type="submit">{% trans "Save" %}</button></td></tr>
- </table>
+ <div class='editable'>
+ <p>{% trans "Book" %}: {{ chunk.book }} ({{ chunk.number }}/{{ chunk.book|length }})</p>
+ {% bootstrap_form form %}
+ {% buttons %}
+ <button class="btn btn-primary" type="submit">{% trans "Save" %}</button>
+ {% endbuttons %}
+ </div>
</form>
- <p><a href="{% url "catalogue_chunk_add" chunk.book.slug chunk.slug %}">{% trans "Split chunk" %}</a></p>
+ <p style="text-align: right"><a class="btn btn-danger" href="{% url "catalogue_chunk_add" chunk.book.slug chunk.slug %}">{% trans "Split chunk" %}</a></p>
+ </div>
+</div>
{% endblock content %}
--- /dev/null
+{% load i18n %}
+
+<li class="nav-item navbar-text">
+{% if user.is_authenticated %}
+{{ user.username }}
+</li>
+
+{% if user.is_staff %}
+<li class="nav-item">
+ <a class="nav-link" href="{% url 'admin:index' %}">{% trans "Admin" %}</a>
+</li>
+{% endif %}
+
+<li class="nav-item">
+ <a class="nav-link" href='{% url "logout" %}{% if logout_to %}?next={{ logout_to }}{% endif %}'>{% trans "Log Out" %}</a>
+</li>
+{% else %}
+{% url "cas_ng_login" as login_url %}
+{% ifnotequal login_url request.path %}
+<li class="nav-item">
+<a class="nav-link" href='{{ login_url }}'>{% trans "Log In" %}</a>
+</li>
+{% endifnotequal %}
+{% endif %}
{% for tab in tabs %}
- <a {% ifequal active_tab tab.slug %}class="active" {% endifequal %}href="{{ tab.url }}">{{ tab.caption }}</a>
+ <li class="nav-item"><a class="nav-link{% if active_tab == tab.slug %} active{% endif %}" href="{{ tab.url }}">{{ tab.caption }}</a></li>
{% endfor %}
{% endblock leftcolumn %}
{% block rightcolumn %}
- <div id="last-edited-list">
+<div class="card mt-4">
+ <div class="card-header">
<h2>{% trans "Your last edited documents" %}</h2>
+ </div>
+ <div class="card-body">
<ol>
{% for edit_url, item in last_books %}
<li><a
{% endfor %}
</ol>
</div>
+</div>
+<div class="card mt-4">
+ <div class="card-header">
<h2>{% trans "Recent activity for" %} {{ request.user|nice_name }}</h2>
+ </div>
+ <div class="card-body">
{% wall request.user 10 %}
+ </div></div>
{% endblock rightcolumn %}
{% block leftcolumn %}
- <h1>{{ viewed_user|nice_name }}</h1>
+ <h1 class="mt-4">{{ viewed_user|nice_name }}</h1>
{% book_list viewed_user %}
{% endblock leftcolumn %}
{% block rightcolumn %}
+<div class="card mt-4">
+ <div class="card-header">
<h2>{% trans "Recent activity for" %} {{ viewed_user|nice_name }}</h2>
+ </div>
+ <div class="card-body">
+
{% wall viewed_user 10 %}
+ </div>
+</div>
{% endblock rightcolumn %}
'pipeline',
'fnpdjango',
'django_cas_ng',
+ 'bootstrap4',
'catalogue',
'cover',
*/
body {
- margin: 0;
- font-family: verdana, sans-serif;
- font-size: 10px;
+ background: #eee;
}
img {
border: 0;
}
-th {
- text-align: left;
-}
-
-td {
- vertical-align: top;
- padding: 0 3px;
-}
-.clr {
- clear: both;
-}
-
-#tabs-nav {
- padding: 5px 5px 0 10px;
- background: #ffdfbf;
- border-bottom: 1px solid #ff8000;
- position: relative;
-}
-
-#tabs-nav-left {
- margin-left: 60px;
-}
-
-#tabs-nav-left a {
- display: block;
- float: left;
- padding: 5px 20px 5px 20px;
- margin-bottom: -1px;
- border-width: 1px;
- border-style: solid;
- border-color: transparent;
-}
-
-#tabs-nav-left .active {
- background: white;
- border-color: #ff8000 #ff8000 white #ff8000;
-}
-
-.section {
- border-top: 1px solid #ffdfbf;
- margin-top: 2em;
- padding-top: 1em;
-}
-
.editable td {
padding: 1px;
}
}
-#login-box {
- float: right;
-}
-
-#logo {
- position: absolute;
- bottom: 0;
-}
-
-#content {
- padding: 10px;
-}
-
-
-
-#catalogue_layout_left_column {
- overflow: visible;
- float: left;
- max-width: 60%;
- padding-right: 2%;
- border-right: 1px dashed black;
-
-}
-
-#catalogue_layout_right_column {
- float: left;
- max-width: 30%;
- margin-left: 5%;
-}
-
#last-edited-list ul {
margin: 0px;
}
color: #808080;
}
-a, a:visited, a:active {
- color: #a05000;
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
.error {
color: #666;
}
-.chunkno {
- font-size: .7em;
- padding-left: 2em;
-}
-
-
/* Big cheesy publish button */
#publish-button {
color: black;
{% if is_paginated %}
{% load i18n %}
-<div class="pagination">
+<nav aria-label="{% trans 'Pagination' %}" class="mt-4">
+ <ul class="pagination justify-content-center">
{% if page_obj.has_previous %}
- <a href="?page={{ page_obj.previous_page_number }}{{ getvars }}{{ hashtag }}" class="prev">‹‹ {% trans "previous" %}</a>
+ <li class="page-item">
+ <a href="?page={{ page_obj.previous_page_number }}{{ getvars }}{{ hashtag }}" class="page-link">
+ {% trans "previous" %}
+ </a>
+ </li>
{% else %}
- <span class="disabled prev">‹‹ {% trans "previous" %}</span>
+ <li class="page-item disabled">
+ <span class="page-link">
+ {% trans "previous" %}
+ </span>
+ </li>
+ {% endif %}
+
+ {% for page in pages %}
+ {% if page %}
+ {% if page == page_obj.number %}
+ <li class="page-item active">
+ <span class="page-link">
+ {{ page }}
+ </span>
+ </li>
+ {% else %}
+ <li class="page-item">
+ <a href="?page={{ page }}{{ getvars }}{{ hashtag }}" class="page-link">
+ {{ page }}
+ </a>
+ </li>
+ {% endif %}
{% endif %}
- {% for page in pages %}
- {% if page %}
- {% ifequal page page_obj.number %}
- <span class="current page">{{ page }}</span>
- {% else %}
- <a href="?page={{ page }}{{ getvars }}{{ hashtag }}" class="page">{{ page }}</a>
- {% endifequal %}
- {% else %}
- ...
- {% endif %}
{% endfor %}
+
{% if page_obj.has_next %}
- <a href="?page={{ page_obj.next_page_number }}{{ getvars }}{{ hashtag }}" class="next">{% trans "next" %} ››</a>
+ <li class="page-item">
+ <a href="?page={{ page_obj.next_page_number }}{{ getvars }}{{ hashtag }}" class="page-link">
+ {% trans "next" %}
+ </a>
+ </li>
{% else %}
- <span class="disabled next">{% trans "next" %} ››</span>
+ <li class="page-item disabled">
+ <span class="page-link">
+ {% trans "next" %}
+ </span>
+ </li>
{% endif %}
-</div>
+ </ul>
+</nav>
+
{% endif %}