Skip to content

Commit

Permalink
Merge pull request #32 from AU-Biocommons/dev
Browse files Browse the repository at this point in the history
Disable buttons where no apollo link
  • Loading branch information
neoformit authored May 21, 2024
2 parents 36e8e41 + 0fd3173 commit 170769e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
2 changes: 2 additions & 0 deletions app/apollo_portal/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
for hostname in PRODUCTION_HOSTNAMES
]

TIME_ZONE = 'Australia/Brisbane'

# Use manifest to manage static file versions for cache busting:
STATICFILES_STORAGE = ('django.contrib.staticfiles.storage'
'.ManifestStaticFilesStorage')
Expand Down
16 changes: 9 additions & 7 deletions app/genomes/templates/genomes/snippets/genome-cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -433,24 +433,26 @@ <h3 class="text-center">{{ genomeDetails.name }}</h3>

<div v-if="genomeDetails" class="modal-footer justify-content-center">
<a
:href="genomeDetails.apollo_url"
:href="genomeDetails.apollo_url ? genomeDetails.apollo_url : ''"
:class="genomeDetails.apollo_url ? 'btn btn-primary' : 'btn btn-secondary disabled'"
target="_blank"
class="btn btn-primary"
data-toggle="tooltip"
data-title="Jump to Apollo genome browser"
data-placement="bottom"
>
Apollo browser
<span v-if="genomeDetails.apollo_url">Apollo browser</span>
<span v-else style="white-space: nowrap;">No browser</span>
</a>
<a
v-if="genomeDetails.tracks_url"
:href="genomeDetails.tracks_url"
class="btn btn-primary"
:href="genomeDetails.tracks_url ? genomeDetails.tracks_url : ''"
:class="genomeDetails.tracks_url ? 'btn btn-primary' : 'btn btn-secondary disabled'"
target="_blank"
data-toggle="tooltip"
data-title="View available tracks for this genome"
data-placement="bottom"
>
View tracks
<span v-if="genomeDetails.apollo_url">View tracks</span>
<span v-else>No tracks</span>
</a>
</div>
</div>
Expand Down
16 changes: 8 additions & 8 deletions app/genomes/templates/genomes/snippets/tracks-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@
<td>
<a
:href="track.apollo_url"
:href="track.apollo_url ? track.apollo_url : ''"
:class="track.apollo_url ? 'btn btn-primary' : 'btn btn-secondary disabled'"
target="_blank"
class="btn btn-primary"
data-toggle="tooltip"
data-title="View genome track on Apollo"
data-placement="bottom"
>
<button
class="btn btn-primary"
data-toggle="tooltip"
data-title="View genome track on Apollo"
data-placement="bottom"
>
Browser
</button>
<span v-if="track.apollo_url">Browser</span>
<small v-else style="white-space: nowrap;">No browser</small>
</a>
</td>
<td>
Expand Down

0 comments on commit 170769e

Please sign in to comment.