Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanw committed Jan 24, 2025
1 parent 7042433 commit 3eaf6ac
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fragdenstaat_de/fds_cms/cms_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,12 @@ class FdsCmsPlainAPIApp(CMSApp):

def get_urls(self, page=None, language=None, **kwargs):
return ["fragdenstaat_de.fds_cms.urls_plainapi"]


@apphook_pool.register
class DatashowCMSApp(CMSApp):
name = "Datashow CMS App"
app_name = "datashow"

def get_urls(self, page=None, language=None, **kwargs):
return ["datashow.urls"]
1 change: 1 addition & 0 deletions fragdenstaat_de/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def INSTALLED_APPS(self):
# Additional CMS plugins
"sortabletable",
"contractor",
"datashow",
"djcelery_email",
"django.contrib.redirects",
"django_prices",
Expand Down
2 changes: 2 additions & 0 deletions fragdenstaat_de/templates/datashow/_filterform.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% load i18n form_helper %}
{% render_form form %}
56 changes: 56 additions & 0 deletions fragdenstaat_de/templates/datashow/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% extends "base.html" %}
{% load static i18n %}
{% load cms_tags %}
{% block css %}
{{ block.super }}
<link rel="stylesheet" href="{% static 'datashow/css/datashow.css' %}">
{% endblock %}
{% block body %}
<div class="text-bg-secondary mb-3">
<nav class="container-md" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
{# djlint:off D018 #}
<a href="/"> {# djlint:on #}
<i class="fa fa-home"></i>
<span class="sr-only">{% trans "Home Page" %}</span>
</a>
</li>
<li class="breadcrumb-item">
{% if dataset %}
{% page_url "datasets" as datasets_url %}
<a href="{{ datasets_url|default:'/daten/' }}">{% translate "Datasets" %}</a>
{% else %}
{% translate "Datasets" %}
{% endif %}
</li>
<li class="breadcrumb-item">
{% if table %}
<a href="{{ dataset.get_absolute_url }}">{{ dataset.name }}</a>
{% else %}
{{ dataset.name }}
{% endif %}
</li>
{% if table and dataset.default_table != table %}
<li class="breadcrumb-item">
{% if row %}
<a href="{{ table.get_absolute_url }}">{{ table.label }}</a>
{% else %}
{{ table.label }}
{% endif %}
</li>
{% endif %}
{% if row %}<li class="breadcrumb-item">{{ row_label }}</li>{% endif %}
</ol>
</nav>
</div>
<div class="container mb-3">
{% block app_body %}
{% block content %}{% endblock %}
{% endblock %}
</div>
{% endblock %}
{% block scripts %}
{{ block.super }}
<script type="text/javascript" src="{% static 'datashow/js/htmx.min.js' %}"></script>
{% endblock %}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies = [
"django-contractor>=0.0.8",
"django-contrib-comments>=2.2.0",
"django-crossdomainmedia>=0.0.4",
"django-datashow>=0.1.0",
"django-elasticsearch-dsl>=8.0,<9.0",
"django-filer>=3.0.0",
"django-filingcabinet @ git+https://github.com/okfde/django-filingcabinet.git@main",
Expand Down

0 comments on commit 3eaf6ac

Please sign in to comment.