Compare commits
3 Commits
vision-202
...
042114b1e7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
042114b1e7 | ||
|
|
cb3a75a5a8 | ||
|
|
dccd5e974f |
@@ -21,6 +21,7 @@ class LandForm(forms.ModelForm):
|
||||
"flur",
|
||||
"flurstueck",
|
||||
"adresse",
|
||||
"alkis_kennzeichen",
|
||||
# Flächenangaben
|
||||
"groesse_qm",
|
||||
"gruenland_qm",
|
||||
|
||||
18
app/stiftung/migrations/0054_add_alkis_kennzeichen.py
Normal file
18
app/stiftung/migrations/0054_add_alkis_kennzeichen.py
Normal 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'),
|
||||
),
|
||||
]
|
||||
@@ -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(
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user