Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ <h2 style="color: red">{{ warning }}</h2>
<option value="Image Name" selected="True" >Image Name</option>
<option value="Datasets" >Datasets</option>
<option value="Tags" >Tags</option>
<option value="Custom" >Custom</option>
{% if custom_labels_supported %}
<option value="Custom" >Custom</option>
{% endif %}
</select>
</td>
{% for c in channels %}
Expand All @@ -226,22 +228,24 @@ <h2 style="color: red">{{ warning }}</h2>
</td>
</tr>
</table>

<hr />

<div title="Custom label" class="customLabelInput" align="center" style="display:none;position:relative;left:float;">
Custom label:
<input type="text" name="Custom_Label" value="" />
<select name="Image_Custom_Label_List" style="margin-right:20px;display:none;">
<option value="All" selected="True">All Images</option>
{% for imgData in imgDict %}
<option value="{{ imgData.id }}">{{imgData.name}}</option>
{% endfor %}
</select>
</div>
<div title="All custom labels" class="allLabels" style="display:none">
<input type="text" name="All_labels" value="" />
</div>
{% if custom_labels_supported %}
<hr />

<div title="Custom label" class="customLabelInput" align="center" style="display:none;position:relative;left:float;">
Custom label:
<input type="text" name="Custom_Label" value="" />
<select name="Image_Custom_Label_List" style="margin-right:20px;display:none;">
<option value="All" selected="True">All Images</option>
{% for imgData in imgDict %}
<option value="{{ imgData.id }}">{{imgData.name}}</option>
{% endfor %}
</select>
</div>
<div title="All custom labels" class="allLabels" style="display:none">
<input type="text" name="All_labels" value="" />
</div>
{% endif %}
custom_labels_supported {{ custom_labels_supported }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that line was just for debugging in my example - can be removed

{% endblock %}

<!---------------------------- FIGURE PREVIEW ---------------------->
Expand Down
5 changes: 5 additions & 0 deletions omeroweb/webclient/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4410,6 +4410,11 @@ def loadImageTags(imageIds):
if scriptId < 0:
raise AttributeError("No script found for path '%s'" % scriptPath)

if scriptName == "SplitView":
# Check we have script that supports custom labels
params = scriptService.getParams(scriptId)
context["custom_labels_supported"] = "All_labels" in params.inputs

context["template"] = template
context["scriptId"] = scriptId
return context
Expand Down
Loading