Initial commit

This commit is contained in:
2025-07-15 23:39:10 +02:00
parent 1d3986a901
commit fb14214612
181 changed files with 31070 additions and 50 deletions

View File

@ -0,0 +1,15 @@
{{ form_start(form, {'attr': {'class': 'sp_modal sp_modal__warn sp_form__xhr'}}) }}
<div class="sp_modal__body">
<div>Do you really want to delete this node?</div>
<div>This action can't be canceled.</div>
</div>
<div class="sp_form-row__button">
<button class="sp_button" data-type="validate" type="button">
<span>Cancel</span>
</button>
<button class="sp_button" data-type="cancel" type="submit">
<span>Delete</span>
</button>
</div>
{{ form_end(form) }}

View File

@ -0,0 +1,114 @@
{#<div class="sp_panel__header"></div>#}
<div class="sp_panel__content">
{{ form_start(form, {'attr': {'id': 'node-form', 'class': 'sp_form__xhr'}}) }}
<section class="sp_panel__section">
<div class="sp_panel__section-title">
<label>1) Drag and place the node to the desired location</label>
</div>
<div class="sp_form-row_inline-container">
<div class="sp_form-row__text">
{{ form_label(form.coordX, 'Pos X') }}
{{ form_widget(form.coordX) }}
</div>
<div class="sp_form-row__text">
{{ form_label(form.coordY, 'Pos Y') }}
{{ form_widget(form.coordY) }}
</div>
</div>
<div class="sp_panel__section-title">
<label>2) Set quantity</label>
</div>
<div class="sp_form-row__text">
{{ form_label(form.quantity) }}
{{ form_widget(form.quantity) }}
</div>
<div class="sp_panel__section-title">
<label>3) Set primogems quantity</label>
</div>
<div class="sp_form-row__text">
{{ form_label(form.primogem) }}
{{ form_widget(form.primogem) }}
</div>
<div class="sp_panel__section-title">
<label>4) Write some helping text </label>
</div>
<div class="sp_form-row__textarea">
{{ form_label(form.description) }}
{{ form_widget(form.description) }}
</div>
<div class="sp_panel__section-title">
<label>5) Add a screenshot if any</label>
</div>
<div class="sp_form-row__file">
{{ form_label(form.screenshotA, 'Screenshot 1') }}
<input name="file-path" type="text" disabled>
<span class="sp_input__file-preview">
<img id="screenshot-a-preview" src="{{ asset(node.screenshotA ? assets.screenshot.thumbnail_path ~ node.screenshotA : assets.img._blank_xs) }}" alt>
</span>
{{ form_widget(form.screenshotA, {'attr': {'class': 'sp_input__format-screenshot', 'data-file-preview-target': 'screenshot-a-preview'}}) }}
</div>
<div class="sp_form-row__file">
{{ form_label(form.screenshotB, 'Screenshot 2') }}
<input name="file-path" type="text" disabled>
<span class="sp_input__file-preview">
<img id="screenshot-b-preview" src="{{ asset(node.screenshotB ? assets.screenshot.thumbnail_path ~ node.screenshotB : assets.img._blank_xs) }}" alt>
</span>
{{ form_widget(form.screenshotB, {'attr': {'class': 'sp_input__format-screenshot', 'data-file-preview-target': 'screenshot-b-preview'}}) }}
</div>
<div class="sp_form-row__file">
{{ form_label(form.screenshotC, 'Screenshot 3') }}
<input name="file-path" type="text" disabled>
<span class="sp_input__file-preview">
<img id="screenshot-c-preview" src="{{ asset(node.screenshotC ? assets.screenshot.thumbnail_path ~ node.screenshotC : assets.img._blank_xs) }}" alt>
</span>
{{ form_widget(form.screenshotC, {'attr': {'class': 'sp_input__format-screenshot', 'data-file-preview-target': 'screenshot-c-preview'}}) }}
</div>
<div class="sp_form-row__file">
{{ form_label(form.screenshotD, 'Screenshot 4') }}
<input name="file-path" type="text" disabled>
<span class="sp_input__file-preview">
<img id="screenshot-d-preview" src="{{ asset(node.screenshotD ? assets.screenshot.thumbnail_path ~ node.screenshotD : assets.img._blank_xs) }}" alt>
</span>
{{ form_widget(form.screenshotD, {'attr': {'class': 'sp_input__format-screenshot', 'data-file-preview-target': 'screenshot-d-preview'}}) }}
</div>
<div class="sp_form-row__file">
{{ form_label(form.screenshotE, 'Screenshot 5') }}
<input name="file-path" type="text" disabled>
<span class="sp_input__file-preview">
<img id="screenshot-e-preview" src="{{ asset(node.screenshotE ? assets.screenshot.thumbnail_path ~ node.screenshotE : assets.img._blank_xs) }}" alt>
</span>
{{ form_widget(form.screenshotE, {'attr': {'class': 'sp_input__format-screenshot', 'data-file-preview-target': 'screenshot-e-preview'}}) }}
</div>
<div class="sp_panel__section-title">
<label>6) Add YouTube video link if any</label>
</div>
<div class="sp_form-row__radio sp_radio__layout-grid-b sp_radio__style-text">
{{ form_label(form.version, null, {'label_attr': {'class': 'sp_radio__main-label'}}) }}
<div class="sp_radio__container">
{% for key, choice in form.version %}
<label class="sp_radio__input-wrapper" title="{{ choice.vars.label }}">
<span class="sp_radio__input-mark"></span>
<span class="sp_radio__input-label">{{ choice.vars.label }}</span>
<input name="{{ choice.vars.full_name }}" type="{{ choice.parent.vars.multiple ? 'checkbox' : 'radio' }}" value="{{ choice.vars.value }}" {% if key == 0 and choice.vars.required %}required{% endif%} {% if choice.vars.checked %}checked{% endif %}>
</label>
{% endfor %}
{% do form.version.setRendered %}
</div>
</div>
<div class="sp_form-row__button">
<button class="sp_button" data-type="cancel" type="button">
<span>Cancel</span>
</button>
<button class="sp_button" data-type="validate" type="submit">
<span>Save</span>
</button>
</div>
</section>
{{ form_end(form) }}
<label id="node-form-coordinate-tracker" class="sp_node__item" hidden>
<span class="sp_node__background">
<img src="{{ asset(worldmark.icon ? assets.worldmark.upload_path ~ worldmark.icon : assets.img._blank_xs) }}" alt>
</span>
<span class="sp_node__guidelines"></span>
</label>
</div>

