Skip to content

Commit

Permalink
Merge pull request #6 from minh-biocommons/main
Browse files Browse the repository at this point in the history
Display galaxy tools list in a table
  • Loading branch information
supernord authored Mar 20, 2024
2 parents 2cf5233 + db9624f commit 00fd358
Showing 1 changed file with 37 additions and 11 deletions.
48 changes: 37 additions & 11 deletions _includes/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
}
.popover {
display: flex;
flex-direction: column;
flex-direction: column;
max-height: 50vh;
max-width: 840px;
max-width: 50vw;
}
.popover-body {
overflow: scroll;
Expand All @@ -41,9 +41,13 @@
text-decoration: underline;
}
.col-publications,
.col-galaxy {
.col-galaxy,
.col-description {
min-width: 180px;
}
.col-galaxy-description {
min-width: 240px;
}
.col-badge {
width: 180px !important;
min-width: 120px;
Expand Down Expand Up @@ -95,7 +99,7 @@ <h2>Relevant tools and resources</h2>
<i class="fa-solid fa-info-circle"></i> </a
>{%- endif %}
</th>
<th>Description</th>
<th class="col-description">Description</th>
<th>Registry link</th>
<th>Tool identifier (e.g. module name)</th>
<th>Topic(s)</th>
Expand Down Expand Up @@ -207,13 +211,26 @@ <h2>Relevant tools and resources</h2>
data-bs-trigger="focus"
data-bs-html="true"
data-bs-content="
<ul class='ps-3 mb-0'>
{%- for galaxy-tool in tool.galaxy %}
<li>
<a href='{{galaxy-tool.url}}' target='_blank' class='fs-6 lh-lg'>{{galaxy-tool.title}}</a>
</li>
{%- endfor %}
</ul>
<div class='p-3'>
<table class='table table-bordered mb-0 align-middle'>
<thead class='table-dark'>
<tr>
<th>Tool Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{%- for galaxy-tool in tool.galaxy %}
<tr>
<td>
<a href='{{galaxy-tool.url}}' target='_blank' class='fs-6 lh-lg'>{{galaxy-tool.title}}</a>
</td>
<td class='col-galaxy-description'></td>
</tr>
{%- endfor %}
</tbody>
</table>
</div>
"
>
{{tool.galaxy.size}} tools
Expand Down Expand Up @@ -393,6 +410,15 @@ <h2>Relevant tools and resources</h2>
document.querySelector(".clear-all-button").style.display = "none";
}

// Allow table elements in popovers
const myDefaultAllowList = bootstrap.Tooltip.Default.allowList;
myDefaultAllowList.table = [];
myDefaultAllowList.thead = [];
myDefaultAllowList.tbody = [];
myDefaultAllowList.th = [];
myDefaultAllowList.tr = [];
myDefaultAllowList.td = [];

const popoverTriggerList = document.querySelectorAll(
'[data-bs-toggle="popover"]'
);
Expand Down

0 comments on commit 00fd358

Please sign in to comment.