Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New UI to exclude tags, chose boolean operator and limit selection to data types #9

Merged
merged 26 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
03d4282
first tag exclusion attempt
Tom-TBT Nov 7, 2023
58a2de9
bug fix
Tom-TBT Nov 7, 2023
98b1b91
option to choose between or/and to join tags
Tom-TBT Nov 8, 2023
cad7e6d
improved css
Tom-TBT Nov 8, 2023
9c421dc
merged from master
Tom-TBT Nov 11, 2023
6089b10
checkbox to hide object by types
Tom-TBT Nov 12, 2023
4b54b32
clean code tagnav_init
Tom-TBT Dec 15, 2023
97930f6
updated list sorting exclude index
Tom-TBT Dec 15, 2023
5c6fdf2
fix OR options after selection
Tom-TBT Dec 15, 2023
ef20a1f
UI fix and tooltip improvement
Tom-TBT Dec 16, 2023
a2fd118
additional UI fix
Tom-TBT Dec 16, 2023
9f1eac9
UI changes, fixes and code refactor
Tom-TBT Dec 16, 2023
c5ef8b1
removing unused var
Tom-TBT Mar 19, 2024
00c6dcf
import and quicksearch error fix
Tom-TBT Mar 28, 2024
0cd83a6
Preview checkbox to optionally prevent sending query to the server
Tom-TBT Apr 8, 2024
20125ca
if else bracket good practice
Tom-TBT Apr 8, 2024
8148237
add tagset name to tags selection list
Tom-TBT Apr 15, 2024
d4068e8
Change item number list name PlateAcq/Run to Run
Tom-TBT Apr 16, 2024
045be14
Filter on current selected user
Tom-TBT Apr 16, 2024
cf5af52
horizontal align AND OR options
Tom-TBT Apr 18, 2024
84dcb86
new tooltip (tag filtering & result selection) and clarified existing
Tom-TBT Apr 18, 2024
b2cffbf
moved hql uid condition in params
Tom-TBT Apr 19, 2024
ad67483
changed (tagset) to [tagset]
Tom-TBT Apr 19, 2024
3739d4b
removed tooltip blanklines
Tom-TBT Apr 19, 2024
4f53f81
show username when restricting search to the user
Tom-TBT Apr 24, 2024
52ba871
django instead of js to hide username
Tom-TBT Apr 25, 2024
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
17 changes: 15 additions & 2 deletions omero_tagsearch/forms.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
from django.forms import Form, MultipleChoiceField, BooleanField
from django.forms import Form, MultipleChoiceField, BooleanField, ChoiceField, RadioSelect


class TagSearchForm(Form):
selectedTags = MultipleChoiceField()
results_preview = BooleanField()
excludedTags = MultipleChoiceField()
operation = ChoiceField(
widget = RadioSelect,
choices = (("AND", "AND"), ("OR", "OR")),
initial = "AND"
)
view_image = BooleanField(initial=True)
view_dataset = BooleanField(initial=True)
view_project = BooleanField(initial=True)
view_well = BooleanField(initial=True)
view_acquisition = BooleanField(initial=True)
view_plate = BooleanField(initial=True)
view_screen = BooleanField(initial=True)

def __init__(self, tags, conn=None, *args, **kwargs):
super(TagSearchForm, self).__init__(*args, **kwargs)

# Process Tags into choices (lists of tuples)
self.fields["selectedTags"].choices = tags
self.fields["excludedTags"].choices = tags
self.conn = conn
54 changes: 53 additions & 1 deletion omero_tagsearch/static/tagsearch/css/webtagging_search.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,26 @@
}

#id_selectedTags {
width:150px;
width:200px;
}

#id_excludedTags {
width:200px;
}

.tagSearchDivider .field {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 1px; /* Adjust as needed */
}

.tagSearchDivider label {
width:100px;
margin-right: 10px; /* Adjust as needed */
}


.hidden {
display: none !important;
}
Expand Down Expand Up @@ -81,3 +98,38 @@
margin-left: 5px;
margin-top: 10px;
}

.search_tips__tag {
vertical-align: middle;
}

.search_tips__join {
vertical-align: bottom;
}

#id_view_project, #id_view_dataset, #id_view_screen, #id_view_plate,
#id_view_well, #id_view_acquisition, #id_view_image{
vertical-align: bottom;
}

