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

Improve shares display #909

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 10 additions & 6 deletions isic/core/templates/core/collection_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,16 @@
</li>
{% if show_shares %}
<li>
<span class="font-bold">Shared with:</span>
<ul class="list-disc">
{% for user in collection.shared_with %}
<li class="ml-6">{{ user }}</li>
{% endfor %}
</ul>
<span class="font-bold">Directly shared with:</span>
{% if collection.shares.exists %}
<ul class="list-disc">
{% for user in collection.shared_with %}
<li class="ml-6">{{ user }}</li>
{% endfor %}
</ul>
{% else %}
<span>nobody</span>
{% endif %}
</li>
{% endif %}
<li>
Expand Down
1 change: 0 additions & 1 deletion isic/core/views/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ def collection_detail(request, pk):
"num_images": paginator.count,
"image_removal_mode": image_removal_mode,
"show_shares": (request.user.is_staff or request.user == collection.creator)
and collection.shares.exists()
and not collection.public,
},
)
Loading