From: Radek Czajka Date: Sat, 5 Oct 2019 22:22:26 +0000 (+0200) Subject: Begin bootstapify. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/fc8d58d4ac9abba24758ef6c914eea9f85ef7e5b?ds=sidebyside;hp=f9c19bbcbc514aebcff44b37ca5b92b4a0e181cf Begin bootstapify. --- diff --git a/requirements/requirements.txt b/requirements/requirements.txt index d9a10f66..1cc8830c 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -20,5 +20,6 @@ django-maintenancemode>=0.9 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 diff --git a/src/catalogue/templates/catalogue/activity.html b/src/catalogue/templates/catalogue/activity.html index 3bb8afb2..2f9443b5 100755 --- a/src/catalogue/templates/catalogue/activity.html +++ b/src/catalogue/templates/catalogue/activity.html @@ -8,12 +8,18 @@ {% block content %} -

< +
+
+

+ < {% trans "Activity" %}: {{ day }} {% if next_day %} - > + > {% endif %}

+
+
{% day_wall day %} +
{% endblock content %} diff --git a/src/catalogue/templates/catalogue/base.html b/src/catalogue/templates/catalogue/base.html index 8577f104..afc54040 100644 --- a/src/catalogue/templates/catalogue/base.html +++ b/src/catalogue/templates/catalogue/base.html @@ -1,10 +1,13 @@ + {% load pipeline i18n %} +{% load static %} {% load catalogue %} + {% stylesheet 'catalogue' %} {% block title %}{% block titleextra %}{% endblock %} :: {% trans "Platforma Redakcyjna" %}{% endblock title %} @@ -12,37 +15,37 @@ -
- - - -
+
+ - - {% include "registration/head_login.html" %} - + -
-
+ -
+
{% block content %} -
+
+
{% block leftcolumn %} {% endblock leftcolumn %}
-
+
{% block rightcolumn %} {% endblock rightcolumn %}
+
{% endblock content %} -
diff --git a/src/catalogue/templates/catalogue/book_append_to.html b/src/catalogue/templates/catalogue/book_append_to.html index c1ecc290..70996398 100755 --- a/src/catalogue/templates/catalogue/book_append_to.html +++ b/src/catalogue/templates/catalogue/book_append_to.html @@ -1,16 +1,19 @@ {% extends "catalogue/base.html" %} {% load i18n %} +{% load bootstrap4 %} {% block titleextra %}{% trans "Append book" %}{% endblock %} -{% block leftcolumn %} +{% block content %} +
+
{% csrf_token %} - {{ form.as_p }} - -

+ {% bootstrap_form form %} + {% buttons %} + + {% endbuttons %}
-{% endblock leftcolumn %} +
+{% endblock content %} -{% block rightcolumn %} -{% endblock rightcolumn %} diff --git a/src/catalogue/templates/catalogue/book_detail.html b/src/catalogue/templates/catalogue/book_detail.html index 60e426dc..800bf228 100755 --- a/src/catalogue/templates/catalogue/book_detail.html +++ b/src/catalogue/templates/catalogue/book_detail.html @@ -1,5 +1,6 @@ {% extends "catalogue/base.html" %} {% load book_list i18n %} +{% load bootstrap4 %} {% block titleextra %}{{ book.title }}{% endblock %} @@ -7,17 +8,21 @@ {% block content %} - -

{{ book.title }}

+
+
+

{{ book.title }}

+
+
+ {% if editable %}
{% csrf_token %}{% endif %} - - {{ form.as_table }} - {% if editable %} - + {% bootstrap_form form %} + {% if editable %} + {% buttons %} + + {% endbuttons %} {% endif %} -
{% if editable %}
{% endif %} {% if editable %} @@ -25,36 +30,42 @@

{% trans "Edit gallery" %}

{% endif %} -

{% trans "Append to other book" %}

+

{% trans "Append to other book" %}

{% endif %} +
+
+
+
+

{% trans "Chunks" %}

+
+
-
- -

{% trans "Chunks" %}

