Skip to content

Commit

Permalink
Merge pull request #4232 from geoadmin/data-BGDIDIC-2624_milchmarktre…
Browse files Browse the repository at this point in the history
…gionen

BGDIDIC-2624 new layer milchmarktregionen
  • Loading branch information
marionb authored Aug 17, 2023
2 parents 88ec49f + 43391ad commit 18c0c22
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 0 deletions.
18 changes: 18 additions & 0 deletions chsdi/models/vector/evd.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,21 @@ class UrsprungsbezeichnungenSpirituosen(Base, Vector):
the_geom = Column(Geometry2D)

register('ch.blw.ursprungsbezeichnungen-spirituosen', UrsprungsbezeichnungenSpirituosen)


class Milchmarktregionen(Base, Vector):
__tablename__ = 'milchmarktregionen'
__table_args__ = ({'schema': 'blw', 'autoload': False})
__bodId__ = 'ch.blw.milchmarktregionen'
__template__ = 'templates/htmlpopup/milchmarktregionen.mako'
__label__ = 'milchreg'
id = Column('bgdi_id', Integer, primary_key=True)
milchreg = Column('milchreg', Unicode)
bez_de = Column('bez_de', Unicode)
bez_fr = Column('bez_fr', Unicode)
bez_it = Column('bez_it', Unicode)
bez_en = Column('bez_en', Unicode)
bez_rm = Column('bez_rm', Unicode)
the_geom = Column(Geometry2D)

register('ch.blw.milchmarktregionen', Milchmarktregionen)
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.
15 changes: 15 additions & 0 deletions chsdi/templates/htmlpopup/milchmarktregionen.mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%inherit file="base.mako"/>

<%def name="table_body(c, lang)">
<%
lang = lang if lang in ('fr','it','en') else 'de'
bez_text = 'bez_%s' % lang
%>
<tr>
<td class="cell-left">${_('ch.blw.milchmarktregionen.milchreg')}</td>
<td class="cell-left">${c['attributes'][bez_text] or '-' }</td>
</tr>
</%def>

0 comments on commit 18c0c22

Please sign in to comment.