improve ux in admin configuration interface

This commit is contained in:
2021-02-06 13:51:46 +01:00
parent 7ef534438e
commit 6f80bd0d37
11 changed files with 190 additions and 32 deletions

View File

@@ -0,0 +1,31 @@
{#
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
<info@champs-libres.coop> / <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %}
{% block vertical_menu_content %}
{{ chill_menu('admin_docstore', {
'layout': '@ChillDocStore/Admin/menu.html.twig',
}) }}
{% endblock %}
{% block layout_wvm_content %}
{% block admin_content %}<!-- block personcontent empty -->
<h1>{{ 'Documents configuration' |trans }}</h1>
{% endblock %}
{% endblock %}

View File

@@ -0,0 +1,21 @@
{#
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
<info@champs-libres.coop> / <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillMain/Menu/verticalMenu.html.twig" %}
{% block v_menu_title %}{{ 'Documents configuration'|trans }}{% endblock %}

View File

@@ -16,5 +16,5 @@
#}
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="sc-button bt-create">{{ button_label|default('Save') }}</button>
<button class="sc-button bt-edit">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View File

@@ -14,18 +14,29 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillMain/Admin/layout.html.twig" %}
{% extends "ChillDocStoreBundle:Admin:layout.html.twig" %}
{% block title %}{{ 'Document category edit'|trans }}{% endblock title %}
{% block admin_content %}
<h1>{{ 'Document category edit'|trans }}</h1>
{{ include('ChillDocStoreBundle:DocumentCategory:_form.html.twig', {'button_label': 'Update'}) }}
{# DISABLED
{{ include('ChillDocStoreBundle:DocumentCategory:_form.html.twig', {'button_label': 'Update'}) }}
#}
<a href="{{ path('document_category_index') }}" class="sc-button">
{{ 'Back to the category list' | trans }}
</a>
{{ form_start(form) }}
{{ form_widget(form) }}
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('document_category_index') }}" class="sc-button bt-cancel">
{{ 'Back to the category list' | trans }}
</a>
</li>
<li>
<button class="sc-button bt-edit">{{ button_label|default('Edit')|trans }}</button>
</li>
</ul>
{{ form_end(form) }}
{{ include('ChillDocStoreBundle:DocumentCategory:_delete_form.html.twig') }}
{% endblock %}

View File

@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillMain/Admin/layout.html.twig" %}
{% extends "ChillDocStoreBundle:Admin:layout.html.twig" %}
{% block title %}{{ 'Document category list' | trans }}{% endblock title %}
@@ -40,12 +40,10 @@
<td>{{ document_category.name | localize_translatable_string}}</td>
<td>
<a href="{{ path('document_category_show', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}" class="sc-button">
{{ 'show' | trans }}
</a>
<a href="{{ path('document_category_edit', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}" class="sc-button bt-edit">
{{ 'edit' | trans }}
</a>
<a href="{{ path('document_category_show', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}"
class="sc-button bt-show" title="{{ 'show' | trans }}"></a>
<a href="{{ path('document_category_edit', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}"
class="sc-button bt-edit" title="{{ 'edit' | trans }}"></a>
</td>
</tr>
{% else %}
@@ -56,5 +54,9 @@
</tbody>
</table>
<a href="{{ path('document_category_new') }}" class="sc-button bt-create">{{ 'Create new' | trans }}</a>
<ul class="record_actions">
<li>
<a href="{{ path('document_category_new') }}" class="sc-button bt-create">{{ 'Create new category' | trans }}</a>
</li>
</ul>
{% endblock %}

View File

@@ -14,16 +14,29 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillMain/Admin/layout.html.twig" %}
{% extends "ChillDocStoreBundle:Admin:layout.html.twig" %}
{% block title %}{{ 'Create new document category' | trans }}{% endblock title %}
{% block admin_content %}
<h1>{{ 'Create new DocumentCategory' | trans }}</h1>
{{ include('ChillDocStoreBundle:DocumentCategory:_form.html.twig') }}
{# DISABLED
{{ include('ChillDocStoreBundle:DocumentCategory:_form.html.twig') }}
#}
{{ form_start(form) }}
{{ form_widget(form) }}
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('document_category_index') }}" class="sc-button bt-cancel">
{{ 'Back to the category list' | trans }}
</a>
</li>
<li>
<button class="sc-button bt-new">{{ button_label|default('New')|trans }}</button>
</li>
</ul>
{{ form_end(form) }}
<a href="{{ path('document_category_index') }}" class="sc-button">
{{ 'Back to the category list' | trans }}
</a>
{% endblock %}

View File

@@ -14,12 +14,12 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "@ChillMain/Admin/layout.html.twig" %}
{% extends "ChillDocStoreBundle:Admin:layout.html.twig" %}
{% block title %}{{ 'Document category show'|trans }}{% endblock title %}
{% block admin_content %}
<h1>Document category</h1>
<h1>{{ 'Document category show'|trans }}</h1>
<table class="table">
<tbody>
@@ -42,13 +42,17 @@
</tbody>
</table>
<a href="{{ path('document_category_index') }}" class="sc-button">
{{ 'Back to the category list' | trans }}
</a>
<a href="{{ path('document_category_edit', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}" class="sc-button bt-edit">
{{ 'Edit' | trans }}
</a>
{{ include('ChillDocStoreBundle:DocumentCategory:_delete_form.html.twig') }}
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('document_category_index') }}"
class="sc-button bt-cancel">{{ 'Back to the category list' | trans }}</a>
</li>
<li>
<a href="{{ path('document_category_edit', {'bundleId': document_category.bundleId, 'idInsideBundle': document_category.idInsideBundle}) }}"
class="sc-button bt-edit">{{ 'Edit' | trans }}</a>
</li>
<li>
{{ include('ChillDocStoreBundle:DocumentCategory:_delete_form.html.twig') }}
</li>
</ul>
{% endblock %}