Skip to content

Commit

Permalink
BGDIDIC-2622: fix web url
Browse files Browse the repository at this point in the history
  • Loading branch information
faselm committed Nov 15, 2024
1 parent 8ae1290 commit bd8eefc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
12 changes: 7 additions & 5 deletions chsdi/models/vector/evd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@
</tr>
<tr>
<td class="cell-left">${_('ch.sbfi.sachplan-cern_anhoerung.web')}</td>
% if c['attributes'][doc_web_text].startswith('http'):
<td><a href="${c['attributes'][doc_web_text]}" target="_blank">${c['attributes'][title_text]}</a></td>
% if c['attributes'][doc_web_text]:
% if c['attributes'][doc_web_text].startswith('http'):
<td><a href="${c['attributes'][doc_web_text]}" target="_blank">${c['attributes'][title_text]}</a></td>
% else:
<td>-</td>
% endif
% else:
<td>-</td>
% endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@
</tr>
<tr>
<td class="cell-left">${_('ch.sbfi.sachplan-cern_anhoerung.web')}</td>
% if c['attributes'][doc_web_text].startswith('http'):
<td><a href="${c['attributes'][doc_web_text]}" target="_blank">${c['attributes'][title_text]}</a></td>
% if c['attributes'][doc_web_text]:
% if c['attributes'][doc_web_text].startswith('http'):
<td><a href="${c['attributes'][doc_web_text]}" target="_blank">${c['attributes'][title_text]}</a></td>
% else:
<td>-</td>
% endif
% else:
<td>-</td>
% endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
</tr>
<tr>
<td class="cell-left">${_('ch.sbfi.sachplan-cern_anhoerung.web')}</td>
% if c['attributes'][doc_web_text].startswith('http'):
<td><a href="${c['attributes'][doc_web_text]}" target="_blank">${c['attributes'][title_text]}</a></td>
% if c['attributes'][doc_web_text]:
% if c['attributes'][doc_web_text].startswith('http'):
<td><a href="${c['attributes'][doc_web_text]}" target="_blank">${c['attributes'][title_text]}</a></td>
% else:
<td>-</td>
% endif
% else:
<td>-</td>
% endif
Expand Down

0 comments on commit bd8eefc

Please sign in to comment.