ul#id_operation li{
display: inline-block;
}

#counts_list li,
#counts_list ul{
margin-top: 2px;
margin-left: 0px;
}
#selectall_btn {
margin-left: 3px;
margin-top: 8px;
}

#id_operation {
display: flex;
}

#id_operation div {
margin-right: 10px; /* Adjust as needed */
}
22 changes: 9 additions & 13 deletions omero_tagsearch/templates/omero_tagsearch/search_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,9 @@
}
});

// We init sorting (not cols 0 & 3) but don't sort by default
$("#dataTable").tablesorter({headers: { 0: { sorter: false}, 4: {sorter: false} } });
// We init sorting (not cols 0 & 5) but don't sort by default
$("#dataTable").tablesorter({headers: { 0: { sorter: false}, 5: {sorter: false} } });

$('input#id_search').quicksearch('table#dataTable tbody tr', {
'delay': 300,
'loader': 'span.loading'
});
});
</script>

Expand Down Expand Up @@ -121,7 +117,7 @@
{% endwith %}
{% endfor %}
{% for c in manager.containers.project %}
<tr id="project-{{ c.id }}" class="{{ c.getPermsCss }}">
<tr id="project-{{ c.id }}" class="{{ c.getPermsCss }} project_row">
<td class="image">
<img id="{{ c.id }}" src="{% static "webgateway/img/folder16.png" %}" alt="project" title="{{ c.name }}"/>
</td>
Expand All @@ -135,7 +131,7 @@
</tr>
{% endfor %}
{% for c in manager.containers.screen %}
<tr id="screen-{{ c.id }}" class="{{ c.getPermsCss }}">
<tr id="screen-{{ c.id }}" class="{{ c.getPermsCss }} screen_row">
<td class="image">
<img id="{{ c.id }}" src="{% static "webclient/image/folder_screen16.png" %}" alt="screen" title="{{ c.name }}"/>
</td>
Expand All @@ -149,7 +145,7 @@
</tr>
{% endfor %}
{% for c in manager.containers.dataset %}
<tr id="dataset-{{ c.id }}" class="{{ c.getPermsCss }}">
<tr id="dataset-{{ c.id }}" class="{{ c.getPermsCss }} dataset_row">
<td class="image">
<img id="{{ c.id }}" src="{% static "webgateway/img/folder_image16.png" %}" alt="dataset" title="{{ c.name }}"/>
</td>
Expand All @@ -163,7 +159,7 @@
</tr>
{% endfor %}
{% for c in manager.containers.plate %}
<tr id="plate-{{ c.id }}" class="{{ c.getPermsCss }}">
<tr id="plate-{{ c.id }}" class="{{ c.getPermsCss }} plate_row">
<td class="image">
<img id="{{ c.id }}" src="{% static "webclient/image/folder_plate16.png" %}" alt="plate" title="{{ c.name }}"/>
</td>
Expand All @@ -177,7 +173,7 @@
</tr>
{% endfor %}
{% for c in manager.containers.acquisition %}
<tr id="acquisition-{{ c.id }}" class="{{ c.getPermsCss }}">
<tr id="acquisition-{{ c.id }}" class="{{ c.getPermsCss }} acquisition_row">
<td class="image">
<img id="{{ c.id }}" src="{% static "webclient/image/run16.png" %}" alt="acquisition" title="{{ c.name }}"/>
</td>
Expand All @@ -191,7 +187,7 @@
</tr>
{% endfor %}
{% for c in manager.containers.well %}
<tr id="well-{{ c.id }}" class="{{ c.getPermsCss }}">
<tr id="well-{{ c.id }}" class="{{ c.getPermsCss }} well_row">
<td class="image">
<img id="{{ c.id }}" src="{% static "webclient/image/well16.png" %}" alt="well" title="{{ c.name }}"/>
</td>
Expand All @@ -205,7 +201,7 @@
</tr>
{% endfor %}
{% for c in manager.containers.image %}
<tr id="image-{{ c.id }}" class="{{ c.getPermsCss }}">
<tr id="image-{{ c.id }}" class="{{ c.getPermsCss }} image_row">
<td class="image">
<img class="search_thumb" id="{{ c.id }}" src="{% url 'render_thumbnail_resize' 96 c.id %}" alt="image" title="{{ c.name }}"/>
</td>
Expand Down
Loading
Loading