From 52de00b155484cc07c68c1c5c5e178df93b14a60 Mon Sep 17 00:00:00 2001 From: Marion Baumgartner Date: Wed, 16 Aug 2023 09:25:58 +0200 Subject: [PATCH 1/2] BGDIDIC-2624 add legends --- .../legends/ch.blw.milchmarktregionen_de.png | Bin 0 -> 1306 bytes .../legends/ch.blw.milchmarktregionen_en.png | Bin 0 -> 1306 bytes .../legends/ch.blw.milchmarktregionen_fr.png | Bin 0 -> 1327 bytes .../legends/ch.blw.milchmarktregionen_it.png | Bin 0 -> 1402 bytes .../legends/ch.blw.milchmarktregionen_rm.png | Bin 0 -> 1306 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 chsdi/static/images/legends/ch.blw.milchmarktregionen_de.png create mode 100644 chsdi/static/images/legends/ch.blw.milchmarktregionen_en.png create mode 100644 chsdi/static/images/legends/ch.blw.milchmarktregionen_fr.png create mode 100644 chsdi/static/images/legends/ch.blw.milchmarktregionen_it.png create mode 100644 chsdi/static/images/legends/ch.blw.milchmarktregionen_rm.png diff --git a/chsdi/static/images/legends/ch.blw.milchmarktregionen_de.png b/chsdi/static/images/legends/ch.blw.milchmarktregionen_de.png new file mode 100644 index 0000000000000000000000000000000000000000..4db90f50697275049c050508a89903b32831819f GIT binary patch literal 1306 zcmV+#1?BpQP)Y>`En4#DPN}q|(r|LNt~9V08J=m4c!V7G0>6 zF#2McAOspjr`v%_ycBdnEwu|s2?^Wt@V?8LGw!?X?mIL4{+Is`ez>zU`<~fnXWrR) z&Os5wFbu=!1=hW`rdEW3;ZK6+<(vdZMeg=Ecy{C%SxytTU&X;tHVr)&Ws_hhLay5l zzlGny-{Bs3al~$427ioreV!-as|Ai%S+LooVGMi+ZjRXPv2b$4>+|$Pu;d}Q!$0P< zupE8?zl0CU@KkXD+#>FXe*wM%FM$`rO@5ova4j72uV3k(BX7aG;2_)umj(7yZLs&i zJ7K@LH~t%3=(o8SehR0;GvH3Yj^T3pco5^PjMVkv_{aGmdpcP1l(^G!JiG?} z3YUtz(C~C0@Y_8j?xMCDehmMCvt(qjH;6kz7kLlD1%6%6279u&EB5%@^ITp7FZIha z;A8N4c&&eKly@F{08SG(NAp_&FLFyW)Rf&qF^-_-D-j*nu_kEgVkJgCmpQjqC4qeH5c6~f+gCD zZZ*LYO+|N-!S+JYy+quNO?#9aYz)ea?s9KwW3i&!Fbu;mDr4>)>uN<97+zb^&F|gZ z$42{iy0Pm9c)z$lqjf3@R#VYU9)Yj>$2W=l z;M$|&sX#-~P0oUUiu<+qyKr&f{e|hm9GiO4U59h~-Qv!gQv>fWOqVWRDHq*!ZWkA7 zXaA*1$-!zYy6cSf`*=~{y)~!gU}Ml-beDWf8;cd)hG7_nQ5p9ym{Tjl!0;N1ZkE?m z0_*sf-K|%JSs2QOwf#{x306bV&AUCeS@{q9eE7Gx_s~8S1)Flw&7y^WtJRl#em#7% z<59a1EJ>~Cei^=$S?15@Q9LKG{r^)@u&Ec_>>3V>I}-?d;XM*_EvP8i)QfJyuJ=~| zc!RhPv~wz+3Q{e)38#sT;^y2V;?ADV>B1bFV$n_bw*~yh!fEUMz&5SZrHfZ;MRy&3 zTjBI`bCYdaqvT+<6y0?=uk%A3-DI2AC^^^|bQj$v-_pinMYmxXhGCS!e~paM_c5Ny QcK`qY07*qoM6N<$f+*^b0ssI2 literal 0 HcmV?d00001 diff --git a/chsdi/static/images/legends/ch.blw.milchmarktregionen_en.png b/chsdi/static/images/legends/ch.blw.milchmarktregionen_en.png new file mode 100644 index 0000000000000000000000000000000000000000..4db90f50697275049c050508a89903b32831819f GIT binary patch literal 1306 zcmV+#1?BpQP)Y>`En4#DPN}q|(r|LNt~9V08J=m4c!V7G0>6 zF#2McAOspjr`v%_ycBdnEwu|s2?^Wt@V?8LGw!?X?mIL4{+Is`ez>zU`<~fnXWrR) z&Os5wFbu=!1=hW`rdEW3;ZK6+<(vdZMeg=Ecy{C%SxytTU&X;tHVr)&Ws_hhLay5l zzlGny-{Bs3al~$427ioreV!-as|Ai%S+LooVGMi+ZjRXPv2b$4>+|$Pu;d}Q!$0P< zupE8?zl0CU@KkXD+#>FXe*wM%FM$`rO@5ova4j72uV3k(BX7aG;2_)umj(7yZLs&i zJ7K@LH~t%3=(o8SehR0;GvH3Yj^T3pco5^PjMVkv_{aGmdpcP1l(^G!JiG?} z3YUtz(C~C0@Y_8j?xMCDehmMCvt(qjH;6kz7kLlD1%6%6279u&EB5%@^ITp7FZIha z;A8N4c&&eKly@F{08SG(NAp_&FLFyW)Rf&qF^-_-D-j*nu_kEgVkJgCmpQjqC4qeH5c6~f+gCD zZZ*LYO+|N-!S+JYy+quNO?#9aYz)ea?s9KwW3i&!Fbu;mDr4>)>uN<97+zb^&F|gZ z$42{iy0Pm9c)z$lqjf3@R#VYU9)Yj>$2W=l z;M$|&sX#-~P0oUUiu<+qyKr&f{e|hm9GiO4U59h~-Qv!gQv>fWOqVWRDHq*!ZWkA7 zXaA*1$-!zYy6cSf`*=~{y)~!gU}Ml-beDWf8;cd)hG7_nQ5p9ym{Tjl!0;N1ZkE?m z0_*sf-K|%JSs2QOwf#{x306bV&AUCeS@{q9eE7Gx_s~8S1)Flw&7y^WtJRl#em#7% z<59a1EJ>~Cei^=$S?15@Q9LKG{r^)@u&Ec_>>3V>I}-?d;XM*_EvP8i)QfJyuJ=~| zc!RhPv~wz+3Q{e)38#sT;^y2V;?ADV>B1bFV$n_bw*~yh!fEUMz&5SZrHfZ;MRy&3 zTjBI`bCYdaqvT+<6y0?=uk%A3-DI2AC^^^|bQj$v-_pinMYmxXhGCS!e~paM_c5Ny QcK`qY07*qoM6N<$f+*^b0ssI2 literal 0 HcmV?d00001 diff --git a/chsdi/static/images/legends/ch.blw.milchmarktregionen_fr.png b/chsdi/static/images/legends/ch.blw.milchmarktregionen_fr.png new file mode 100644 index 0000000000000000000000000000000000000000..6663eb4b27aa6329de8020c3ea6d869ddc6a4ac4 GIT binary patch literal 1327 zcmV+~1rn%h;Ut8aCk z86sjBhG7`Pz}lx)cj_=O{2uV|oO9u{f^BER$bvA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tkJ|T>P1{#N3RuRvx6` zZHaY0+Rr7*d@JVB-jmQa=uYUHlKM_cx#9fxwnP~&|6-Rko)&;l(b5uYH}+ zWhvJXyy0ZKn8%wJI2-y6S}SINW4E!~mfIm_Fx?29fG$F}OJBq1iD}U*t$u|T+kGy> zM~E3LU$$l0OX;=n7 zD?c)x+WW%3oR9Pm(C5owQb1j9+F0R+Fj z>`d(Ad9u~dbR1hwPKL)4K=3C0A?67q{FZ*kaa=k%86HajLHJGn9=p6tOoOPMoV%3J z0|>%yX}_30{k)i`rFNRohldeo_Bl zKM7>(3@Lyhydgi^bF1wa zeq3a1cnkqV5q2p{s+6ft#)kV4X8@7$)ZP~jAQVMW6lEarKL~v->x0^;i~s-t07*qo IM6N<$f-FOiSpWb4 literal 0 HcmV?d00001 diff --git a/chsdi/static/images/legends/ch.blw.milchmarktregionen_rm.png b/chsdi/static/images/legends/ch.blw.milchmarktregionen_rm.png new file mode 100644 index 0000000000000000000000000000000000000000..4db90f50697275049c050508a89903b32831819f GIT binary patch literal 1306 zcmV+#1?BpQP)Y>`En4#DPN}q|(r|LNt~9V08J=m4c!V7G0>6 zF#2McAOspjr`v%_ycBdnEwu|s2?^Wt@V?8LGw!?X?mIL4{+Is`ez>zU`<~fnXWrR) z&Os5wFbu=!1=hW`rdEW3;ZK6+<(vdZMeg=Ecy{C%SxytTU&X;tHVr)&Ws_hhLay5l zzlGny-{Bs3al~$427ioreV!-as|Ai%S+LooVGMi+ZjRXPv2b$4>+|$Pu;d}Q!$0P< zupE8?zl0CU@KkXD+#>FXe*wM%FM$`rO@5ova4j72uV3k(BX7aG;2_)umj(7yZLs&i zJ7K@LH~t%3=(o8SehR0;GvH3Yj^T3pco5^PjMVkv_{aGmdpcP1l(^G!JiG?} z3YUtz(C~C0@Y_8j?xMCDehmMCvt(qjH;6kz7kLlD1%6%6279u&EB5%@^ITp7FZIha z;A8N4c&&eKly@F{08SG(NAp_&FLFyW)Rf&qF^-_-D-j*nu_kEgVkJgCmpQjqC4qeH5c6~f+gCD zZZ*LYO+|N-!S+JYy+quNO?#9aYz)ea?s9KwW3i&!Fbu;mDr4>)>uN<97+zb^&F|gZ z$42{iy0Pm9c)z$lqjf3@R#VYU9)Yj>$2W=l z;M$|&sX#-~P0oUUiu<+qyKr&f{e|hm9GiO4U59h~-Qv!gQv>fWOqVWRDHq*!ZWkA7 zXaA*1$-!zYy6cSf`*=~{y)~!gU}Ml-beDWf8;cd)hG7_nQ5p9ym{Tjl!0;N1ZkE?m z0_*sf-K|%JSs2QOwf#{x306bV&AUCeS@{q9eE7Gx_s~8S1)Flw&7y^WtJRl#em#7% z<59a1EJ>~Cei^=$S?15@Q9LKG{r^)@u&Ec_>>3V>I}-?d;XM*_EvP8i)QfJyuJ=~| zc!RhPv~wz+3Q{e)38#sT;^y2V;?ADV>B1bFV$n_bw*~yh!fEUMz&5SZrHfZ;MRy&3 zTjBI`bCYdaqvT+<6y0?=uk%A3-DI2AC^^^|bQj$v-_pinMYmxXhGCS!e~paM_c5Ny QcK`qY07*qoM6N<$f+*^b0ssI2 literal 0 HcmV?d00001 From 43391ad9d8afa9bde40f6bfc1c7e1f098ab4e399 Mon Sep 17 00:00:00 2001 From: Marion Baumgartner Date: Wed, 16 Aug 2023 10:11:58 +0200 Subject: [PATCH 2/2] BGDIDIC-2624 add html popup for new layer --- chsdi/models/vector/evd.py | 18 ++++++++++++++++++ .../htmlpopup/milchmarktregionen.mako | 15 +++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 chsdi/templates/htmlpopup/milchmarktregionen.mako diff --git a/chsdi/models/vector/evd.py b/chsdi/models/vector/evd.py index f2d83238ab..1fa0e3b18b 100644 --- a/chsdi/models/vector/evd.py +++ b/chsdi/models/vector/evd.py @@ -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) diff --git a/chsdi/templates/htmlpopup/milchmarktregionen.mako b/chsdi/templates/htmlpopup/milchmarktregionen.mako new file mode 100644 index 0000000000..2e9ad43186 --- /dev/null +++ b/chsdi/templates/htmlpopup/milchmarktregionen.mako @@ -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 +%> + + + ${_('ch.blw.milchmarktregionen.milchreg')} + ${c['attributes'][bez_text] or '-' } + + +