Compare commits

..

3 Commits

Author SHA1 Message Date
SysAdmin Agent
042114b1e7 Fix OGC API URL: Items → items (lowercase)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
The OGC API endpoint is case-sensitive and requires lowercase 'items'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 22:56:07 +00:00
SysAdmin Agent
cb3a75a5a8 Add ALKIS Kennzeichen field to land edit form template
The field was in the Django form but not rendered in the template.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 22:17:56 +00:00
SysAdmin Agent
dccd5e974f Add ALKIS Flurstückskennzeichen field for direct cadastre links
When an ALKIS identifier is set on a Land record, the button links to
ogc-api.nrw.de detail view instead of the imprecise TIM-Online search.
Falls back to TIM-Online when no ALKIS number is present.

Closes STI-57

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 21:57:27 +00:00
6 changed files with 60 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ class LandForm(forms.ModelForm):
"flur",
"flurstueck",
"adresse",
"alkis_kennzeichen",
# Flächenangaben
"groesse_qm",
"gruenland_qm",

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.0.6 on 2026-03-13 21:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stiftung', '0053_geschichte_dokumente_m2m'),
]
operations = [
migrations.AddField(
model_name='land',
name='alkis_kennzeichen',
field=models.CharField(blank=True, help_text='z.B. 05300800400030______ — für direkte Verlinkung zum Katasteramt', max_length=30, null=True, verbose_name='ALKIS Flurstückskennzeichen'),
),
]

View File

@@ -137,6 +137,13 @@ class Land(models.Model):
adresse = models.CharField(
max_length=200, null=True, blank=True, verbose_name="Adresse/Ortsangabe"
)
alkis_kennzeichen = models.CharField(
max_length=30,
null=True,
blank=True,
verbose_name="ALKIS Flurstückskennzeichen",
help_text="z.B. 05300800400030______ — für direkte Verlinkung zum Katasteramt",
)
# Flächenangaben
groesse_qm = models.DecimalField(

View File

@@ -25,10 +25,17 @@
</div>
<div class="col-md-4 text-end">
<div class="btn-group" role="group">
{% if land.alkis_kennzeichen %}
<a href="https://ogc-api.nrw.de/lika/v1/collections/flurstueck/items/{{ land.alkis_kennzeichen|urlencode }}"
class="btn btn-outline-success" title="Flurstück im Kataster anzeigen" target="_blank" rel="noopener">
<i class="fas fa-map-marked-alt me-2"></i>Kataster
</a>
{% else %}
<a href="https://www.tim-online.nrw.de/tim-online2/?WFS_gemarkung={{ land.gemarkung|urlencode }}&WFS_flur={{ land.flur|urlencode }}&WFS_flurstueck={{ land.flurstueck|urlencode }}"
class="btn btn-outline-success" title="TIM-Online NRW öffnen" target="_blank" rel="noopener">
<i class="fas fa-map-marked-alt me-2"></i>TIM-Online
</a>
{% endif %}
<a href="{% url 'stiftung:land_update' land.pk %}" class="btn btn-warning">
<i class="fas fa-edit me-2"></i>Bearbeiten
</a>

View File

@@ -182,6 +182,26 @@
</div>
</div>
<!-- ALKIS Kennzeichen -->
<div class="row mb-4">
<div class="col-md-6">
<div class="mb-3">
<label for="{{ form.alkis_kennzeichen.id_for_label }}" class="form-label">
{{ form.alkis_kennzeichen.label }}
</label>
{{ form.alkis_kennzeichen }}
<small class="form-text text-muted">{{ form.alkis_kennzeichen.help_text }}</small>
{% if form.alkis_kennzeichen.errors %}
<div class="invalid-feedback d-block">
{% for error in form.alkis_kennzeichen.errors %}
{{ error }}
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
<!-- Flächenangaben -->
<div class="row mb-4">
<div class="col-12">

View File

@@ -249,10 +249,17 @@
class="btn btn-sm btn-outline-primary" title="Anzeigen">
<i class="fas fa-eye"></i>
</a>
{% if land.alkis_kennzeichen %}
<a href="https://ogc-api.nrw.de/lika/v1/collections/flurstueck/items/{{ land.alkis_kennzeichen|urlencode }}"
class="btn btn-sm btn-outline-success" title="Kataster" target="_blank" rel="noopener">
<i class="fas fa-map-marked-alt"></i>
</a>
{% else %}
<a href="https://www.tim-online.nrw.de/tim-online2/?WFS_gemarkung={{ land.gemarkung|urlencode }}&WFS_flur={{ land.flur|urlencode }}&WFS_flurstueck={{ land.flurstueck|urlencode }}"
class="btn btn-sm btn-outline-success" title="TIM-Online NRW" target="_blank" rel="noopener">
<i class="fas fa-map-marked-alt"></i>
</a>
{% endif %}
<a href="{% url 'stiftung:land_update' land.pk %}"
class="btn btn-sm btn-outline-warning" title="Bearbeiten">
<i class="fas fa-edit"></i>