Skip to content

Commit

Permalink
Added layer BGDIDIC-2865: ch.babs.notfalltreffpunkte
Browse files Browse the repository at this point in the history
  • Loading branch information
rebert committed Sep 18, 2024
1 parent 8dfd63b commit 45093a3
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 0 deletions.
37 changes: 37 additions & 0 deletions chsdi/models/vector/vbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,43 @@ class BundestankstellenBebecoZoom2(Base, BundestankstellenBebeco, Vector):
register(BundestankstellenBebeco.__bodId__, BundestankstellenBebecoZoom2)


class Notfalltreffpunkte:
__tablename__ = 'v_notfalltreffpunkte'
__table_args__ = ({'schema': 'babs', 'autoload': False, 'extend_existing': True})
__template__ = 'templates/htmlpopup/notfalltreffpunkte.mako'
__bodId__ = 'ch.babs.notfalltreffpunkte'
__label__ = 'id'
__returnedGeometry__ = 'the_geom_point'
id = Column('ntp_id', Unicode, primary_key=True)
gebbezeichnung = Column('gebbezeichnung', Unicode)
strasse = Column('strasse', Unicode)
haus_nummer = Column('haus_nummer', Unicode)
plz = Column('plz', Integer)
ort = Column('ort', Unicode)
gemeinde = Column('gemeinde', Unicode)
kanton = Column('kanton', Unicode)
xkoord = Column('xkoord', Integer)
ykoord = Column('ykoord', Integer)
linkkanton = Column('linkkanton', Unicode)
linkbabs = Column('linkbabs', Unicode)
bemerkungen = Column('bemerkungen', Unicode)
the_geom_point = Column('the_geom', Geometry2D)


class NotfalltreffpunkteZoom1(Base, Notfalltreffpunkte, Vector):
__minscale__ = 1
__maxscale__ = 100000
the_geom = Column('the_geom_tooltip_2', Geometry2D)

register(NotfalltreffpunkteZoom1.__bodId__, NotfalltreffpunkteZoom1)


class NotfalltreffpunkteZoom2(Base, Notfalltreffpunkte, Vector):
__minscale__ = 100000
the_geom = Column('the_geom_tooltip', Geometry2D)

register(NotfalltreffpunkteZoom2.__bodId__, NotfalltreffpunkteZoom2)

class LogistikraeumeArmeelogistikcenter(Base, Vector):
__tablename__ = 'abschnittsregionen_armeelogistikzentren'
__table_args__ = ({'schema': 'militaer', 'autoload': False})
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions chsdi/templates/htmlpopup/notfalltreffpunkte.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<%inherit file="base.mako"/>

<%def name="table_body(c, lang)">
<% c['stable_id'] = True %>
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.ntp_id')}</td> <td>${c['featureId']}</td></tr>
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.gebbezeichnung')}</td> <td>${c['attributes']['gebbezeichnung']}</td></tr>
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.strasse')}</td> <td>${c['attributes']['strasse']}</td></tr>
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.haus_nummer')}</td> <td>${c['attributes']['haus_nummer']}</td></tr>
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.plz_ort')}</td><td>${c['attributes']['plz']}&nbsp;${c['attributes']['ort']}</td></tr>
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.gemeinde')}</td><td>${c['attributes']['gemeinde']}</td></tr>
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.kanton')}</td><td>${c['attributes']['kanton']}</td></tr>
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.koord')}</td><td>${c['attributes']['xkoord']},&nbsp;${c['attributes']['ykoord']}</td></tr>
% if c['attributes']['linkkanton'] is not None:
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.linkkanton')}</td><td><a href="${c['attributes']['linkkanton']}" target="_blank">${_('link')}</a></td></tr>
% else:
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.linkkanton')}</td><td>-</td></tr>
% endif
% if c['attributes']['linkbabs'] is not None:
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.linkbabs')}</td><td><a href="${c['attributes']['linkbabs']}" target="_blank">${_('link')}</a></td></tr>
% else:
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.linkbabs')}</td><td>-</td></tr>
% endif
<tr><td class="cell-left">${_('ch.babs.notfalltreffpunkte.bemerkungen')}</td><td>${c['attributes']['bemerkungen'] or "-"}</td></tr>
</%def>

0 comments on commit 45093a3

Please sign in to comment.