Skip to content

Commit

Permalink
BGDIDIC-2651: update link labels
Browse files Browse the repository at this point in the history
  • Loading branch information
faselm committed Dec 5, 2024
1 parent 1916d21 commit bd6f7d4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
18 changes: 13 additions & 5 deletions chsdi/templates/htmlpopup/geologie_reflexionsseismik_line.mako
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,27 @@
</tr>
<tr>
<th class="cell-meta">${_('ch.swisstopo.geologie-reflexionsseismik.link')}</td>
% if c['attributes']['link'] in [None, "-"]:
<td>${'-'}</td>
% if c['attributes']['link'] and c['attributes']['link'].startswith('http'):
<td><a href="${c['attributes']['link']}" target="_blank">${_('link')}</a></td>
% else:
<td><a target="_blank" href="${c['attributes']['link']}">${_('link')}</a></td>
<td>-</td>
% endif
</tr>
<tr>
<th class="cell-meta">${_('ch.swisstopo.geologie-reflexionsseismik.download')}</td>
<td>${c['attributes']['download'] or '-'}</td>
% if c['attributes']['download'] and c['attributes']['download'].startswith('http'):
<td><a href="${c['attributes']['download']}" target="_blank">${_('link')}</a></td>
% else:
<td>-</td>
% endif
</tr>
<tr>
<th class="cell-meta">${_('ch.swisstopo.geologie-reflexionsseismik.swissgeol')}</td>
<td>${c['attributes']['swissgeol'] or '-'}</td>
% if c['attributes']['swissgeol'] and c['attributes']['swissgeol'].startswith('http'):
<td><a href="${c['attributes']['swissgeol']}" target="_blank">${_('link')}</a></td>
% else:
<td>-</td>
% endif
</tr>
</table>
</%def>
18 changes: 13 additions & 5 deletions chsdi/templates/htmlpopup/geologie_reflexionsseismik_poly.mako
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,27 @@
</tr>
<tr>
<th class="cell-meta">${_('ch.swisstopo.geologie-reflexionsseismik.link')}</td>
% if c['attributes']['link'] in [None, "-"]:
<td>${'-'}</td>
% if c['attributes']['link'] and c['attributes']['link'].startswith('http'):
<td><a href="${c['attributes']['link']}" target="_blank">${_('link')}</a></td>
% else:
<td><a target="_blank" href="${c['attributes']['link']}">${_('link')}</a></td>
<td>-</td>
% endif
</tr>
<tr>
<th class="cell-meta">${_('ch.swisstopo.geologie-reflexionsseismik.download')}</td>
<td>${c['attributes']['download'] or '-'}</td>
% if c['attributes']['download'] and c['attributes']['download'].startswith('http'):
<td><a href="${c['attributes']['download']}" target="_blank">${_('link')}</a></td>
% else:
<td>-</td>
% endif
</tr>
<tr>
<th class="cell-meta">${_('ch.swisstopo.geologie-reflexionsseismik.swissgeol')}</td>
<td>${c['attributes']['swissgeol'] or '-'}</td>
% if c['attributes']['swissgeol'] and c['attributes']['swissgeol'].startswith('http'):
<td><a href="${c['attributes']['swissgeol']}" target="_blank">${_('link')}</a></td>
% else:
<td>-</td>
% endif
</tr>
</table>
</%def>

0 comments on commit bd6f7d4

Please sign in to comment.