{% extends "base.html" %} {% block title %}{{ _('Objects') }} — {{ service_name }}{% endblock %} {% block stylesheets %} {{ super() }} {% endblock %} {% block template_values %} {% do set_template_value("objects_allowed_to_select", objects_allowed_to_select) %} {% do set_template_value("translations.select_at_least_one_object", _('You have to select at least one object.')) %} {% do set_template_value("translations.you_do_not_have_write_permissions", _('You do not have write permissions for at least one object.')) %} {% if edit_location %} {% do set_template_value("translations.you_have_to_select_a_location_or_responsible_user", _('You have to select a location or a responsible user.')) %} {% do set_template_value("translations.you_have_unallowed_values_in_red_marked_fields", _('You have unallowed values in the red marked fields.')) %} {% endif %} {% if edit_permissions %} {% do set_template_value("current_permissions_special_groups", current_permissions_special_groups) %} {% do set_template_value("current_permissions_normal_entities", current_permissions_normal_entities) %} {% do set_template_value("translations.you_have_to_select_a_target_type", _('You have to select a target type.')) %} {% do set_template_value("translations.you_have_to_select_a_basic_group", _('You have to select a group.')) %} {% do set_template_value("translations.you_have_to_select_a_project_group", _('You have to select a project group.')) %} {% do set_template_value("translations.you_have_to_select_a_user", _('You have to select a user.')) %} {% do set_template_value("translations.you_have_to_select_how_to_update", _('You have to select how you want to update the permissions.')) %} {% do set_template_value("translations.you_have_to_select_a_permission", _('You have to select a permission.')) %} {% do set_template_value("translations.you_have_selected_write_grant_permissions_for_special_group", _('You have selected write/grant permissions for a special group.')) %} {% endif %} {% if generate_labels %} {% set page_sizes = {} %} {% for paper_format in PAGE_SIZES %} {% do page_sizes.update({ paper_format: [ PAGE_SIZES[paper_format][0], PAGE_SIZES[paper_format][1] ] }) %} {% endfor %} {% do set_template_value("page_sizes", page_sizes) %} {% do set_template_value("horizontal_label_margin", HORIZONTAL_LABEL_MARGIN) %} {% do set_template_value("vertical_label_margin", VERTICAL_LABEL_MARGIN) %} {% do set_template_value("generate_labels_form.center_qr_ghs.name", generate_labels_form.center_qr_ghs.name) %} {% do set_template_value("translations.select_a_paper_format", _("Select a Paper Format")) %} {% do set_template_value("translations.quantity_must_be_greater_than_0", _('The quantity must be an integer value greater than 0.')) %} {% do set_template_value("translations.width_must_be_between_min_and_max", _("The width must be a number between {minWidth} and {maxWidth}.")) %} {% do set_template_value("translations.minimum_height_must_be_between_0_and_placeholder", _("The minimum height must be a number between 0 and {maxHeight}.")) %} {% do set_template_value("translations.minimum_width_must_be_greater_or_equal_to_0", _("The minimum width must be a number greater or equal to 0.")) %} {% endif %} {{ super() }} {% endblock %} {% block scripts %} {{ super() }} {% if get_user_language(current_user).lang_code == 'de' %} {% endif %} {% if edit_location %} {% elif create_from_objects %} {% elif generate_labels %} {% elif edit_permissions %} {% endif %} {% endblock %} {% block content %} {# counter for plotly_chart_plots #} {% set plot_counter = namespace(value=0) %} {% set object_reference_counter = namespace(value=0) %} {% if search_notes is defined %} {% for category, note, start, end in search_notes %} {% if category == "error" %} {% set alert_class="alert-danger" %} {% elif category == "warning" %} {% set alert_class="alert-warning" %} {% else %} {% set alert_class="alert-info" %} {% endif %} {% endfor %} {% endif %} {% if not advanced_search_had_error %} {% if search_tree %} {% macro render_search_tree(search_tree, depth=0) -%} {% if depth > 100 %} ... {% else %} {% if search_tree.input_text %} {{ search_tree.input_text }} {% elif search_tree | length == 2 %} {% if search_tree[0].operator %} {{ search_tree[0].operator }} {% else %} {{ search_tree[0].input_text }} {% endif %} {% if search_tree[1].input_text %} {{ search_tree[1].input_text }} {% else %} {{ render_search_tree(search_tree[1], depth=depth + 1) }} {% endif %} {% elif search_tree | length == 3 %} {% if search_tree[0].input_text %} {{ search_tree[0].input_text }} {% else %}
{{ render_search_tree(search_tree[0], depth=depth + 1) }}
{% endif %} {{ search_tree[1].operator }} {% if search_tree[2].input_text %} {{ search_tree[2].input_text }} {% else %} {{ render_search_tree(search_tree[2], depth=depth + 1) }} {% endif %}
{% endif %} {% endif %} {%- endmacro %} {% if search_tree.input_text %} {{ search_tree.input_text }} {% else %} {% endif %} {% endif %} {% endif %} {% if objects or not search_notes %}

{{ object_name_plural }}

{% if filter_action_type_infos or filter_action_infos or filter_instrument_infos or filter_location_infos or filter_related_user_infos or filter_user_permissions_info or filter_all_users_permissions or filter_anonymous_permissions or filter_group_permissions_info or filter_project_permissions_info or filter_doi_info or filter_origins_info %} {% endif %} {% endif %} {% if show_filters %} {% endif %} {{ _('Search') }} {% if not edit_location and not create_from_objects and not generate_labels and not edit_permissions %}
{% elif edit_location and not create_from_objects and not generate_labels and not edit_permissions %} {% set allowed_language_ids = [] %} {% for language in all_languages %} {% if language.enabled_for_input %} {% do allowed_language_ids.append(language.id) %} {% endif %} {% endfor %}
{{ location_form.csrf_token }} {{ _('Select objects for which you want to change the location.') }}
{% elif create_from_objects and not edit_location and not edit_permissions %}
{{ use_in_action_form.csrf_token }} {{ _('Select objects that can be used in %(action_type_name)s Actions.', action_type_name=use_in_action_type.name|get_translated_text) }}
{{ _('Cancel') }} {% if favorite_actions | length > 0 %}
{% else %} {% endif %}
{% elif generate_labels and not create_from_objects and not edit_location and not edit_permissions %}
{{ generate_labels_form.csrf_token }} {{ _('Select objects for which you want to generate labels.') }}

mm
mm
mm
{{ _('Cancel') }}
{% elif not create_from_objects and not edit_location and not generate_labels and edit_permissions %}
{{ edit_permissions_form.csrf_token }} {{ _('Select objects for which you want to change the permissions.') }}
{% for key, label in edit_permissions_form.update_mode.choices %}
{% endfor %}
{% for key, label in edit_permissions_form.permission.choices %}
{% endfor %}
{{ _('Cancel') }}
{% endif %} {% if objects %}
{% if edit_location or create_from_objects or generate_labels or edit_permissions %} {% endif %} {% if not edit_permissions %} {% if creation_info %} {% endif %} {% if last_edit_info %} {% endif %} {% if other_databases_info %} {% endif %} {% if 'instrument' in action_info and not config['DISABLE_INSTRUMENTS'] %} {% endif %} {% if 'action' in action_info %} {% endif %} {% if 'location' in location_info %} {% endif %} {% if 'responsible_user' in location_info %} {% endif %} {% if 'topics' in topic_info %} {% endif %} {% for property_name in display_properties %} {% endfor %} {% if creation_info or last_edit_info %} {% if 'date' in creation_info %} {% endif %} {% if 'user' in creation_info %} {% endif %} {% if 'date' in last_edit_info %} {% endif %} {% if 'user' in last_edit_info %} {% endif %} {% endif %} {% else %} {% set read_permissions_description = _("Permission to view objects and their properties, files and comments.") %} {% set write_permissions_description = _("Permission to edit objects and their properties and add files and comments. Includes Read permissions.") %} {% set grant_permissions_description = _("Permission to grant permissions to other users. Includes Write permissions.") %} {% endif %} {% for object in objects %} {% if edit_location or create_from_objects or generate_labels or edit_permissions %} {% if edit_location %} {% set disabled_checkbox_reason = _('You need at least write permission to change the location of an object.') %} {% elif create_from_objects %} {% set disabled_checkbox_reason = _('The object cannot be used in a %(action_type_name)s Action.', action_type_name=use_in_action_type.name|get_translated_text) %} {% elif generate_labels %} {% set disabled_checkbox_reason = _('Labels are disabled for the action type of this object.') %} {% elif edit_permissions %} {% set disabled_checkbox_reason = _('You need grant permission to change the permissions for this object.') %} {% endif %} {% if (edit_location or create_from_objects or generate_labels or edit_permissions) and object.object_id not in objects_allowed_to_select %} {% endif %} {% endif %} {% if not edit_permissions %} {% if 'date' in creation_info %} {% endif %} {% if 'user' in creation_info %} {% endif %} {% if 'date' in last_edit_info %} {% endif %} {% if 'user' in last_edit_info %} {% endif %} {% if other_databases_info %} {% endif %} {% if object.action is not none %} {% if 'instrument' in action_info and not config['DISABLE_INSTRUMENTS'] %} {% if object.action.instrument is not none %} {% else %} {% endif %} {% endif %} {% if 'action' in action_info %} {% endif %} {% else %} {% if 'instrument' in action_info and not config['DISABLE_INSTRUMENTS'] %} {% endif %} {% if 'action' in action_info %} {% endif %} {% endif %} {% if 'location' in location_info %} {% endif %} {% if 'responsible_user' in location_info %} {% endif %} {% if 'topics' in topic_info %} {% endif %} {% set files = object.files %} {% for property_name in display_properties %} {% if object.display_properties[property_name] is not none %} {% set metadata_language = none %} {% set object_id = object.object_id %} {% set id_prefix_root = "object" ~ object_id %} {% set property_path = (property_name,) %} {% set id_prefix = id_prefix_for_property_path(property_path, id_prefix_root) %} {% set data = object.display_properties[property_name][0] %} {% set schema = object.display_properties[property_name][1] %} {% set container_style = 'table' %} {% else %} {% endif %} {% endfor %} {% else %} {% if object["object_id"] in objects_allowed_to_select %} {% for available_permission in ['none', 'read', 'write', 'grant'] %} {% if available_permission == current_permissions_special_groups["signed-in-users"][object["object_id"]] %} {% else %} {% endif %} {% endfor %} {% else %} {% endif %} {% endif %} {% endfor %}
{{ _('ID') }} {% if sorting_enabled %}{% endif %} {{ _('Name') }} {% if sorting_enabled %}{% endif %}{{ _('Created') }}{{ _('Last modified') }}{{ _('Other Databases') }}{{ _('Instrument') }}{{ _('Action') }}{{ _('Location') }}{{ _('Responsible User') }}{{ _('Topics') }}{{ display_property_titles.get(property_name, property_name | e) | get_translated_text | safe }}{% if property_name not in ('hazards', 'tags') %} {% if sorting_enabled %}{% endif %}{% endif %}
{{ _('Date') }} {% if sorting_enabled %}{% endif %}{{ _('User') }}{{ _('Date') }} {% if sorting_enabled %}{% endif %}{{ _('User') }}
{{ _('None') }} {{ _('Read') }} {{ _('Write') }} {{ _('Grant') }}
{{ object.object_id }} {% if object.name | get_translated_text == '' %}—{% else %}{{ object.name | get_translated_text }}{% endif %} {{ import_information_symbol(wrap_object_ref(fed_id=object.fed_id, component_uuid=object.component.uuid, eln_import_id=object.eln_import_id, eln_object_id=object.eln_object_id)) }} {{ object.created_at | babel_format_date }} {{ user_reference(object.created_by) }} {% if object.last_modified_at is not none %}{{ object.last_modified_at | babel_format_date }}{% else %}—{% endif %} {{ user_reference(object.modified_by) }} {% set shares = get_shares_for_object(object.object_id) %} {% set components = [] %} {% if object.component is not none %} {% do components.append(object.component) %}  {{ object.component.get_name() }} {% endif %} {% for share in shares %} {% if share.component is not none %} {% do components.append(share.component) %}  {{ share.component.get_name() }} {% endif %} {% endfor %} {% if not components %} — {% endif %} {{ object.action.instrument.name | get_translated_text(default=_('Unnamed Instrument')) }} {{ import_information_symbol(object.action.instrument) }} {{ object.action.name | get_translated_text(default=_('Unnamed Action')) }} {{ import_information_symbol(object.action) }} {% if object.location_id is none %} — {% else %} {% with location = get_location(object.location_id) %} {{ location | get_location_name(True) }} {{ import_information_symbol(location) }} {% endwith %} {% endif %} {% if object.responsible_user_id is none %} — {% else %} {{ user_reference(object.responsible_user_id) }} {% endif %} {% if object.topic_ids %} {% for topic_id in object.topic_ids %} {% set topic = topics_by_id.get(topic_id) %} {% if topic is not none %} {{ topic.name | get_translated_text }} {% endif %} {% endfor %} {% else %} — {% endif %} {% include "objects/view/any.html" %}
{% if pagination_enabled %}
{{ _('Pages') }}:
    {% if limit and num_objects_found %} {% for i in range((num_objects_found+limit-1)//limit) %} {% if i * limit == offset %}
  1. {{ i + 1 }}
  2. {% else %}
  3. {{ i + 1 }}
  4. {% endif %} {% endfor %} {% else %}
  5. 1
  6. {% endif %}
{{ _('Objects per page') }}:
    {% for i in (10, 25, 50, 100, 'all') %} {% if i == limit or (limit is none and i == 'all') %}
  1. {% if i == 'all' %}{{ _('all') }}{% else %}{{ i }}{% endif %}
  2. {% else %}
  3. {% if i == 'all' %}{{ _('all') }}{% else %}{{ i }}{% endif %}
  4. {% endif %} {% endfor %}
{% endif %} {% elif not search_notes and use_advanced_search and advanced_search_had_error %} {% elif not advanced_search_had_error %} {% endif %} {% include "objects/view/timeseries_modals.html" %} {% endblock %}