From 596d61f6678c69526a6100902e4889f9891505ea Mon Sep 17 00:00:00 2001 From: mipel Date: Tue, 20 Jul 2021 14:05:44 +0200 Subject: [PATCH] Default bootstrap tables * refactors old table index template into bootstrap-fontawesome generic table --- intervention/views.py | 4 +- konova/settings.py | 4 +- konova/static/css/konova.css | 11 ++++ konova/templates/konova/home.html | 2 +- templates/navbar.html | 2 +- templates/table.html | 98 +++++++++++++++++++++---------- 6 files changed, 83 insertions(+), 38 deletions(-) diff --git a/intervention/views.py b/intervention/views.py index a79c744..ba7b1c6 100644 --- a/intervention/views.py +++ b/intervention/views.py @@ -25,7 +25,9 @@ def index_view(request: HttpRequest): """ template = "generic_index.html" user = request.user - interventions = Intervention # ToDo + interventions = Intervention.objects.filter( + + ) table = InterventionTable( request=request, queryset=interventions diff --git a/konova/settings.py b/konova/settings.py index c43da63..ea50dbd 100644 --- a/konova/settings.py +++ b/konova/settings.py @@ -24,16 +24,14 @@ STRF_DATE_TIME = "%d.%m.%Y %H:%M:%S" # Tables RESULTS_PER_PAGE_PARAM = "rpp" PAGE_PARAM = "page" -PAGE_SIZE_OPTIONS = [5, 10, 15, 20, 25, 30, 50, 75, 100] +PAGE_SIZE_OPTIONS = [5, 10, 15, 20, 25, 50, 100] PAGE_SIZE_OPTIONS_TUPLES = [ (5, 5), (10, 10), (15, 15), (20, 20), (25, 25), - (30, 30), (50, 50), - (75, 75), (100, 100), ] PAGE_SIZE_DEFAULT = 5 diff --git a/konova/static/css/konova.css b/konova/static/css/konova.css index ff2d7a7..5f31133 100644 --- a/konova/static/css/konova.css +++ b/konova/static/css/konova.css @@ -138,4 +138,15 @@ nav{ border: 1px solid var(--rlp-red); */ box-shadow: 1px 1px 3px var(--rlp-gray-dark); +} + +.cursor-pointer{ + cursor: pointer; +} + +input:focus, textarea:focus, select:focus{ + border: 1px solid var(--rlp-red) !important; + box-shadow: 0 0 3px var(--rlp-red) !important; + -moz-box-shadow: 0 0 3px var(--rlp-red) !important; + -webkit-box-shadow: 0 0 3px var(--rlp-red) !important; } \ No newline at end of file diff --git a/konova/templates/konova/home.html b/konova/templates/konova/home.html index f4ca1b4..7d45595 100644 --- a/konova/templates/konova/home.html +++ b/konova/templates/konova/home.html @@ -34,7 +34,7 @@
- +
diff --git a/templates/navbar.html b/templates/navbar.html index 7d43b3f..83bc57e 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -15,7 +15,7 @@