File tree Expand file tree Collapse file tree
idr_gallery/templates/idr_gallery Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ <h2>Image Name: {{ image.name }}</h2>
5454 </ div >
5555 </ div >
5656
57+ <!-- BIA link hidden unless needed -->
58+ < div id ="bia_link_section " style ="margin-top: 20px; display: none; ">
59+ Data can be downloaded from < a id ="bia_link " target ="_blank " href =""> </ a >
60+ </ div >
61+
5762 {% if fileset %}
5863 < h3 > Download Image Files</ h3 >
5964 {% if data_location == "Github" %}
@@ -82,9 +87,6 @@ <h3>Download Image Files</h3>
8287 </ li >
8388 {% endfor %}
8489 </ ul >
85- {% else %}
86- <!-- Only expected for some OME-Zarr images (this page won't show for them) -->
87- < p > No associated fileset.</ p >
8890 {% endif %}
8991
9092</ article >
@@ -175,6 +177,19 @@ <h3>Download Image Files</h3>
175177 link . href = link . textContent . replace ( replaceThis , withThis ) ;
176178 } ) ;
177179 }
180+
181+ // If there is a "bia_url" column, show the BIA link section with the URL from the TSV file
182+ const bia_urlIndex = headers . indexOf ( "bia_url" ) ;
183+ if ( bia_urlIndex !== - 1 ) {
184+ const biaUrl = cells [ bia_urlIndex ] ;
185+ if ( biaUrl ) {
186+ const biaLinkSection = document . getElementById ( "bia_link_section" ) ;
187+ const biaLink = document . getElementById ( "bia_link" ) ;
188+ biaLink . href = biaUrl ;
189+ biaLink . textContent = biaUrl ;
190+ biaLinkSection . style . display = "block" ;
191+ }
192+ }
178193 } else {
179194 console . warn ( `No download URL found for ${ IDR_ID } in TSV file` ) ;
180195 }
You can’t perform that action at this time.
0 commit comments