{% extends "base.html" %} {% block title %}{% if (show_object_type_and_id_on_object_page_text is none and not config['HIDE_OBJECT_TYPE_AND_ID_ON_OBJECT_PAGE']) or show_object_type_and_id_on_object_page_text %}{% if object_type is not none %}{{ object_type }}{% else %}{{ _('Object') }}{% endif %} #{{ object_id }}{% if name %}: {% endif %}{% endif %}{{ name | get_translated_text(default='—') }} — {{ service_name }}{% endblock %} {% block head %} {{ super() }} {% endblock %} {% block stylesheets %} {{ super() }} {% endblock %} {% set id_prefix = "object_" %} {% block content %} {% if is_archived %}
{{ _('There are no files for this %(object_type)s.', object_type=action_type.object_name | get_translated_text(default=_('Object'))) }}
{% endif %} {% for file in files %} {% if file.is_hidden %}{{ _("Datetime") }} | {{ _("Location") }} | {{ _("Responsible User") }} | {{ _("Assigning User") }} | {{ _("Description") }} |
---|---|---|---|---|
{{ object_location_assignment.utc_datetime | babel_format_datetime }} | {% if object_location_assignment.location_id is not none %} {% with location = get_location(object_location_assignment.location_id) %} {{ location | get_location_name(True) }} {{ import_information_symbol(location) }} {% endwith %} {% else %}—{% endif %} | {% if object_location_assignment.responsible_user_id is not none %} {% with user = get_user(object_location_assignment.responsible_user_id) %} {{ user.get_name() }} {{ import_information_symbol(user) }} {% if object_location_assignment.confirmed %} ✓ {% elif object_location_assignment.declined %} ✗ {% elif object_location_assignment.responsible_user_id == current_user.id %} {{ _('Confirm') }} {{ _('Decline') }} {% else %} ? {% endif %} {% endwith %} {% else %} — {% endif %} | {% with user = get_user(object_location_assignment.user_id) %}{{ user.get_name() }} {{ import_information_symbol(user) }} | {% endwith %}{{ object_location_assignment.description | get_translated_text or ('—' | safe) }} |
{{ _('DOI') }} | {{ _('Title') }} | {{ _('Object Name') }} | |
---|---|---|---|
{{ object_publication.doi }} | {% if object_publication.title is none %}—{% else %}{{ object_publication.title }}{% endif %} | {% if object_publication.object_name is none %}—{% else %}{{ object_publication.object_name }}{% endif %} | {{ _('View Objects') }} |
{{ _('This object has not been linked to a publication yet.') }}
{% endif %} {% if user_may_link_publication %} {% for message in get_flashed_messages() %} {% if 'Please enter a valid DOI' in message %} {{ publication_form.errors.__setitem__(publication_form.doi.name, _('Please enter a valid DOI.')) or '' }} {% endif %} {% endfor %} {% endif %} {% endif %} {% if not is_archived %} {% if action is not none and action.type.enable_comments %}{{ comment.content }}
{{ _('There are no comments for this object.') }}
{% endif %} {% if user_may_comment %} {% endif %} {% endif %} {% endif %} {% if not is_archived and action is not none and action.type.enable_activity_log %} {% if object_log_entries %}{{ _('Datetime') }} | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ object_log_entry.utc_datetime | babel_format_datetime }} | {% if object_log_entry.type == ObjectLogEntryType.CREATE_OBJECT %}{% if 'previous_object_id' in object_log_entry.data %} {{ _('%(user_ref)s created the object using data from object #%(previous_object_id)s.', user_ref=user_reference(object_log_entry.user), previous_object_url=url_for('.object', object_id=object_log_entry.data['previous_object_id']), previous_object_id=object_log_entry.data['previous_object_id']) }} {% else %} {{ _('%(user_ref)s created the object.', user_ref=user_reference(object_log_entry.user)) }} {% endif %} | {{ _('View') }} | {% elif object_log_entry.type == ObjectLogEntryType.CREATE_BATCH %}{{ _('%(user_ref)s created the object as part of a batch.', user_ref=user_reference(object_log_entry.user), batch_url=url_for('.objects', ids=(object_log_entry.data['object_ids'] | tojson)[1:-1])) }} | {{ _('View') }} | {% elif object_log_entry.type == ObjectLogEntryType.EDIT_OBJECT %}{{ _('%(user_ref)s edited the object.', user_ref=user_reference(object_log_entry.user)) }} | {% if 'version_id' in object_log_entry.data %} {{ _('View') }} {% endif %} | {% elif object_log_entry.type == ObjectLogEntryType.RESTORE_OBJECT_VERSION %}{{ _('%(user_ref)s restored object version #%(version_id)s.', user_ref=user_reference(object_log_entry.user), version_url=url_for('.object_version', object_id=object_id, version_id=object_log_entry.data['restored_version_id']), version_id=object_log_entry.data['restored_version_id']) }} | {% if 'version_id' in object_log_entry.data %} {{ _('View') }} {% endif %} | {% elif object_log_entry.type == ObjectLogEntryType.USE_OBJECT_IN_MEASUREMENT %} {% if object_log_entry.data['measurement_id'] %}{{ _('%(user_ref)s used the object in %(measurement_name)s (#%(measurement_id)s).', user_ref=user_reference(object_log_entry.user), measurement_url=url_for('.object', object_id=object_log_entry.data['measurement_id']), measurement_id=object_log_entry.data['measurement_id'], measurement_name=object_log_entry.data['measurement'].name | get_translated_text) }} | {{ _('View') }} | {% else %}{{ _('%(user_ref)s used the object in a measurement.', user_ref=user_reference(object_log_entry.user)) }} | {% endif %} {% elif object_log_entry.type == ObjectLogEntryType.USE_OBJECT_IN_SAMPLE_CREATION %} {% if object_log_entry.data['sample_id'] %} | {{ _('%(user_ref)s used the object to create %(sample_name)s (#%(sample_id)s).', user_ref=user_reference(object_log_entry.user), sample_url=url_for('.object', object_id=object_log_entry.data['sample_id']), sample_id=object_log_entry.data['sample_id'], sample_name=object_log_entry.data['sample'].name | get_translated_text) }} | {{ _('View') }} | {% else %}{{ _('%(user_ref)s used the object to create a sample.', user_ref=user_reference(object_log_entry.user)) }} | {% endif %} {% elif object_log_entry.type == ObjectLogEntryType.POST_COMMENT %} | {{ _('%(user_ref)s posted a comment for this object.', user_ref=user_reference(object_log_entry.user)) }} | {% if action is not none and action.type.enable_comments %} {% if 'comment_id' in object_log_entry.data %} {{ _('View') }} {% endif %} {% endif %} | {% elif object_log_entry.type == ObjectLogEntryType.UPLOAD_FILE %}{% for file in files %} {% if file.id == object_log_entry.data['file_id'] %} {% if file.storage == 'local' or file.storage == 'database' %} {% if action is not none and action.type.enable_files %} {{ _('%(user_ref)s uploaded %(file_name)s.', user_ref=user_reference(object_log_entry.user), file_url='#file-' + object_log_entry.data['file_id'] | string, file_name=file.original_file_name) }} {% else %} {{ _('%(user_ref)s uploaded %(file_name)s.', user_ref=user_reference(object_log_entry.user), file_name=file.original_file_name) }} {% endif %} {% elif file.storage == 'url' %} {{ _('%(user_ref)s linked %(link_url)s.', user_ref=user_reference(object_log_entry.user), link_url=file.url) }} {% else %} {% if action is not none and action.type.enable_files %} {{ _('%(user_ref)s posted file #%(file_id)s.', user_ref=user_reference(object_log_entry.user), file_url='#file-' + object_log_entry.data['file_id'] | string, file_id=object_log_entry.data['file_id']) }} {% else %} {{ _('%(user_ref)s posted a file.', user_ref=user_reference(object_log_entry.user)) }} {% endif %} {% endif %} {% endif %} {% endfor %} | {% if action is not none and action.type.enable_files %} {% if 'file_id' in object_log_entry.data %} {{ _('View') }} {% endif %} {% endif %} | {% elif object_log_entry.type == ObjectLogEntryType.ASSIGN_LOCATION %} {% set object_location_assignment = get_object_location_assignment(object_log_entry.data['object_location_assignment_id']) %} {% if object_location_assignment.location is not none and object_location_assignment.responsible_user_id is not none %}{{ _('%(user_ref)s assigned this object to location %(location_name)s and user %(other_user_name)s.', user_ref=user_reference(object_log_entry.user), location_url=url_for('.location', location_id=object_location_assignment.location_id), location_name=object_location_assignment.location_id | get_location_name(True), other_user_url=url_for('.user_profile', user_id=object_location_assignment.responsible_user_id), other_user_name=get_user(object_location_assignment.responsible_user_id).name) }} | {% elif object_location_assignment.location is not none %}{{ _('%(user_ref)s assigned this object to location %(location_name)s.', user_ref=user_reference(object_log_entry.user), location_url=url_for('.location', location_id=object_location_assignment.location_id), location_name=object_location_assignment.location_id | get_location_name(True)) }} | {% elif object_location_assignment.responsible_user_id is not none %}{{ _('%(user_ref)s assigned this object to user %(other_user_name)s.', user_ref=user_reference(object_log_entry.user), other_user_url=url_for('.user_profile', user_id=object_location_assignment.responsible_user_id), other_user_name=get_user(object_location_assignment.responsible_user_id).name) }} | {% endif %}{% elif object_log_entry.type == ObjectLogEntryType.LINK_PUBLICATION %} | {{ _('%(user_ref)s linked publication %(doi)s to the object.', user_ref=user_reference(object_log_entry.user), url_doi=object_log_entry.data['doi'] | urlencode, doi=object_log_entry.data['doi']) }} | {% if action is not none and action.type.enable_publications %} {{ _('View') }} {% endif %} | {% elif object_log_entry.type == ObjectLogEntryType.REFERENCE_OBJECT_IN_METADATA %} {% if object_log_entry.data['object_id'] %}{{ _('%(user_ref)s referenced the object in the metadata of %(object_name)s (#%(object_id)s).', user_ref=user_reference(object_log_entry.user), object_url=url_for('.object', object_id=object_log_entry.data['object_id']), object_name=object_log_entry.data['object'].name | get_translated_text, object_id=object_log_entry.data['object_id']) }} | {{ _('View') }} | {% else %}{{ _('%(user_ref)s referenced the object in the metadata of another object.', user_ref=user_reference(object_log_entry.user)) }} | {% endif %} {% elif object_log_entry.type == ObjectLogEntryType.EXPORT_TO_DATAVERSE %} | {{ _('%(user_ref)s exported this object to a Dataverse.', user_ref=user_reference(object_log_entry.user)) }} | {% if object_log_entry.data.get('dataverse_url') %} {{ _('View') }} {% endif %} | {% elif object_log_entry.type == ObjectLogEntryType.LINK_PROJECT %} {% with project = get_project(object_log_entry.data.project_id) %} {% if project is not none %}{{ _('%(user_ref)s linked this object to %(project_name)s (#%(project_id)s).', user_ref=user_reference(object_log_entry.user), project_url=url_for('.project', project_id=project.id), project_name=project.name | get_translated_text, project_id=project.id) }} | {{ _('View') }} | {% else %}{{ _('%(user_ref)s linked this object to a project group.', user_ref=user_reference(object_log_entry.user)) }} | {% endif %} {% endwith %} {% elif object_log_entry.type == ObjectLogEntryType.UNLINK_PROJECT %} {% if object_log_entry.data.project_deleted %} | {{ _('%(user_ref)s deleted the project group this object was linked to.', user_ref=user_reference(object_log_entry.user)) }} | {% else %} {% with project = get_project(object_log_entry.data.project_id) %} {% if project is not none %} | {{ _('%(user_ref)s removed the link of this object to %(project_name)s (#%(project_id)s).', user_ref=user_reference(object_log_entry.user), project_url=url_for('.project', project_id=project.id), project_name=project.name | get_translated_text, project_id=project.id) }} | {{ _('View') }} | {% else %}{{ _('%(user_ref)s removed the link of this object to a project group.', user_ref=user_reference(object_log_entry.user)) }} | {% endif %} {% endwith %} {% endif %} {% else %} | {{ _('Unknown event') }} | {% endif %} |
{{ _('Datetime') }} | |
---|---|
{{ log_entry.utc_datetime | babel_format_datetime }} |
{% if log_entry.user_id %}
{% set user_ref = user_reference(log_entry.user_id) %}
{% else %}
{% set user_ref = _('An unknown user') %}
{% endif %}
{% if log_entry.type == FedObjectLogEntryType.IMPORT_OBJECT %}
{% if not log_entry.user_id %}
{% set user_ref = _('an unknown user') %}
{% endif %}
{% if 'version_id' in log_entry.data %}
{% set version_id = log_entry.data.version_id %}
{% else %}
{% set version_id = '?' %}
{% endif %}
{% if log_entry.data.import_notes %}
{{ _('Version #%(version_id)s of the object shared by %(user_ref)s was imported with the following notes:', version_id=version_id, user_ref=user_ref) }}
|