Skip to content

Commit

Permalink
Merge pull request #4484 from geoadmin/data-BGDIDIC-2622-cern
Browse files Browse the repository at this point in the history
BGDIDIC-2622: add title and doc_web translations
  • Loading branch information
faselm authored Nov 11, 2024
2 parents c63829a + 80f8b61 commit 513a20c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
14 changes: 12 additions & 2 deletions chsdi/models/vector/evd.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,12 @@ class SachplanCernAnhoerungFac:
description_fr = Column('description_fr', Unicode)
description_it = Column('description_it', Unicode)
validfrom = Column('validfrom', Unicode)
doc_web = Column('doc_web', Unicode)
title_de = Column('title_de', Unicode)
title_fr = Column('title_fr', Unicode)
title_it = Column('title_it', Unicode)
doc_web_de = Column('doc_web_de', Unicode)
doc_web_fr = Column('doc_web_fr', Unicode)
doc_web_it = Column('doc_web_it', Unicode)
the_geom = Column(Geometry2D)


Expand Down Expand Up @@ -293,7 +298,12 @@ class SachplanCernAnhoerungPlmPoly(Base, Vector):
description_de = Column('description_de', Unicode)
description_fr = Column('description_fr', Unicode)
description_it = Column('description_it', Unicode)
doc_web = Column('doc_web', Unicode)
title_de = Column('title_de', Unicode)
title_fr = Column('title_fr', Unicode)
title_it = Column('title_it', Unicode)
doc_web_de = Column('doc_web_de', Unicode)
doc_web_fr = Column('doc_web_fr', Unicode)
doc_web_it = Column('doc_web_it', Unicode)
the_geom = Column(Geometry2D)

register('ch.sbfi.sachplan-cern_anhoerung', SachplanCernAnhoerungPlmPoly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
fackind_text = 'fackind_text_%s' %lang
facstatus_text = 'facstatus_text_%s' %lang
description_text = 'description_%s' %lang
title_text = 'title_%s' %lang
doc_web_text = 'doc_web_%s' %lang
%>
<tr>
<td class="cell-left">${_('ch.sbfi.sachplan-cern_anhoerung.fac_name')}</td>
Expand All @@ -30,7 +32,11 @@
</tr>
<tr>
<td class="cell-left">${_('ch.sbfi.sachplan-cern_anhoerung.web')}</td>
<td>${c['attributes']['doc_web'] or '-'}</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>
% else:
<td>-</td>
% endif
</tr>
</%def>

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
fackind_text = 'fackind_text_%s' %lang
facstatus_text = 'facstatus_text_%s' %lang
description_text = 'description_%s' %lang
title_text = 'title_%s' %lang
doc_web_text = 'doc_web_%s' %lang
%>
<tr>
<td class="cell-left">${_('ch.sbfi.sachplan-cern_anhoerung.fac_name')}</td>
Expand All @@ -30,7 +32,11 @@
</tr>
<tr>
<td class="cell-left">${_('ch.sbfi.sachplan-cern_anhoerung.web')}</td>
<td>${c['attributes']['doc_web'] or '-'}</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>
% else:
<td>-</td>
% endif
</tr>
</%def>

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
coordlevel_text = 'coordlevel_text_%s' %lang
plstatus_text = 'plstatus_text_%s' %lang
description_text = 'description_%s' %lang
title_text = 'title_%s' %lang
doc_web_text = 'doc_web_%s' %lang
%>
<tr>
<td class="cell-left">${_('ch.sbfi.sachplan-cern_anhoerung.pl_name')}</td>
Expand Down Expand Up @@ -39,7 +41,11 @@
</tr>
<tr>
<td class="cell-left">${_('ch.sbfi.sachplan-cern_anhoerung.web')}</td>
<td>${c['attributes']['doc_web'] or '-'}</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>
% else:
<td>-</td>
% endif
</tr>
</%def>

0 comments on commit 513a20c

Please sign in to comment.