Skip to content

Commit

Permalink
Merge pull request #4179 from geoadmin/feat-BGDIDIC-2590-landesforsti…
Browse files Browse the repository at this point in the history
…nventar-kantone

Feat bgdidic 2590 landesforstinventar kantone
  • Loading branch information
faselm authored Apr 25, 2023
2 parents 4ac0d3e + 65fd89b commit a278c29
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 0 deletions.
18 changes: 18 additions & 0 deletions chsdi/models/vector/bafu.py
Original file line number Diff line number Diff line change
Expand Up @@ -2418,3 +2418,21 @@ class WaldbrandWarnung(Base, Vector):
the_geom = Column('the_geom', Geometry2D)

register(WaldbrandWarnung.__bodId__, WaldbrandWarnung)


class LandesforstinventarKantone(Base, Vector):
__tablename__ = 'landesforstinventar_kantone'
__table_args__ = ({'schema': 'diverse', 'autoload': False})
__bodId__ = 'ch.bafu.landesforstinventar-kantone'
__template__ = 'templates/htmlpopup/bafu_landesforstinventar_kantone.mako'
__label__ = 'id'
id = Column('bgdi_id', Integer, primary_key=True)
kantonid = Column('kantonid', Integer)
kantonname_de = Column('kantonname_de', Unicode)
kantonname_fr = Column('kantonname_fr', Unicode)
kantonname_it = Column('kantonname_it', Unicode)
kantonname_en = Column('kantonname_en', Unicode)
alternatename = Column('alternatename', Unicode)
the_geom = Column('the_geom', Geometry2D)

register(LandesforstinventarKantone.__bodId__, LandesforstinventarKantone)
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.
21 changes: 21 additions & 0 deletions chsdi/templates/htmlpopup/bafu_landesforstinventar_kantone.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<%inherit file="base.mako"/>

<%def name="table_body(c, lang)">
<%
lang = lang if lang in ('fr','it', 'en') else 'de'
kantonname = 'kantonname_%s' %lang
%>
<tr>
<td class="cell-left">${_('ch.bafu.landesforstinventar-kantone.id')}</td>
<td>${c['attributes']['kantonid'] or '-'}</td>
</tr>
<tr>
<td class="cell-left">${_('ch.bafu.landesforstinventar-kantone.name')}</td>
<td>${c['attributes'][kantonname] or '-'}</td>
</tr>
<tr>
<td class="cell-left">${_('ch.bafu.landesforstinventar-kantone.abb')}</td>
<td>${c['attributes']['alternatename'] or '-'}</td>
</tr>
</%def>

0 comments on commit a278c29

Please sign in to comment.