Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/CoreBundle/Controller/Admin/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ public function updateSetting(Request $request, AccessUrlHelper $accessUrlHelper
$templateMap[$s->getVariable()] = $s->getValueTemplate()->getId();
}
}
$platform = [
'server_type' => (string) $manager->getSetting('platform.server_type', true),
];

return $this->render('@ChamiloCore/Admin/Settings/default.html.twig', [
'schemas' => $schemas,
Expand All @@ -216,6 +219,7 @@ public function updateSetting(Request $request, AccessUrlHelper $accessUrlHelper
'template_map' => $templateMap,
'ordered_namespaces' => $ordered,
'namespace_labels' => $labelMap,
'platform' => $platform,
]);
}

Expand Down
38 changes: 29 additions & 9 deletions src/CoreBundle/Resources/views/Admin/Settings/default.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,35 @@
{{ field.vars.label|trans }}
</h3>

{% if template_map[fieldName] is defined %}
<a href="#"
class="text-info hover:text-info-dark show-template flex items-center gap-2"
data-template-id="{{ template_map[fieldName] }}"
title="{{ 'Show JSON Template'|trans }}">
<i class="mdi mdi-information-outline text-info text-lg"></i>
<span class="text-body-2">{{ 'Show JSON Template'|trans }}</span>
</a>
{% endif %}
<div class="flex items-center gap-2">
{% if template_map[fieldName] is defined %}
<a href="#"
class="text-info hover:text-info-dark show-template flex items-center gap-2"
data-template-id="{{ template_map[fieldName] }}"
title="{{ 'Show JSON Template'|trans }}">
<i class="mdi mdi-information-outline text-info text-lg"></i>
<span class="text-body-2">{{ 'Show JSON Template'|trans }}</span>
</a>
{% endif %}


{% if platform is defined and settings.platform.server_type is defined and settings.platform.server_type == 'test' %}

<span
class="ml-3 text-gray-60 text-lg flex items-center cursor-default debug-setting-icon"
title="{{ namespace ~ '.' ~ fieldName }}"
role="img"
aria-hidden="true"
data-field-id="{{ field.vars.id }}"
data-namespace="{{ namespace }}"
data-field-name="{{ fieldName }}"
{% if template_map[fieldName] is defined %} data-template-id="{{ template_map[fieldName] }}" {% endif %}
>
<i class="mdi mdi-alphabetical course-tool__icon bg-primary-bgdisabled text-base" aria-hidden="true"></i>
</span>
{% endif %}

</div>
</div>

<div class="mb-2">
Expand Down
Loading