View File

@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Node{% endblock %}
{% block body %}
<h1>Edit Node</h1>
{{ include('_dashboard/node/_form.html.twig', {'button_label': 'Update'}) }}
{{ include('_dashboard/node/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,46 @@
{% extends 'base.html.twig' %}
{% block title %}Node index{% endblock %}
{% block body %}
<h1>Node index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Quantity</th>
<th>Coordinate</th>
<th>Youtube</th>
<th>CreateAt</th>
<th>ModifiedAt</th>
<th>Version</th>
<th>IsDeleted</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for node in nodes %}
<tr>
<td>{{ node.id }}</td>
<td>{{ node.quantity }}</td>
<td>{{ node.coordinate ? node.coordinate|json_encode : '' }}</td>
<td>{{ node.youtube }}</td>
<td>{{ node.createAt ? node.createAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ node.modifiedAt ? node.modifiedAt|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ node.version }}</td>
<td>{{ node.isDeleted ? 'Yes' : 'No' }}</td>
<td>
<a href="{{ path('bo_node_edit', {'id': node.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="9">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
{#<a href="{{ path('bo_node_new') }}">Create new</a>#}
{% endblock %}

View File

@ -0,0 +1,9 @@
{% extends 'base.html.twig' %}
{% block title %}New Node{% endblock %}
{% block body %}
<h1>Create new Node</h1>
{{ include('_dashboard/node/_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,48 @@
{% extends 'base.html.twig' %}
{% block title %}Node{% endblock %}
{% block body %}
<h1>Node</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ node.id }}</td>
</tr>
<tr>
<th>Quantity</th>
<td>{{ node.quantity }}</td>
</tr>
<tr>
<th>Coordinate</th>
<td>{{ node.coordinate ? node.coordinate|json_encode : '' }}</td>
</tr>
<tr>
<th>Youtube</th>
<td>{{ node.youtube }}</td>
</tr>
<tr>
<th>CreateAt</th>
<td>{{ node.createAt ? node.createAt|date('Y-m-d H:i:s') : '' }}</td>
</tr>
<tr>
<th>ModifiedAt</th>
<td>{{ node.modifiedAt ? node.modifiedAt|date('Y-m-d H:i:s') : '' }}</td>
</tr>
<tr>
<th>Version</th>
<td>{{ node.version }}</td>
</tr>
<tr>
<th>IsDeleted</th>
<td>{{ node.isDeleted ? 'Yes' : 'No' }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('bo_node_edit', {'gridId': grid.id, 'worldmarkId': worldmark.id, 'id': node.id}) }}">edit</a>
{{ include('node/_delete_form.html.twig') }}
{% endblock %}