Fix redirections to empty tabs (#290)
Whenever href (url) attribute was omitted or had no value the click action would do nothing. With no URLs defined and `target="_blank"` attributes, which were recently added, anchor tags now redirect users to new blank tabs (side effect). This PR solves the issues by adding conditions before applying `target="_blank"` or in some cases by ommiting entire entities (e.g. the view_certificate button).
This commit is contained in:
parent
cb3df73d53
commit
d6706e05ee
5 changed files with 16 additions and 6 deletions
|
@ -43,7 +43,11 @@
|
|||
<h6 class="text-muted">{{ i18n "publications"}}</h6>
|
||||
<ul>
|
||||
{{ range .publications }}
|
||||
<li><a href="{{ .url }} " target="_blank">{{ .title }}</a></li>
|
||||
{{ if .url }}
|
||||
<li><a href="{{ .url }}" target="_blank">{{ .title }}</a></li>
|
||||
{{ else }}
|
||||
<li>{{ .title }}</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue