diff --git a/chsdi/models/vector/evd.py b/chsdi/models/vector/evd.py index 3869c9e4a3..911a81d2f6 100644 --- a/chsdi/models/vector/evd.py +++ b/chsdi/models/vector/evd.py @@ -262,23 +262,21 @@ class SachplanCernAnhoerungFac: class SachplanCernAnhoerungFacPnt(Base, SachplanCernAnhoerungFac, Vector): __tablename__ = 'sachplan_cern_anhoerung_fac_pnt' - __template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_pnt.mako' + __template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_pnt.mako' register('ch.sbfi.sachplan-cern_anhoerung', SachplanCernAnhoerungFacPnt) class SachplanCernAnhoerungFacLine(Base, SachplanCernAnhoerungFac, Vector): __tablename__ = 'sachplan_cern_anhoerung_fac_line' - __template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_line.mako' + __template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_line.mako' register('ch.sbfi.sachplan-cern_anhoerung', SachplanCernAnhoerungFacLine) -class SachplanCernAnhoerungPlmPoly(Base, Vector): - __tablename__ = 'sachplan_cern_anhoerung_plm_poly' +class SachplanCernAnhoerungPlm: __table_args__ = ({'schema': 'sbfi', 'autoload': False}) __bodId__ = 'ch.sbfi.sachplan-cern_anhoerung' - __template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_poly.mako' __label__ = 'plname_de' id = Column('bgdi_id', Integer, primary_key=True) plname_de = Column('plname_de', Unicode) @@ -306,6 +304,10 @@ class SachplanCernAnhoerungPlmPoly(Base, Vector): doc_web_it = Column('doc_web_it', Unicode) the_geom = Column(Geometry2D) +class SachplanCernAnhoerungPlmPoly(Base, SachplanCernAnhoerungPlm, Vector): + __tablename__ = 'sachplan_cern_anhoerung_plm_poly' + __template__ = 'templates/htmlpopup/sbfi_sachplan_cern_anhoerung_plm_poly.mako' + register('ch.sbfi.sachplan-cern_anhoerung', SachplanCernAnhoerungPlmPoly) diff --git a/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_line.mako b/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_line.mako similarity index 82% rename from chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_line.mako rename to chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_line.mako index 67a5825119..d82ee54133 100644 --- a/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_line.mako +++ b/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_line.mako @@ -32,8 +32,12 @@ ${_('ch.sbfi.sachplan-cern_anhoerung.web')} - % if c['attributes'][doc_web_text].startswith('http'): - ${c['attributes'][title_text]} + % if c['attributes'][doc_web_text]: + % if c['attributes'][doc_web_text].startswith('http'): + ${c['attributes'][title_text]} + % else: + - + % endif % else: - % endif diff --git a/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_pnt.mako b/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_pnt.mako similarity index 82% rename from chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_pnt.mako rename to chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_pnt.mako index 67a5825119..d82ee54133 100644 --- a/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_pnt.mako +++ b/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_fac_pnt.mako @@ -32,8 +32,12 @@ ${_('ch.sbfi.sachplan-cern_anhoerung.web')} - % if c['attributes'][doc_web_text].startswith('http'): - ${c['attributes'][title_text]} + % if c['attributes'][doc_web_text]: + % if c['attributes'][doc_web_text].startswith('http'): + ${c['attributes'][title_text]} + % else: + - + % endif % else: - % endif diff --git a/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_poly.mako b/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_plm_poly.mako similarity index 85% rename from chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_poly.mako rename to chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_plm_poly.mako index b1309783e2..861c964146 100644 --- a/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_poly.mako +++ b/chsdi/templates/htmlpopup/sbfi_sachplan_cern_anhoerung_plm_poly.mako @@ -41,8 +41,12 @@ ${_('ch.sbfi.sachplan-cern_anhoerung.web')} - % if c['attributes'][doc_web_text].startswith('http'): - ${c['attributes'][title_text]} + % if c['attributes'][doc_web_text]: + % if c['attributes'][doc_web_text].startswith('http'): + ${c['attributes'][title_text]} + % else: + - + % endif % else: - % endif