team-3/src/c3nav/editor/templates/editor/level.html
2025-08-02 07:54:26 +02:00

86 lines
3.5 KiB
HTML

{% load bootstrap3 %}
{% load i18n %}
{% include 'editor/fragment_levels.html' %}
<h3>
{{ level.title }}
{% if level.on_top_of != None %}
{% with level.on_top_of.title as on_top_of_level_title %}
<small>{% blocktrans %}on top of {{ on_top_of_level_title }}{% endblocktrans %}</small>
{% endwith %}
{% endif %}
</h3>
{% bootstrap_messages %}
<p>
<a class="btn btn-default btn-xs" accesskey="e" href="{% url 'editor.levels.edit' pk=level.pk %}">
{% trans 'Level' as model_title %}
<i class="glyphicon glyphicon-pencil"></i> {% blocktrans %}Edit {{ model_title }}{% endblocktrans %}
</a>
<button id="clone-floor-btn" class="btn btn-info btn-xs" style="margin-left: 5px;" title="Clone selected items to another floor">
<i class="glyphicon glyphicon-copy"></i> Clone to Floor
</button>
</p>
<p>
{% if level.on_top_of == None %}
<a href="{% url 'editor.index' %}">&laquo; {% trans 'back to overview' %}</a>
{% else %}
<a href="{% url 'editor.levels.detail' pk=level.on_top_of.pk %}">&laquo; {% trans 'back to parent level' %}</a>
{% endif %}
</p>
<!-- Clone Floor Interface -->
<div id="clone-floor-selector" style="display: none; margin: 10px 0; padding: 10px; border: 1px solid #ddd; border-radius: 4px; background-color: #f9f9f9;">
<h4><i class="glyphicon glyphicon-copy"></i> Clone Selected Items</h4>
<div class="form-group">
<label for="target-level-select">Target Level:</label>
<select id="target-level-select" class="form-control">
<option value="">Select target level...</option>
{% for l in levels %}
{% if l.pk != level.pk %}
<option value="{{ l.pk }}">{{ l.title }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="keep-sync-checkbox"> Keep items synchronized across levels
</label>
</div>
<div class="form-group">
<button id="execute-clone-btn" class="btn btn-primary btn-sm">
<i class="glyphicon glyphicon-ok"></i> Clone Items
</button>
<button id="cancel-clone-btn" class="btn btn-default btn-sm">
<i class="glyphicon glyphicon-remove"></i> Cancel
</button>
</div>
<div id="selected-items-info" class="alert alert-info" style="margin-bottom: 0;">
<strong>Selected Items: <span id="selected-count">0</span></strong>
<p style="margin: 5px 0 0 0; font-size: 12px;">Click on map items to select them for cloning. Selected items will be highlighted in red.</p>
</div>
</div>
{% url 'editor.levels.graph' level=level.pk as graph_url %}
{% url 'editor.levels.overlays' level=level.pk as overlays_url %}
{% include 'editor/fragment_child_models.html' with graph_url=graph_url overlays_url=overlays_url %}
<div class="clearfix"></div>
{% if level.on_top_of is None %}
<h3>{% trans 'Levels on top' %}</h3>
{% if can_create_level %}
<p>
<a class="btn btn-default btn-xs" accesskey="n" href="{% url 'editor.levels_on_top.create' on_top_of=level.pk %}">
<i class="glyphicon glyphicon-plus"></i> {% blocktrans %}New {{ model_title }}{% endblocktrans %}
</a>
</p>
{% endif %}
<div class="list-group">
{% for l in levels_on_top %}
<a href="{% url 'editor.levels.detail' pk=l.pk %}" class="list-group-item">
{{ l.title }}
</a>
{% endfor %}
</div>
{% endif %}