Skip to content

Commit

Permalink
Merge pull request #4495 from geoadmin/fix-PB-1222-link-to-object-new…
Browse files Browse the repository at this point in the history
…-scheme

PB-1222 : link to object time=None fix
  • Loading branch information
rebert authored Nov 27, 2024
2 parents 4b8e5f5 + 3663bc4 commit 916c898
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions chsdi/templates/htmlpopup/base.mako
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@
<td class="cell-left"></td>
<td>
% endif
<a href="${''.join((c['baseUrl'], '?', c['layerBodId'], '=', str(c['featureId']), '&time={}'.format(timestamp), '&lang=', lang, '&topic=', topic))}" target="new">
${_('Link to object')}
% if timestamp is None:
<a href="${''.join((c['baseUrl'], '?', c['layerBodId'], '=', str(c['featureId']), '&lang=', lang, '&topic=', topic))}" target="_blank">
% else:
<a href="${''.join((c['baseUrl'], '?', c['layerBodId'], '=', str(c['featureId']), '&time={}'.format(timestamp), '&lang=', lang, '&topic=', topic))}" target="_blank">
% endif
${_('Link to object')}
</a>
</td>
</tr>
Expand All @@ -95,7 +99,7 @@
</a>
<div class="float-right">
% if c['stable_id'] is True:
<a class="link" href="${''.join((c['baseUrl'], '?', c['layerBodId'], '=', str(c['featureId']), '&lang=', lang, '&topic=', topic))}" target="new">
<a class="link" href="${''.join((c['baseUrl'], '?', c['layerBodId'], '=', str(c['featureId']), '&lang=', lang, '&topic=', topic))}" target="_blank">
${_('Link to object')}
</a>
&nbsp;|&nbsp;
Expand Down

0 comments on commit 916c898

Please sign in to comment.