Skip to content

Commit

Permalink
[Admin] Ux btn
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Mar 16, 2022
1 parent 40569fb commit 4765c0b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/Resources/public/style.css

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions packages/core/src/templates/page/_footer.html.twig
Expand Up @@ -10,13 +10,3 @@
{% endblock %}
</div>
</footer>

{% block edit_button %}
{% if class_exists('\\Pushword\\Admin\\PushwordAdminBundle')
and class_exists('\\Pushword\\Svg\\PushwordSvgBundle')
and is_granted('IS_AUTHENTICATED_REMEMBERED') %}
<a href="{{ path('admin_app_page_edit', {id: page.id}) }}" class="hidden md:block fixed w-10 shadow-lg top-1/2 right-2 mx-3 text-gray-50 bg-gray-500 rounded-full z-10 hover:bg-gray-800 opacity-25">
{{ svg('edit', {class: 'w-10 p-2 fill-current'}) }}
</a>
{% endif %}
{% endblock %}
17 changes: 17 additions & 0 deletions packages/core/src/templates/page/page_default.html.twig
Expand Up @@ -82,9 +82,26 @@
{% block navbar %}
{% include view('/page/_navbar.html.twig') %}
{% endblock %}

{% block admin_buttons %}
{% if class_exists('\\Pushword\\Admin\\PushwordAdminBundle')
and class_exists('\\Pushword\\Svg\\PushwordSvgBundle')
and is_granted('IS_AUTHENTICATED_REMEMBERED') %}
<div class="hidden md:block fixed top-1/2 right-2 mx-1 w-10 z-10 bg-gray-500 rounded-lg opacity-50">
<a href="{{ path('admin_app_page_edit', {id: page.id}) }}" class="inline-block p-1 text-gray-50 rounded-t-lg hover:bg-gray-800">
{{ svg('edit', {class: 'w-full p-2 fill-current'}) }}
</a>
<a href="{{ path('admin_app_page_list') }}" class="inline-block p-1 text-gray-50 bg-gray-500 rounded-b-lg hover:bg-gray-800">
{{ svg('list', {class: 'w-full p-2 fill-current'}) }}
</a>
</div>
{% endif %}
{% endblock %}
</div>
{% endblock %}



{% block html_closer %}
</html>
{% endblock %}
Binary file modified packages/skeleton/var/app.db
Binary file not shown.

0 comments on commit 4765c0b

Please sign in to comment.