- - +
{% for chunk in book %} {% include 'catalogue/book_list/chunk.html' %} {% endfor %}
- -
+
+
-
+
-

{% trans "Publication" %}

- -
+
+

{% trans "Publication" %}

+
+
+
+
{% if book.dc_cover_image %} {{ book.dc_cover_image }} {% endif %}
- +

{% trans "Last published" %}: {% if book.last_published %} {{ book.last_published }} @@ -96,8 +107,6 @@

  • {{ publishable_error }}
{% endif %} -
- - +
{% endblock content %} diff --git a/src/catalogue/templates/catalogue/book_list/book.html b/src/catalogue/templates/catalogue/book_list/book.html index c47e2bcd..dcb2d545 100755 --- a/src/catalogue/templates/catalogue/book_list/book.html +++ b/src/catalogue/templates/catalogue/book_list/book.html @@ -5,10 +5,11 @@ {% with chunk as chunk %} - [B] - [c] - {% trans "Book settings" %} + {% trans "Chunk settings" %} + + {% trans "Edit:" %} {{ book.title }} {% if chunk.stage %} {{ chunk.stage }} @@ -16,9 +17,15 @@ {% endif %} {% if chunk.user %}{{ chunk.user|username }}{% endif %} - {% if chunk.published %}P{% endif %} - {% if book.new_publishable %}p{% endif %} - {% if chunk.changed %}+{% endif %} + {% if chunk.published %} +
{% trans "published" %}
+ {% endif %} + {% if book.new_publishable %} +
{% trans "publishable" %}
+ {% endif %} + {% if chunk.changed %} +
{% trans "changed" %}
+ {% endif %} {{ book.project.name }} @@ -26,14 +33,18 @@ {% else %} - [B] + {% trans "Book settings" %} {{ book.title }} - {% if book.published %}P{% endif %} - {% if book.new_publishable %}p{% endif %} + {% if book.published %} +
{% trans "published" %}
+ {% endif %} + {% if book.new_publishable %} +
{% trans "publishable" %}
+ {% endif %} {{ book.project.name }} diff --git a/src/catalogue/templates/catalogue/book_list/book_list.html b/src/catalogue/templates/catalogue/book_list/book_list.html index 25a2e00c..0d761b8a 100755 --- a/src/catalogue/templates/catalogue/book_list/book_list.html +++ b/src/catalogue/templates/catalogue/book_list/book_list.html @@ -15,7 +15,11 @@ - +
+
+ + +
@@ -23,10 +27,10 @@ - {% if not viewed_user %} - {% endif %} - - - {% with cnt=books|length %} - {% autopaginate books 100 %} + {% autopaginate books 100 as books_page %} - {% 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 %} @@ -83,16 +86,19 @@ {% endif %} {% endwith %} {% endfor %} - - {% endwith %}
+ class='form-control text-filter' value="{{ request.GET.title }}" />
- {% paginate %} - {% blocktrans count c=cnt %}{{c}} book{% plural %}{{c}} books{% endblocktrans %}
+{% paginate %} + {% blocktrans count c=books|length %}{{c}} book{% plural %}{{c}} books{% endblocktrans %} + + {% if not books %}

{% trans "No books found." %}

{% endif %} +
+
+ {% endblock content %} diff --git a/src/catalogue/templates/catalogue/chunk_edit.html b/src/catalogue/templates/catalogue/chunk_edit.html index 20062265..180e6d37 100755 --- a/src/catalogue/templates/catalogue/chunk_edit.html +++ b/src/catalogue/templates/catalogue/chunk_edit.html @@ -1,24 +1,33 @@ {% extends "catalogue/base.html" %} {% load i18n %} +{% load bootstrap4 %} {% block titleextra %}{% trans "Chunk settings" %}{% endblock %} {% block content %} +
+

{% trans "Chunk settings" %}

+
+
{% csrf_token %} - - - {{ form.as_table}} - -
{% trans "Book" %}:{{ chunk.book }} ({{ chunk.number }}/{{ chunk.book|length }})
+
+

{% trans "Book" %}: {{ chunk.book }} ({{ chunk.number }}/{{ chunk.book|length }})

+ {% bootstrap_form form %} + {% buttons %} + + {% endbuttons %} +
-

{% trans "Split chunk" %}

+

{% trans "Split chunk" %}

+
+
{% endblock content %} diff --git a/src/catalogue/templates/catalogue/head_login.html b/src/catalogue/templates/catalogue/head_login.html new file mode 100644 index 00000000..aede2df0 --- /dev/null +++ b/src/catalogue/templates/catalogue/head_login.html @@ -0,0 +1,24 @@ +{% load i18n %} + + + +{% if user.is_staff %} + +{% endif %} + + +{% else %} +{% url "cas_ng_login" as login_url %} +{% ifnotequal login_url request.path %} + +{% endifnotequal %} +{% endif %} diff --git a/src/catalogue/templates/catalogue/main_tabs.html b/src/catalogue/templates/catalogue/main_tabs.html index 82321cc4..eb74bbe0 100755 --- a/src/catalogue/templates/catalogue/main_tabs.html +++ b/src/catalogue/templates/catalogue/main_tabs.html @@ -1,3 +1,3 @@ {% for tab in tabs %} - {{ tab.caption }} + {% endfor %} diff --git a/src/catalogue/templates/catalogue/my_page.html b/src/catalogue/templates/catalogue/my_page.html index d3347503..e5b1522c 100755 --- a/src/catalogue/templates/catalogue/my_page.html +++ b/src/catalogue/templates/catalogue/my_page.html @@ -20,8 +20,11 @@ {% endblock leftcolumn %} {% block rightcolumn %} -
+
+

{% trans "Your last edited documents" %}

+
+
    {% for edit_url, item in last_books %}
+
+
+

{% trans "Recent activity for" %} {{ request.user|nice_name }}

+
+
{% wall request.user 10 %} +
{% endblock rightcolumn %} diff --git a/src/catalogue/templates/catalogue/user_page.html b/src/catalogue/templates/catalogue/user_page.html index 4be4ca3e..b49620e3 100755 --- a/src/catalogue/templates/catalogue/user_page.html +++ b/src/catalogue/templates/catalogue/user_page.html @@ -8,11 +8,18 @@ {% block leftcolumn %} -

{{ viewed_user|nice_name }}

+

{{ viewed_user|nice_name }}

{% book_list viewed_user %} {% endblock leftcolumn %} {% block rightcolumn %} +
+

{% trans "Recent activity for" %} {{ viewed_user|nice_name }}

+
+
+ {% wall viewed_user 10 %} +
+
{% endblock rightcolumn %} diff --git a/src/redakcja/settings/__init__.py b/src/redakcja/settings/__init__.py index c8a4a828..61f2be53 100644 --- a/src/redakcja/settings/__init__.py +++ b/src/redakcja/settings/__init__.py @@ -77,6 +77,7 @@ INSTALLED_APPS = ( 'pipeline', 'fnpdjango', 'django_cas_ng', + 'bootstrap4', 'catalogue', 'cover', diff --git a/src/redakcja/static/css/filelist.css b/src/redakcja/static/css/filelist.css index b5e4fc43..a4686e17 100644 --- a/src/redakcja/static/css/filelist.css +++ b/src/redakcja/static/css/filelist.css @@ -7,59 +7,13 @@ */ 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; } @@ -71,36 +25,6 @@ td { } -#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; } @@ -114,15 +38,6 @@ td { color: #808080; } -a, a:visited, a:active { - color: #a05000; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - .error { @@ -142,12 +57,6 @@ a:hover { color: #666; } -.chunkno { - font-size: .7em; - padding-left: 2em; -} - - /* Big cheesy publish button */ #publish-button { color: black; diff --git a/src/redakcja/templates/pagination/pagination.html b/src/redakcja/templates/pagination/pagination.html index fe566a86..6aa12adb 100755 --- a/src/redakcja/templates/pagination/pagination.html +++ b/src/redakcja/templates/pagination/pagination.html @@ -1,26 +1,53 @@ {% if is_paginated %} {% load i18n %} -
+ + + {% endif %}