lino 25.8.2__py3-none-any.whl → 25.8.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lino/__init__.py +1 -1
- lino/config/unused/403.html +1 -1
- lino/config/unused/404.html +1 -1
- lino/config/unused/500.html +1 -1
- lino/core/actions.py +1 -1
- lino/core/actors.py +2 -2
- lino/core/elems.py +1 -1
- lino/core/kernel.py +5 -1
- lino/core/renderer.py +2 -2
- lino/core/requests.py +4 -5
- lino/core/site.py +5 -3
- lino/core/store.py +3 -1
- lino/core/urls.py +1 -1
- lino/help_texts.py +9 -5
- lino/modlib/__init__.py +1 -1
- lino/modlib/bootstrap5/README.txt +2 -0
- lino/modlib/{bootstrap3 → bootstrap5}/__init__.py +6 -6
- lino/modlib/{bootstrap3/config/bootstrap3 → bootstrap5/config/bootstrap5}/base.html +5 -4
- lino/modlib/{bootstrap3/config/bootstrap3 → bootstrap5/config/bootstrap5}/detail.html +1 -1
- lino/modlib/{bootstrap3/config/bootstrap3 → bootstrap5/config/bootstrap5}/index.html +1 -1
- lino/modlib/{bootstrap3/config/bootstrap3 → bootstrap5/config/bootstrap5}/table.html +1 -1
- lino/modlib/{bootstrap3 → bootstrap5}/models.py +2 -2
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.css +4085 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.min.css +6 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.min.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.rtl.css +4084 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.rtl.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.rtl.min.css +6 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.rtl.min.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.css +597 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.min.css +6 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.min.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.rtl.css +594 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.rtl.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.rtl.min.css +6 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.rtl.min.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.css +5406 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.min.css +6 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.min.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.rtl.css +5397 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.rtl.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.rtl.min.css +6 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.rtl.min.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.css +12043 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.min.css +6 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.min.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.rtl.css +12016 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.rtl.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.rtl.min.css +6 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.rtl.min.css.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.bundle.js +6315 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.bundle.js.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.bundle.min.js +7 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.bundle.min.js.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.esm.js +4450 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.esm.js.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.esm.min.js +7 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.esm.min.js.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.js +4497 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.js.map +1 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.min.js +7 -0
- lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.min.js.map +1 -0
- lino/modlib/{bootstrap3 → bootstrap5}/views.py +10 -10
- lino/modlib/comments/mixins.py +1 -8
- lino/modlib/comments/models.py +2 -0
- lino/modlib/extjs/__init__.py +1 -1
- lino/modlib/jinja/renderer.py +1 -1
- lino/modlib/memo/__init__.py +1 -2
- lino/modlib/odata/views.py +7 -7
- lino/modlib/publisher/__init__.py +9 -2
- lino/modlib/publisher/choicelists.py +12 -43
- lino/modlib/publisher/config/publisher/page.pub.html +10 -13
- lino/modlib/publisher/fixtures/synodalworld.py +3 -1
- lino/modlib/publisher/mixins.py +28 -75
- lino/modlib/publisher/models.py +49 -143
- lino/modlib/publisher/renderer.py +6 -2
- lino/modlib/publisher/ui.py +23 -75
- lino/modlib/publisher/views.py +30 -15
- lino/modlib/users/fixtures/abc.py +20 -0
- lino/modlib/users/mixins.py +6 -6
- lino/modlib/weasyprint/__init__.py +25 -14
- lino/modlib/weasyprint/config/weasyprint/base.weasy.html +43 -27
- {lino-25.8.2.dist-info → lino-25.8.3.dist-info}/METADATA +1 -1
- {lino-25.8.2.dist-info → lino-25.8.3.dist-info}/RECORD +102 -62
- lino/modlib/bootstrap3/README.txt +0 -2
- lino/modlib/bootstrap3/static/bootstrap-3.3.4/css/bootstrap.css +0 -6584
- lino/modlib/bootstrap3/static/bootstrap-3.3.4/css/bootstrap.css.map +0 -1
- lino/modlib/bootstrap3/static/bootstrap-3.3.4/css/bootstrap.min.css +0 -5
- lino/modlib/bootstrap3/static/bootstrap-3.3.4/js/bootstrap.js +0 -2317
- lino/modlib/bootstrap3/static/bootstrap-3.3.4/js/bootstrap.min.js +0 -7
- /lino/modlib/{bootstrap3 → bootstrap5}/renderer.py +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/css/bootstrap-theme.css +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/css/bootstrap-theme.css.map +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/css/bootstrap-theme.min.css +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.eot +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.svg +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.ttf +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.woff +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.woff2 +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/js/bootstrap_lino.js +0 -0
- /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/js/npm.js +0 -0
- {lino-25.8.2.dist-info → lino-25.8.3.dist-info}/WHEEL +0 -0
- {lino-25.8.2.dist-info → lino-25.8.3.dist-info}/licenses/AUTHORS.rst +0 -0
- {lino-25.8.2.dist-info → lino-25.8.3.dist-info}/licenses/COPYING +0 -0
lino/__init__.py
CHANGED
@@ -31,7 +31,7 @@ from django import VERSION
|
|
31
31
|
from django.apps import AppConfig
|
32
32
|
from django.conf import settings
|
33
33
|
import warnings
|
34
|
-
__version__ = '25.8.
|
34
|
+
__version__ = '25.8.3'
|
35
35
|
|
36
36
|
# import setuptools # avoid UserWarning "Distutils was imported before Setuptools"?
|
37
37
|
|
lino/config/unused/403.html
CHANGED
lino/config/unused/404.html
CHANGED
lino/config/unused/500.html
CHANGED
lino/core/actions.py
CHANGED
@@ -987,7 +987,7 @@ class ShowEditor(Action):
|
|
987
987
|
ar.master_instance.__class__).pk
|
988
988
|
})
|
989
989
|
ar.set_response(goto_url=ar.renderer.front_end.build_plain_url(
|
990
|
-
"api", *ar.actor.actor_id.split("."), str(ar.selected_rows[0].pk), self.buddy_name, **kw))
|
990
|
+
"#", "api", *ar.actor.actor_id.split("."), str(ar.selected_rows[0].pk), self.buddy_name, **kw))
|
991
991
|
|
992
992
|
|
993
993
|
# Some actions are described by a single action instance used by most actors:
|
lino/core/actors.py
CHANGED
@@ -265,12 +265,12 @@ class Actor(Parametrizable, Permittable, metaclass=ActorMetaClass):
|
|
265
265
|
|
266
266
|
hidden_elements = frozenset()
|
267
267
|
|
268
|
-
detail_html_template = "
|
268
|
+
detail_html_template = "bootstrap5/detail.html"
|
269
269
|
"""The template to be used for rendering a row of this actor as a
|
270
270
|
detail html page.
|
271
271
|
|
272
272
|
"""
|
273
|
-
list_html_template = "
|
273
|
+
list_html_template = "bootstrap5/table.html"
|
274
274
|
"""The template to be used for rendering a collection of rows of this
|
275
275
|
actor as a table html page.
|
276
276
|
|
lino/core/elems.py
CHANGED
@@ -37,7 +37,7 @@ from lino.core import actions
|
|
37
37
|
from lino.core.utils import resolve_model
|
38
38
|
from lino.core.gfks import GenericRelation, GenericRel
|
39
39
|
from lino.core.permissions import Permittable
|
40
|
-
from lino.modlib.
|
40
|
+
from lino.modlib.bootstrap5.views import table2html
|
41
41
|
|
42
42
|
from lino.utils.jsgen import VisibleComponent
|
43
43
|
from lino.utils.html import E, tostring, forcetext, html2text
|
lino/core/kernel.py
CHANGED
@@ -601,13 +601,17 @@ class Kernel(object):
|
|
601
601
|
# for p in self.web_front_ends]))
|
602
602
|
|
603
603
|
editing_wf = None
|
604
|
+
primary_wf = self.web_front_ends[0]
|
604
605
|
for p in self.web_front_ends:
|
606
|
+
# if primary_wf is None and not p.url_prefix:
|
607
|
+
# primary_wf = p
|
605
608
|
if p.ui_handle_attr_name is not None:
|
606
609
|
editing_wf = p
|
607
610
|
break
|
608
611
|
|
609
612
|
self.editing_front_end = editing_wf
|
610
|
-
self.
|
613
|
+
self.primary_front_end = primary_wf
|
614
|
+
self.html_renderer = HtmlRenderer(primary_wf)
|
611
615
|
self.text_renderer = TextRenderer(editing_wf)
|
612
616
|
|
613
617
|
for p in site.installed_plugins:
|
lino/core/renderer.py
CHANGED
@@ -89,7 +89,7 @@ def add_user_language(kw, ar):
|
|
89
89
|
# ~ request.LANGUAGE_CODE = translation.get_language()
|
90
90
|
|
91
91
|
|
92
|
-
class Renderer
|
92
|
+
class Renderer:
|
93
93
|
"""
|
94
94
|
Base class for all Lino renderers.
|
95
95
|
|
@@ -709,7 +709,7 @@ class HtmlRenderer(Renderer):
|
|
709
709
|
"""
|
710
710
|
Render the given menu as an HTML etree element.
|
711
711
|
|
712
|
-
Used by
|
712
|
+
Used by bootstrap5 front end.
|
713
713
|
"""
|
714
714
|
if not isinstance(mnu, Menu):
|
715
715
|
assert isinstance(mnu, MenuItem)
|
lino/core/requests.py
CHANGED
@@ -478,6 +478,7 @@ class BaseRequest:
|
|
478
478
|
filter=None,
|
479
479
|
gridfilters=None,
|
480
480
|
extra=None,
|
481
|
+
selected_rows=None,
|
481
482
|
):
|
482
483
|
if logger is not None:
|
483
484
|
self.logger = logger
|
@@ -503,6 +504,9 @@ class BaseRequest:
|
|
503
504
|
if xcallback_answers is not None:
|
504
505
|
self.xcallback_answers = xcallback_answers
|
505
506
|
|
507
|
+
if selected_rows is not None:
|
508
|
+
self.selected_rows = selected_rows
|
509
|
+
|
506
510
|
if self.actor is not None:
|
507
511
|
if master is None:
|
508
512
|
master = self.actor.master
|
@@ -1813,7 +1817,6 @@ class ActionRequest(BaseRequest):
|
|
1813
1817
|
title=None,
|
1814
1818
|
exclude=None,
|
1815
1819
|
selected_pks=None,
|
1816
|
-
selected_rows=None,
|
1817
1820
|
**kw
|
1818
1821
|
):
|
1819
1822
|
if exclude is not None:
|
@@ -1825,10 +1828,6 @@ class ActionRequest(BaseRequest):
|
|
1825
1828
|
if limit is not None:
|
1826
1829
|
self.limit = limit
|
1827
1830
|
|
1828
|
-
if selected_rows is not None:
|
1829
|
-
assert selected_pks is None
|
1830
|
-
self.selected_rows = selected_rows
|
1831
|
-
|
1832
1831
|
super().setup(**kw)
|
1833
1832
|
|
1834
1833
|
if self.bound_action is None:
|
lino/core/site.py
CHANGED
@@ -2151,9 +2151,9 @@ class Site(object):
|
|
2151
2151
|
|
2152
2152
|
# if self.default_ui == "extjs":
|
2153
2153
|
# yield 'lino.modlib.extjs'
|
2154
|
-
# yield 'lino.modlib.
|
2155
|
-
# elif self.default_ui == "
|
2156
|
-
# yield 'lino.modlib.
|
2154
|
+
# yield 'lino.modlib.bootstrap5'
|
2155
|
+
# elif self.default_ui == "bootstrap5":
|
2156
|
+
# yield 'lino.modlib.bootstrap5'
|
2157
2157
|
|
2158
2158
|
# yield "lino.modlib.lino_startup"
|
2159
2159
|
|
@@ -2177,6 +2177,8 @@ class Site(object):
|
|
2177
2177
|
This must *start and end* with a *slash*. Default value is
|
2178
2178
|
``'/'``.
|
2179
2179
|
|
2180
|
+
Don't change this. Other values than the default value are not tested.
|
2181
|
+
|
2180
2182
|
This must be set if your project is not being served at the "root"
|
2181
2183
|
URL of your server.
|
2182
2184
|
|
lino/core/store.py
CHANGED
@@ -92,7 +92,9 @@ class StoreField(object):
|
|
92
92
|
self.name = str(name) # TypeError 20160425
|
93
93
|
self.options = options
|
94
94
|
# if settings.SITE.kernel.default_ui.support_async:
|
95
|
-
if settings.SITE.default_ui == "lino_react.react":
|
95
|
+
# if settings.SITE.default_ui == "lino_react.react":
|
96
|
+
editing_wf = settings.SITE.kernel.editing_front_end
|
97
|
+
if editing_wf and editing_wf.support_async:
|
96
98
|
if isinstance(field, fields.FakeField) and field.delayed_value:
|
97
99
|
self.delayed_value = True
|
98
100
|
# print("20210619 StoreField.delayedValue is True", name)
|
lino/core/urls.py
CHANGED
lino/help_texts.py
CHANGED
@@ -103,16 +103,15 @@ help_texts = {
|
|
103
103
|
'lino.mixins.sequenced.Hierarchical.whole_clan' : _("""Return a set of this instance and all children and grandchildren."""),
|
104
104
|
'lino.mixins.sequenced.Hierarchical.whole_tree' : _("""Returns a tuple with two items (obj, children) representing the whole tree."""),
|
105
105
|
'lino.modlib.about.Plugin' : _("""See /dev/plugins."""),
|
106
|
-
'lino.modlib.
|
107
|
-
'lino.modlib.
|
108
|
-
'lino.modlib.
|
109
|
-
'lino.modlib.
|
106
|
+
'lino.modlib.bootstrap5.renderer.Renderer' : _("""A HTML render that uses Bootstrap3."""),
|
107
|
+
'lino.modlib.bootstrap5.views.List' : _("""Render a list of records."""),
|
108
|
+
'lino.modlib.bootstrap5.views.Element' : _("""Render a single record."""),
|
109
|
+
'lino.modlib.bootstrap5.views.Index' : _("""Render the main page."""),
|
110
110
|
'lino.modlib.checkdata.Plugin' : _("""The config descriptor for this plugin."""),
|
111
111
|
'lino.modlib.checkdata.Plugin.on_plugins_loaded' : _("""Set responsible_user to "'robin' if this is a demo site (is_demo_site)."""),
|
112
112
|
'lino.modlib.checkdata.roles.CheckdataUser' : _("""Can see checkdata messages."""),
|
113
113
|
'lino.modlib.comments.Plugin' : _("""See /dev/plugins."""),
|
114
114
|
'lino.modlib.comments.Plugin.emotion_range' : _("""Which range of emotion icons to provide. Either “business” or “social”."""),
|
115
|
-
'lino.modlib.comments.Plugin.private_default' : _("""Whether comments are private by default."""),
|
116
115
|
'lino.modlib.dashboard.Plugin' : _("""See /dev/plugins."""),
|
117
116
|
'lino.modlib.dashboard.UpdateWidgets' : _("""Create or update the dashboard widgets for this user."""),
|
118
117
|
'lino.modlib.export_excel.Plugin' : _("""See /dev/plugins."""),
|
@@ -487,6 +486,9 @@ help_texts = {
|
|
487
486
|
'lino.modlib.users.UserPlan.create_user_plan' : _("""Return the database object for this plan and user. or create"""),
|
488
487
|
'lino.modlib.users.UserPlan.update_plan' : _("""Implementing models should provide this method."""),
|
489
488
|
'lino.modlib.users.UpdatePlan' : _("""Build a new list of suggestions. This will remove all current suggestions."""),
|
489
|
+
'lino.modlib.users.PrivacyRelevant' : _("""Model mixin to mark a database model as privacy-relevant data, i.e. something that is to be shown only to members of a given user group."""),
|
490
|
+
'lino.modlib.users.PrivacyRelevant.private' : _("""Whether this row is confidential."""),
|
491
|
+
'lino.modlib.users.PrivacyRelevant.group' : _("""The user group this row belongs to."""),
|
490
492
|
'lino.modlib.about.About.sign_in' : _("""Ask for your username and password in order to authenticate."""),
|
491
493
|
'lino.modlib.about.About.reset_password' : _("""Ask for your email address and send a verification code."""),
|
492
494
|
'lino.modlib.about.About.verify_user' : _("""Ask for the verification code you have received by email and mark your email address as verified."""),
|
@@ -496,6 +498,7 @@ help_texts = {
|
|
496
498
|
'lino.modlib.users.User.coaching_supervisor' : _("""Notify me when a coach has been assigned."""),
|
497
499
|
'lino.modlib.comments.Comment' : _("""The database model to represent a comment."""),
|
498
500
|
'lino.modlib.comments.Comment.user' : _("""The author of the comment."""),
|
501
|
+
'lino.modlib.comments.Comment.group' : _("""The user group this comment belongs to."""),
|
499
502
|
'lino.modlib.comments.Comment.owner' : _("""The discussion topic this comment is about."""),
|
500
503
|
'lino.modlib.comments.Comment.body' : _("""The full body text of your comment."""),
|
501
504
|
'lino.modlib.comments.Comment.short_preview' : _("""The first paragraph of your body."""),
|
@@ -516,6 +519,7 @@ help_texts = {
|
|
516
519
|
'lino.modlib.comments.Commentable' : _("""Mixin for models that are commentable, i.e. the rows of which can become discussion topic of comments."""),
|
517
520
|
'lino.modlib.comments.Commentable.add_comments_filter' : _("""Add filters to the given queryset of comments, requested by the given user."""),
|
518
521
|
'lino.modlib.comments.Commentable.get_rfc_description' : _("""Return a HTML formatted string with the description of this Commentable as it should be displayed by the slave summary of CommentsByRFC."""),
|
522
|
+
'lino.modlib.comments.Commentable.on_create_comment' : _("""Called when a comment about this is being created."""),
|
519
523
|
'lino.modlib.comments.Commentable.on_commented' : _("""This is automatically called when a comment has been created or modified."""),
|
520
524
|
'lino.modlib.files.Volume' : _("""The Django model representing a file volume."""),
|
521
525
|
'lino.modlib.files.Volume.id' : _("""The primary key used to point to this volume from a database object."""),
|
lino/modlib/__init__.py
CHANGED
@@ -18,23 +18,23 @@ from lino.api.ad import Plugin
|
|
18
18
|
|
19
19
|
class Plugin(Plugin):
|
20
20
|
# ui_label = _("Bootstrap")
|
21
|
-
ui_handle_attr_name = "
|
21
|
+
ui_handle_attr_name = "bootstrap5_handle"
|
22
22
|
|
23
23
|
# site_js_snippets = ['snippets/plain.js']
|
24
24
|
|
25
25
|
needs_plugins = ["lino.modlib.jinja"]
|
26
26
|
|
27
|
-
url_prefix = "
|
27
|
+
url_prefix = "bs5"
|
28
28
|
|
29
|
-
media_name = "bootstrap-
|
29
|
+
media_name = "bootstrap-5.3.7"
|
30
30
|
|
31
|
-
# media_base_url = "http://maxcdn.bootstrapcdn.com/bootstrap/3.
|
31
|
+
# media_base_url = "http://maxcdn.bootstrapcdn.com/bootstrap/5.3.7/"
|
32
32
|
|
33
33
|
def on_ui_init(self, kernel):
|
34
34
|
from .renderer import Renderer
|
35
35
|
|
36
36
|
self.renderer = Renderer(self)
|
37
|
-
# ui.
|
37
|
+
# ui.bs5_renderer = self.renderer
|
38
38
|
|
39
39
|
def get_patterns(self):
|
40
40
|
# from django.conf.urls import url
|
@@ -64,7 +64,7 @@ class Plugin(Plugin):
|
|
64
64
|
|
65
65
|
def get_used_libs(self, html=False):
|
66
66
|
if html is not None:
|
67
|
-
yield ("Bootstrap", "
|
67
|
+
yield ("Bootstrap", "5.3.7", "http://getbootstrap.com")
|
68
68
|
# yield ("jQuery", '?', "http://...")
|
69
69
|
|
70
70
|
def get_index_view(self):
|
@@ -1,8 +1,9 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html language="{{requested_language}}"><head>
|
3
3
|
<meta charset="utf-8"/>
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
|
4
5
|
<title>{% block title %}{{site.title or site.verbose_name}}{% endblock %}</title>
|
5
|
-
<link rel="stylesheet" href="{{site.plugins.
|
6
|
+
<link rel="stylesheet" href="{{site.plugins.bootstrap5.build_lib_url('css','bootstrap.css')}}" type="text/css">
|
6
7
|
<link rel="stylesheet" href="{{site.build_static_url('bootstrap.css')}}" type="text/css">
|
7
8
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/timepicker@1.11.12/jquery.timepicker.min.css" type="text/css">
|
8
9
|
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
@@ -21,7 +22,7 @@
|
|
21
22
|
<form class="form-inline" method="POST"
|
22
23
|
action="{{ar.renderer.front_end.build_plain_url('auth')}}">
|
23
24
|
<input name="username" type="username" class="input-small" placeholder="Username">
|
24
|
-
<input name="password" type"password" class="input-small" placeholder="Password">
|
25
|
+
<input name="password" type="password" class="input-small" placeholder="Password">
|
25
26
|
<button type="submit" class="btn">{{_("Sign in")}}</button>
|
26
27
|
—
|
27
28
|
{% endif -%}
|
@@ -101,7 +102,7 @@
|
|
101
102
|
<!-- Placed at the end of the document so the pages load faster -->
|
102
103
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
103
104
|
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
|
104
|
-
<script src="{{site.plugins.
|
105
|
+
<script src="{{site.plugins.bootstrap5.build_lib_url('js','bootstrap.min.js')}}"></script>
|
105
106
|
<script src="https://cdn.jsdelivr.net/npm/timepicker@1.11.12/jquery.timepicker.min.js"></script>
|
106
|
-
<script src="{{site.plugins.
|
107
|
+
<script src="{{site.plugins.bootstrap5.build_lib_url('js','bootstrap_lino.js')}}"></script>
|
107
108
|
</body></html>
|
@@ -22,9 +22,9 @@ class ShowAsHtml(dd.Action):
|
|
22
22
|
required_roles = dd.login_required(Expert)
|
23
23
|
|
24
24
|
def run_from_ui(self, ar, **kw):
|
25
|
-
url = dd.plugins.
|
25
|
+
url = dd.plugins.bootstrap5.renderer.get_request_url(ar)
|
26
26
|
ar.success(open_url=url)
|
27
27
|
|
28
28
|
|
29
|
-
if settings.SITE.default_ui != "lino.modlib.
|
29
|
+
if settings.SITE.default_ui != "lino.modlib.bootstrap5":
|
30
30
|
AbstractTable.show_as_html = ShowAsHtml()
|