mirror of
https://github.com/flextype/flextype.git
synced 2025-08-24 05:43:10 +02:00
@@ -3,17 +3,42 @@
|
||||
{% block content %}
|
||||
{% if (themes_list|length > 0) %}
|
||||
<div class="card-deck">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Default
|
||||
</div>
|
||||
<img src="{{ base_url() }}/site/themes/default/preview.png" class="card-img-top" alt="...">
|
||||
<div class="card-footer">
|
||||
<small class="text-muted text-center">Active theme</small>
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
{% for key, theme in themes_list %}
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{{ theme.name }}
|
||||
</div>
|
||||
<div style="padding: 0px;">
|
||||
<img src="{{ base_url() }}/site/themes/default/thumbnail.jpg" class="card-img-top" alt="{{ theme.name }}">
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<div class="btn-group">
|
||||
{% if key == registry.settings.theme %}
|
||||
<a class="btn btn-default" href="javascript:;">{{ tr('admin_active_theme') }}</a>
|
||||
{% else %}
|
||||
<form id="activate-theme-id-{{ key }}" action="{{ path_for('admin.themes.activateProcess') }}" method="POST" style="display: none;">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="theme-id" value="{{ key }}">
|
||||
<input type="hidden" name="theme-status" value="true">
|
||||
</form>
|
||||
<a class="btn btn-default" href="javascript:;"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('activate-theme-id-{{ key }}').submit();">{{ tr('admin_activate') }}</a>
|
||||
{% endif %}
|
||||
<button type="button" class="btn btn-default dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{{ path_for('admin.templates.index') }}?theme={{ key }}">{{ tr('admin_edit') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -3,6 +3,7 @@
|
||||
{% block content %}
|
||||
<form method="post" id="form">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
@@ -6,6 +6,7 @@
|
||||
<input type="hidden" name="action" value="save-form">
|
||||
<input type="hidden" name="type" value="{{ type }}">
|
||||
<input type="hidden" name="id" value="{{ id }}">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
|
@@ -15,7 +15,7 @@
|
||||
{% for template in templates_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path_for('admin.templates.edit') }}?id={{ template.basename }}&type=template">{{ template.basename }}</a>
|
||||
<a href="{{ path_for('admin.templates.edit') }}?id={{ template.basename }}&type=template&theme={{ theme }}">{{ template.basename }}</a>
|
||||
</td>
|
||||
<td>{{ tr('admin_template') }}</td>
|
||||
<td class="text-right">
|
||||
@@ -35,11 +35,13 @@
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="template-id" value="{{ template.basename }}">
|
||||
<input type="hidden" name="type" value="template">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
</form>
|
||||
<form id="delete-template-id-{{ template.basename }}" action="{{ path_for('admin.templates.deleteProcess') }}" method="POST" style="display: none;">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="template-id" value="{{ template.basename }}">
|
||||
<input type="hidden" name="type" value="template">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
</form>
|
||||
<a class="btn btn-default" href="javascript:;"
|
||||
onclick="event.preventDefault();
|
||||
@@ -48,22 +50,21 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if partials_list|length > 0 %}
|
||||
{% for partial in partials_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path_for('admin.templates.edit') }}?id={{ partial.basename }}&type=partial">{{ partial.basename }}</a>
|
||||
<a href="{{ path_for('admin.templates.edit') }}?id={{ partial.basename }}&type=partial&theme={{ theme }}">{{ partial.basename }}</a>
|
||||
</td>
|
||||
<td>{{ tr('admin_partial') }}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default" href="{{ path_for('admin.templates.edit') }}?id={{ partial.basename }}&type=partial">{{ tr('admin_edit') }}</a>
|
||||
<a class="btn btn-default" href="{{ path_for('admin.templates.edit') }}?id={{ partial.basename }}&type=partial&theme={{ theme }}">{{ tr('admin_edit') }}</a>
|
||||
<button type="button" class="btn btn-default dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="sr-only">Toggle Dropdown</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{{ path_for('admin.templates.rename') }}?id={{ partial.basename }}&type=partial">{{ tr('admin_rename') }}</a>
|
||||
<a class="dropdown-item" href="{{ path_for('admin.templates.rename') }}?id={{ partial.basename }}&type=partial&theme={{ theme }}">{{ tr('admin_rename') }}</a>
|
||||
<a class="dropdown-item" href="javascript:;"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('duplicate-partial-id-{{ partial.basename }}').submit();">{{ tr('admin_duplicate') }}</a>
|
||||
@@ -73,11 +74,13 @@
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="partial-id" value="{{ partial.basename }}">
|
||||
<input type="hidden" name="type" value="partial">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
</form>
|
||||
<form id="delete-partial-id-{{ partial.basename }}" action="{{ path_for('admin.templates.deleteProcess') }}" method="POST" style="display: none;">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="partial-id" value="{{ partial.basename }}">
|
||||
<input type="hidden" name="type" value="partial">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
</form>
|
||||
<a class="btn btn-default" href="javascript:;"
|
||||
onclick="event.preventDefault();
|
||||
|
@@ -5,6 +5,7 @@
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="id_current" value="{{ id_current }}">
|
||||
<input type="hidden" name="type_current" value="{{ type_current }}">
|
||||
<input type="hidden" name="theme" value="{{ theme }}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
Reference in New Issue
Block a user