Skip to content
Snippets Groups Projects
Commit ecf764f7 authored by Lars Bilke's avatar Lars Bilke
Browse files

Merge branch 'web-fix-prj-links' into 'master'

[web] Fixed data-link shortcode.

Closes #3458

See merge request ogs/ogs!4901
parents 66e8e100 fa27cd26
No related branches found
No related tags found
No related merge requests found
...@@ -28,4 +28,4 @@ Next figure depicts comparison of the manufactured solution and the numerical on ...@@ -28,4 +28,4 @@ Next figure depicts comparison of the manufactured solution and the numerical on
The test is presented in: The test is presented in:
{{< data-link "2D_Ice_melting-forming_manuf_solution/ManSol3_IceWaterMix_Scaled.prj" >}}, {{< data-link "Parabolic/T/2D_Ice_melting-forming_manuf_solution/ManSol3_IceWaterMix_Scaled.prj" >}},
...@@ -12,7 +12,7 @@ Three tests are presented: ...@@ -12,7 +12,7 @@ Three tests are presented:
- {{< data-link "1D homogeneous" "Parabolic/T/1D_freezing_column_Stefan/Stefan_problem_homogen.prj" >}}, - {{< data-link "1D homogeneous" "Parabolic/T/1D_freezing_column_Stefan/Stefan_problem_homogen.prj" >}},
- {{< data-link "1D heterogeneous" "Parabolic/T/1D_freezing_column_Stefan/Stefan_problem.prj" >}}, and - {{< data-link "1D heterogeneous" "Parabolic/T/1D_freezing_column_Stefan/Stefan_problem.prj" >}}, and
- {{< data-link "2D heterogeneous" "/Parabolic/T/2D_freezing_disk/circle_disk.prj" >}}. - {{< data-link "2D heterogeneous" "Parabolic/T/2D_freezing_disk/circle_disk.prj" >}}.
## Problem description ## Problem description
......
{{ if .Get 1 }} {{ if gt (len .Params) 0 }}
{{ $link_text := .Get 0 }}
{{ $prj_file := .Get 1 }} {{ $prj_file := .Get 0 }}
{{ if eq (len .Params) 2 }}
{{ $prj_file = .Get 1 }}
{{ else if gt (len .Params) 2 }}
{{ errorf "%q: must give 1 or 2 parameter for data-link shortcode!" $.Page.File.Path }}
{{ end }}
{{ if os.FileExists "Tests" }} {{ if os.FileExists "Tests" }}
{{ $filePath := print "Tests/Data/" $prj_file }} {{ $filePath := print "Tests/Data/" $prj_file }}
...@@ -10,9 +16,9 @@ ...@@ -10,9 +16,9 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
<a href="https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Tests/Data{{ $prj_file }}"> <a href="https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Tests/Data/{{ $prj_file }}">
<i class="far fa-arrow-right"></i> <i class="far fa-arrow-right"></i>
{{ $prj_file }} {{ $link_text | markdownify }}
</a> </a>
{{ else }} {{ else }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment