2023-05-22 19:14:31 -04:00
{% load static %}
{% load i18n %}
{% load mastodon %}
{% if item %}
2023-06-19 12:30:39 -04:00
< div class = "action" >
< span >
2024-05-20 23:17:47 -04:00
< a title = "{% trans " edit " % } "
href="{% url 'catalog:edit' item.url_path item.uuid %}">< i class = "fa-solid fa-pen-to-square" > < / i > < / a >
2023-06-19 12:30:39 -04:00
< / span >
< span >
2024-05-20 23:17:47 -04:00
< a title = "{% trans " revision history " % } "
2023-06-19 12:30:39 -04:00
href="{% url 'catalog:history' item.url_path item.uuid %}">< i class = "fa-solid fa-clock-rotate-left" > < / i > < / a >
< / span >
< span >
2024-05-29 10:50:41 -04:00
< a title = "{% trans " back to item " % } " href = "{{ item.url }}" > < i class = "fa-solid fa-file-lines" > < / i > < / a >
2023-06-19 12:30:39 -04:00
< / span >
< / div >
2024-05-20 23:17:47 -04:00
< h5 > {% trans "Edit Options" %}< / h5 >
2023-06-19 12:30:39 -04:00
{% if item.is_deleted %}
< p >
2024-05-20 23:17:47 -04:00
< i class = "fa-solid fa-circle-xmark" > < / i > {% trans "Item has been deleted." %}
2023-06-19 12:30:39 -04:00
< / p >
{% endif %}
{% if item.child_items %}
< p >
2024-05-20 23:17:47 -04:00
< i class = "fa-solid fa-circle-exclamation" > < / i > {% trans "Item contains sub-items." %}
2023-06-19 12:30:39 -04:00
< / p >
{% endif %}
{% if item.merged_to_item %}
< p >
2024-05-20 23:17:47 -04:00
< i class = "fa-solid fa-circle-xmark" > < / i > {% trans "Item has been merged to another item." %}
2023-06-19 12:30:39 -04:00
< / p >
{% endif %}
{% if item.journal_exists %}
< p >
2024-05-20 23:17:47 -04:00
< i class = "fa-solid fa-circle-exclamation" > < / i > {% trans "Item has been marked by users." %}
2023-06-19 12:30:39 -04:00
< / p >
{% endif %}
2023-06-13 17:02:16 -04:00
{% for i in item.merged_from_items.all %}
{% if forloop.first %}
2024-05-20 23:17:47 -04:00
< i class = "fa-solid fa-circle-info" > < / i > {% trans "The following items are merged into this item" %}
2023-06-13 17:02:16 -04:00
< ul >
{% endif %}
< li >
2024-07-13 01:36:18 -04:00
< a href = "{{ i.url }}?skipcheck=1" > {{ i.display_title }}< / a >
2023-06-13 17:02:16 -04:00
< / li >
{% if forloop.last %}< / ul > {% endif %}
{% endfor %}
2023-05-22 19:14:31 -04:00
{% if item.editable or request.user.is_staff %}
2023-06-19 12:30:39 -04:00
{% for res in item.external_resources.all %}
2023-05-22 19:14:31 -04:00
< details >
< summary >
2024-11-29 10:15:12 -05:00
{% trans 'External website' %}: < a href = "{{ res.url }}" rel = "noopener noreferrer" > {{ res.site_label }}< / a >
2023-05-22 19:14:31 -04:00
< / summary >
< div class = "grid" >
2023-06-09 17:06:02 -04:00
< form method = "post"
action="{% url 'catalog:refetch' %}"
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('{% trans "Existing metadata might get overwritten, sure to proceed?" %}');">
2023-05-22 19:14:31 -04:00
{% csrf_token %}
< input type = "hidden" name = "id" value = "{{ res.id }}" >
< input type = "hidden" name = "url" value = "{{ res.url }}" >
2024-05-20 23:17:47 -04:00
< input class = "secondary" type = "submit" value = "{% trans 'Fetch again' %}" >
2023-05-22 19:14:31 -04:00
< / form >
{% if request.user.is_staff %}
2023-06-09 17:06:02 -04:00
< form method = "post"
action="{% url 'catalog:unlink' %}"
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('{% trans "You may not be able to undo this operation, sure to remove?" %}');">
2023-05-22 19:14:31 -04:00
{% csrf_token %}
< input type = "hidden" name = "id" value = "{{ res.id }}" >
2024-05-20 23:17:47 -04:00
< input class = "contrast"
type="submit"
value="{% trans 'Remove link to site' %}">
2023-05-22 19:14:31 -04:00
< / form >
{% endif %}
< / div >
< / details >
{% endfor %}
2023-06-05 18:57:52 -04:00
{% if item.child_class %}
< details >
2024-02-03 22:19:01 -05:00
< summary >
2024-05-20 23:17:47 -04:00
{% trans 'Edit sub-items' %} < small > ({{ item.child_items.count }})< / small >
2024-02-03 22:19:01 -05:00
< / summary >
< p class = "tag-list" style = "overflow: scroll; max-height: 20em;" >
{% for ep in item.child_items %}
< span class = "season-number" id = "ci_{{ ep.uuid }}" >
2024-07-13 01:36:18 -04:00
< a href = "{% url 'catalog:edit' ep.url_path ep.uuid %}" > {{ ep.episode_number|default:ep.display_title|default:"#" }}< / a >
2024-02-03 22:19:01 -05:00
< / span >
{% endfor %}
< / p >
2023-06-05 18:57:52 -04:00
< form method = "get" action = "{% url 'catalog:create' item.child_class %}" >
2023-06-16 17:47:22 -04:00
< input name = "parent" type = "hidden" value = "{{ item.uuid }}" >
2024-05-20 23:17:47 -04:00
< input class = "contrast"
type="submit"
value="{% trans "create" %} {{ item.child_class }}">
2023-06-05 18:57:52 -04:00
< / form >
< / details >
{% endif %}
2023-06-16 17:47:22 -04:00
{% if item.class_name == "tvseason" %}
< details >
2024-05-20 23:17:47 -04:00
< summary > {% trans 'Fetch all episodes' %}< / summary >
2023-06-16 17:47:22 -04:00
{% if item.imdb and item.season_number is not None %}
< form method = "post"
action="{% url 'catalog:fetch_tvepisodes' item.url_path item.uuid %}">
{% csrf_token %}
2024-05-20 23:17:47 -04:00
< input class = "contrast" type = "submit" value = "{% trans 'Fetch all' %}" >
< small > {% trans "Due to differences in how Douban, IMDB, and TMDB handle season data, a small number of TV shows and animations may not return correct results. Please manually verify and clean up after updating." %}< / small >
2023-06-16 17:47:22 -04:00
< / form >
{% else %}
2024-05-20 23:17:47 -04:00
< i class = "fa-solid fa-circle-exclamation" > < / i > < i > {% trans "To fetch all episodes, season numbers and IMDB information are required. If filling this out is inconvenient, you can also manually create sub-entries." %}< / i >
2023-06-16 17:47:22 -04:00
{% endif %}
< / details >
{% endif %}
2023-06-19 12:30:39 -04:00
{% if item.class_name == "movie" %}
< details >
2024-05-20 23:17:47 -04:00
< summary > {% trans 'switch category' %}< / summary >
2023-06-06 13:06:03 -04:00
< form method = "post"
action="{% url 'catalog:recast' item.url_path item.uuid %}"
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('{% trans "Switching may remove some metadata. Sure to proceed?" %}');">
2023-06-06 13:06:03 -04:00
{% csrf_token %}
< input type = "hidden" value = "tvshow" name = "class" >
2024-05-20 23:17:47 -04:00
< input class = "contrast" type = "submit" value = "➡ {% trans 'TV Show' %}" >
2023-06-06 13:06:03 -04:00
< / form >
2023-06-19 12:30:39 -04:00
< / details >
{% elif item.class_name == "tvshow" %}
{% if not item.all_seasons or request.user.is_staff %}
< details >
2024-05-20 23:17:47 -04:00
< summary > {% trans 'switch category' %}< / summary >
2023-06-19 12:30:39 -04:00
< form method = "post"
action="{% url 'catalog:recast' item.url_path item.uuid %}"
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('Switching may remove some metadata. Sure to proceed?');">
2023-06-06 01:36:07 -04:00
{% csrf_token %}
2023-06-06 13:06:03 -04:00
< input type = "hidden" value = "movie" name = "class" >
2024-05-20 23:17:47 -04:00
< input class = "contrast" type = "submit" value = "➡ {% trans 'Movie' %}" >
2023-06-19 12:30:39 -04:00
< / form >
2023-05-22 19:14:31 -04:00
< form method = "post"
2023-06-06 13:06:03 -04:00
action="{% url 'catalog:recast' item.url_path item.uuid %}"
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('Switching may remove some metadata. Sure to proceed?');">
2023-05-22 19:14:31 -04:00
{% csrf_token %}
2023-06-06 13:06:03 -04:00
< input type = "hidden" value = "tvseason" name = "class" >
2024-05-20 23:17:47 -04:00
< input class = "contrast" type = "submit" value = "➡ {% trans 'TV Season' %}" >
2023-05-22 19:14:31 -04:00
< / form >
2023-06-19 12:30:39 -04:00
< / details >
2023-05-22 19:14:31 -04:00
{% endif %}
2024-02-03 22:19:01 -05:00
{% elif item.class_name == "album" %}
< details >
2024-05-20 23:17:47 -04:00
< summary > {% trans 'switch category' %}< / summary >
2024-02-03 22:19:01 -05:00
< form method = "post"
action="{% url 'catalog:recast' item.url_path item.uuid %}"
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('Switching may remove some metadata. Sure to proceed?');">
2024-02-03 22:19:01 -05:00
{% csrf_token %}
< input type = "hidden" value = "podcast" name = "class" >
2024-05-20 23:17:47 -04:00
< input class = "contrast" type = "submit" value = "➡ {% trans 'Podcast' %}" >
2024-02-03 22:19:01 -05:00
< / form >
< / details >
2023-06-19 12:30:39 -04:00
{% else %}
2024-05-20 23:17:47 -04:00
<!-- no switch possible -->
2023-06-19 12:30:39 -04:00
{% endif %}
2023-06-13 17:02:16 -04:00
{% if item.class_name == "tvseason" or item.class_name == "performanceproduction" %}
2023-06-25 11:48:09 -04:00
< details >
2024-07-16 17:49:10 -04:00
< summary > {% trans "Link to parent item" %}< / summary >
2023-06-25 11:48:09 -04:00
< form method = "post"
action="{% url 'catalog:assign_parent' item.url_path item.uuid %}"
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('{% trans "Sure to link?" %}');">
2023-06-25 11:48:09 -04:00
{% csrf_token %}
< input type = "url"
name="parent_item_url"
2024-05-20 23:17:47 -04:00
placeholder=""
2023-06-25 11:48:09 -04:00
value="{{ item.show.absolute_url }}">
< br >
2024-05-20 23:17:47 -04:00
< input class = "contrast" type = "submit" value = "{% trans 'Update link' %}" >
2023-06-25 11:48:09 -04:00
< / form >
< / details >
2023-06-13 17:02:16 -04:00
{% endif %}
{% if item.class_name == "tvshow" %}
< details >
2024-07-16 17:49:10 -04:00
< summary > {% trans "Cleanup seasons" %}< / summary >
2023-06-13 17:02:16 -04:00
< form method = "post"
action="{% url 'catalog:remove_unused_seasons' item.url_path item.uuid %}"
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('{% trans "This operation cannot be undone. Sure to delete?" %}');">
2023-06-13 17:02:16 -04:00
{% csrf_token %}
2024-05-20 23:17:47 -04:00
< input class = "contrast"
type="submit"
value="{% trans 'remove seasons not marked' %}">
2023-06-13 17:02:16 -04:00
< / form >
< / details >
{% endif %}
{% if not item.journal_exists or request.user.is_staff %}
2023-05-22 19:14:31 -04:00
< details >
2024-07-16 17:49:10 -04:00
< summary > {% trans 'Merge' %}< / summary >
2023-05-22 19:14:31 -04:00
< form method = "post"
2024-04-07 19:44:37 -04:00
action="{% url 'catalog:merge' item.url_path item.uuid %}">
2023-05-22 19:14:31 -04:00
{% csrf_token %}
< input type = "url"
2024-04-07 19:44:37 -04:00
name="target_item_url"
2024-05-20 23:17:47 -04:00
placeholder="{% trans "URL of target item, or empty if undo merge" %}"
2023-06-28 23:25:36 -04:00
{% if item.is_deleted and not item.merged_to_item %}disabled{% endif %}
2023-05-22 19:49:02 -04:00
value="{{ item.merged_to_item.absolute_url }}">
2023-05-22 19:14:31 -04:00
< br >
2024-05-20 23:17:47 -04:00
< input class = "contrast"
type="submit"
value="{% trans 'merge to another item' %}">
2023-05-22 19:14:31 -04:00
< / form >
< / details >
2024-07-16 17:49:10 -04:00
{% if item.can_soft_delete %}
2023-06-19 12:30:39 -04:00
< details >
2024-05-20 23:17:47 -04:00
< summary > {% trans 'Delete' %}< / summary >
2023-05-22 19:14:31 -04:00
< form method = "post"
2024-04-07 19:44:37 -04:00
action="{% url 'catalog:delete' item.url_path item.uuid %}">
2023-05-22 19:14:31 -04:00
{% csrf_token %}
2024-07-18 11:47:40 -04:00
< input class = "contrast" type = "submit" value = "{% trans 'Delete' %}" >
2023-05-22 19:14:31 -04:00
< / form >
2023-06-19 12:30:39 -04:00
< / details >
{% endif %}
2023-05-22 19:14:31 -04:00
{% endif %}
2024-04-09 00:45:40 -04:00
{% if item.class_name == 'edition' %}
{% if item.has_works %}
< details >
2024-05-20 23:17:47 -04:00
< summary > {% trans 'Work' %}< / summary >
{% trans "This edition belongs to the following work" %}
2024-04-09 00:45:40 -04:00
{% for i in item.works.all %}
< li >
2024-07-13 01:36:18 -04:00
< a href = "{{ i.url }}?skipcheck=1" > {{ i.display_title }}< / a >
2024-04-09 00:45:40 -04:00
< / li >
{% endfor %}
< form method = "post"
2024-05-20 23:17:47 -04:00
onsubmit="return confirm('{% trans "Sure to unlink?" %}');"
2024-04-09 00:45:40 -04:00
action="{% url 'catalog:unlink_works' item.url_path item.uuid %}">
{% csrf_token %}
< input class = "contrast"
type="submit"
{% if not request.user.is_staff %}disabled{% endif %}
2024-05-20 23:17:47 -04:00
value="{% trans 'Unlink from work' %}">
2024-04-09 00:45:40 -04:00
< / form >
< / details >
{% endif %}
{% if not item.has_works %}
< details >
2024-05-20 23:17:47 -04:00
< summary > {% trans 'Link' %}< / summary >
2024-04-09 00:45:40 -04:00
< form method = "post"
action="{% url 'catalog:link_edition' item.url_path item.uuid %}">
{% csrf_token %}
< input type = "url"
name="target_item_url"
placeholder="{{ site_url }}/book/1234/
{% if item.is_deleted and not item.merged_to_item %}disabled{% endif %}
value="">
2024-05-20 23:17:47 -04:00
< input class = "contrast"
type="submit"
value="{% trans 'Link to another edition from same work' %}">
2024-04-09 00:45:40 -04:00
< / form >
< / details >
{% endif %}
{% endif %}
{% endif %}
< details >
2024-05-20 23:17:47 -04:00
< summary > {% trans 'Suggest Edits' %}< / summary >
2024-04-09 00:45:40 -04:00
< form method = "post"
action="{% url 'catalog:suggest' item.url_path item.uuid %}">
{% csrf_token %}
< select name = "action" aria-label = "Select action..." required >
2024-05-20 23:17:47 -04:00
< option selected disabled value = "" > {% trans "proposed action" %}< / option >
< option value = "merge" > {% trans "merge to another item" %}< / option >
< option value = "link" > {% trans "link to another item" %}< / option >
< option value = "type" > {% trans "change item category" %}< / option >
< option value = "metadata" > {% trans "change item metadata" %}< / option >
< option value = "delete" > {% trans "remove item" %}< / option >
< option value = "other" > {% trans "other" %}< / option >
2024-04-09 00:45:40 -04:00
< / select >
2024-05-20 23:17:47 -04:00
< textarea name = "detail"
required
placeholder="{% trans "To suggest merging or association, please include the URL of the target item" %}">< / textarea >
< input type = "submit" value = "{% trans 'submit' %}" >
< small > {% trans "As a user of this community, you may edit some metadata of items on this site. If you are unsure whether your edits are appropriate or are unable to make a certain change, you can make suggestions here. Moderators will consider each suggestion, although there is no guarantee that they will always be fully adopted; suggestions may also be viewed or discussed by other community users. If you have suggestions that are not related to a specific item, please contact us. Thank you for your support and contribution." %}< / small >
2024-04-09 00:45:40 -04:00
< / form >
< / details >
2023-05-22 19:14:31 -04:00
{% endif %}