Skip to content

Commit bf5a4b9

Browse files
committed
permalink buttons per format (ignoring html)
also ignoring JSON due to #166
1 parent e545f54 commit bf5a4b9

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

src/main/resources/static/css/main-20170616.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,17 @@ polygon.hover {
312312
overflow: hidden;
313313
white-space: nowrap;
314314
}
315+
316+
/**
317+
* Already showing HTML
318+
*/
319+
#format-html {
320+
display: none;
321+
}
322+
/**
323+
* Workaround (not really) for
324+
* https://github.com/common-workflow-language/cwlviewer/issues/166
325+
*/
326+
#format-json {
327+
display: none;
328+
}

src/main/resources/templates/workflow.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h2>Workflow: <span th:text="${workflow.label}">Workflow Name</span></h2>
150150
</div>
151151
<div class="row">
152152
<div class="col-lg-9 col-md-8 col-sm-6">
153-
<div class="permalink hidden-xs-down">
153+
<div class="permalink hidden-xs-down" th:unless="${workflow.packed}">
154154
Permalink:
155155
<a href="https://w3id.org/cwl/view/" rel="noopener" class="help" target="_blank">[?]</a>
156156
<a id="permalink" th:href="${workflow.permalink}" th:text="${workflow.permalink}"
@@ -161,7 +161,7 @@ <h2>Workflow: <span th:text="${workflow.label}">Workflow Name</span></h2>
161161
<div id="graph-menu hidden-print" class="pull-right">
162162
<button id="view-dot" class="hidden-print hidden-sm-down btn btn-primary" type="button" data-toggle="modal" data-target="#dotGraph">View DOT</button>
163163
<div class="btn-group hidden-print">
164-
<button type="button " class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
164+
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
165165
Download Image <span class="caret"></span>
166166
</button>
167167
<ul class="dropdown-menu">
@@ -180,7 +180,7 @@ <h2>Workflow: <span th:text="${workflow.label}">Workflow Name</span></h2>
180180
<img id="selectParents" class="graphControl" th:src="@{/img/parents-logo.svg}" src="../static/img/parents-logo.svg" alt="parents" data-tooltip="true" title="Select All Parents" />
181181
<div id="graph" data-th-attr="data-svgurl=@{${workflow.getVisualisationSvg()}}"></div>
182182
</div>
183-
<img alt="Workflow as SVG" src="@{${workflow.getVisualisationSvg()}}" class="visible-print-block" />
183+
<img alt="Workflow as SVG" src="../static/img/workflow-compile.svg" th:src="@{${workflow.getVisualisationSvg()}}" class="visible-print-block" />
184184
<ul class="legend">
185185
<li><span class="selectednode hidden-print"></span> Selected</li>
186186
<li class="hidden-xs">|</li>
@@ -291,6 +291,14 @@ <h2>Outputs</h2>
291291
</div>
292292
</div>
293293
</div>
294+
<div class="row hidden-print" th:unless="${workflow.packed}">
295+
<div class="col-md-12 text-center" id="formats">
296+
<span th:each="format : ${formats}">
297+
<a th:id="|format-${format}|" role="button" class="btn btn-default btn-sm" th:href="${workflow.getPermalink(format.name())}" th:text="${format}"
298+
href="#">html</a>
299+
</span>
300+
</div>
301+
</div>
294302
</div>
295303

296304
<div th:replace="fragments/footer :: copy"></div>

0 commit comments

Comments
 (0)