Skip to content

Commit

Permalink
Added new button templates and updated collection
Browse files Browse the repository at this point in the history
delete block
  • Loading branch information
koromerzhin committed Nov 10, 2023
1 parent ab1f630 commit 12ed962
Show file tree
Hide file tree
Showing 61 changed files with 630 additions and 602 deletions.
56 changes: 28 additions & 28 deletions apps/templates/admin/attachment/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
{% extends 'admin.html.twig' %}
{% block body %}
{% embed "admin/table.html.twig" %}
{% embed "admin/table.html.twig" with {
theads: [
{
'field': 'a.name',
'name': 'attachment.name'|trans({}, 'admin.messages')
},
{
'field': 'a.mimeType',
'name': 'attachment.mimetype'|trans({}, 'admin.messages')
},
{
'field': 'a.size',
'name': 'attachment.size'|trans({}, 'admin.messages')
},
{
'name': 'attachment.download'|trans({}, 'admin.messages')
},
{
'field': 'a.state',
'name': 'attachment.state'|trans({}, 'admin.messages')
},
{
'name': 'attachment.workflow'|trans({}, 'admin.messages')
}
],
pagination: pagination,
action: true
} %}
{% import "admin/macro.html.twig" as macro_admin %}
{% block thead %}
{% set theads = [
{
'field': 'a.name',
'name': 'attachment.name'|trans({}, 'admin.messages')
},
{
'field': 'a.mimeType',
'name': 'attachment.mimetype'|trans({}, 'admin.messages')
},
{
'field': 'a.size',
'name': 'attachment.size'|trans({}, 'admin.messages')
},
{
'name': 'attachment.download'|trans({}, 'admin.messages')
},
{
'field': 'a.state',
'name': 'attachment.state'|trans({}, 'admin.messages')
},
{
'name': 'attachment.workflow'|trans({}, 'admin.messages')
}
] %}
{{ macro_admin.thead(theads, pagination, true) }}
{% endblock %}
{% block tbody %}
{% for entity in pagination %}
<tr data-id="{{ entity.id }}">
Expand Down
36 changes: 13 additions & 23 deletions apps/templates/admin/block/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
{% extends 'admin.html.twig' %}
{% block body %}
{% embed "admin/table.html.twig" %}
{% embed "admin/table.html.twig" with {
theads: [
{
'field': 'a.title',
'name': 'block.title'|trans({}, 'admin.messages')
},
{
'field': 'a.type',
'name': 'block.type'|trans({}, 'admin.messages')
}
],
action: true
} %}
{% import "admin/macro.html.twig" as macro_admin %}
{% block thead %}
{% set theads = [
{
'field': 'a.title',
'name': 'block.title'|trans({}, 'admin.messages')
},
{
'field': 'a.type',
'name': 'block.type'|trans({}, 'admin.messages')
}
] %}
<tr>
{% for thead in theads %}
<th>
{% if thead.name is defined %}
{{ thead.name }}
{% endif %}
</th>
{% endfor %}
<th></th>
<tr>
{% endblock %}
{% block tbody %}
{% for type, row in data %}
<tr>
Expand Down
46 changes: 23 additions & 23 deletions apps/templates/admin/bookmark/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{% extends 'admin.html.twig' %}
{% block body %}
{% embed "admin/table.html.twig" %}
{% embed "admin/table.html.twig" with {
theads: [
{
'field': 'a.name',
'name': 'bookmark.name'|trans({}, 'admin.messages')
},
{
'name': 'bookmark.user'|trans({}, 'admin.messages')
},
{
'name': 'bookmark.category'|trans({}, 'admin.messages')
},
{
'field': 'a.state',
'name': 'workflow.state'|trans({}, 'admin.messages')
},
{
'name': 'bookmark.workflow'|trans({}, 'admin.messages')
}
],
pagination: pagination,
action: true
} %}
{% import "admin/macro.html.twig" as macro_admin %}
{% block thead %}
{% set theads = [
{
'field': 'a.name',
'name': 'bookmark.name'|trans({}, 'admin.messages')
},
{
'name': 'bookmark.user'|trans({}, 'admin.messages')
},
{
'name': 'bookmark.category'|trans({}, 'admin.messages')
},
{
'field': 'a.state',
'name': 'workflow.state'|trans({}, 'admin.messages')
},
{
'name': 'bookmark.workflow'|trans({}, 'admin.messages')
}
] %}
{{ macro_admin.thead(theads, pagination, true) }}
{% endblock %}
{% block tbody %}
{% for entity in pagination %}
<tr data-id="{{ entity.id }}">
Expand Down
25 changes: 12 additions & 13 deletions apps/templates/admin/category/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@

{% extends 'admin.html.twig' %}
{% block body %}
{% embed "admin/table.html.twig" %}
{% import "admin/macro.html.twig" as macro_admin %}
{% embed "admin/table.html.twig" with {
theads: [
{
'name': 'post.category.name'|trans({}, 'admin.messages')
},
{
'name': 'post.category.slug'|trans({}, 'admin.messages')
}
],
pagination: pagination,
action: true
} %}
{% import "admin/category/macro.html.twig" as macro_post %}
{% block thead %}
{% set theads = [
{
'name': 'post.category.name'|trans({}, 'admin.messages')
},
{
'name': 'post.category.slug'|trans({}, 'admin.messages')
}
] %}
{{ macro_admin.thead(theads, pagination, true) }}
{% endblock %}
{% block tbody %}
{{ macro_post.show(pagination, 0, actions) }}
{% endblock %}
Expand Down
54 changes: 27 additions & 27 deletions apps/templates/admin/edito/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{% extends 'admin.html.twig' %}
{% block body %}
{% embed "admin/table.html.twig" %}
{% embed "admin/table.html.twig" with {
theads: [
{
'field': 'a.title',
'name': 'edito.title'|trans({}, 'admin.messages')
},
{
'name': 'edito.user'|trans({}, 'admin.messages')
},
{
'name': 'edito.paragraphs'|trans({}, 'admin.messages')
},
{
'field': 'a.published',
'name': 'edito.published'|trans({}, 'admin.messages')
},
{
'field': 'a.state',
'name': 'edito.state'|trans({}, 'admin.messages')
},
{
'name': 'edito.workflow'|trans({}, 'admin.messages')
}
],
pagination: pagination,
action: true
} %}
{% import "admin/macro.html.twig" as macro_admin %}
{% block thead %}
{% set theads = [
{
'field': 'a.title',
'name': 'edito.title'|trans({}, 'admin.messages')
},
{
'name': 'edito.user'|trans({}, 'admin.messages')
},
{
'name': 'edito.paragraphs'|trans({}, 'admin.messages')
},
{
'field': 'a.published',
'name': 'edito.published'|trans({}, 'admin.messages')
},
{
'field': 'a.state',
'name': 'edito.state'|trans({}, 'admin.messages')
},
{
'name': 'edito.workflow'|trans({}, 'admin.messages')
}
] %}
{{ macro_admin.thead(theads, pagination, true) }}
{% endblock %}
{% block tbody %}
{% for entity in pagination %}
<tr data-id="{{ entity.id }}">
Expand Down
84 changes: 42 additions & 42 deletions apps/templates/admin/geocode/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
{% extends 'admin.html.twig' %}
{% block body %}
{% embed "admin/table.html.twig" %}
{% embed "admin/table.html.twig" with {
theads: [
{
'field': 'a.countryCode',
'name': 'geocode.countrycode'|trans({}, 'admin.messages')
},
{
'field': 'a.postalCode',
'name': 'geocode.postalcode'|trans({}, 'admin.messages')
},
{
'field': 'a.placeName',
'name': 'geocode.placename'|trans({}, 'admin.messages')
},
{
'field': 'a.stateName',
'name': 'geocode.statename'|trans({}, 'admin.messages')
},
{
'field': 'a.provinceName',
'name': 'geocode.provincename'|trans({}, 'admin.messages')
},
{
'field': 'a.communityName',
'name': 'geocode.communityname'|trans({}, 'admin.messages')
},
{
'field': 'a.latitude',
'name': 'geocode.latitude'|trans({}, 'admin.messages')
},
{
'field': 'a.longitude',
'name': 'geocode.longitude'|trans({}, 'admin.messages')
},
{
'field': 'a.accuracy',
'name': 'geocode.accuracy'|trans({}, 'admin.messages')
},
],
pagination: pagination,
action: true
} %}
{% import "admin/macro.html.twig" as macro_admin %}
{% block thead %}
{% set theads = [
{
'field': 'a.countryCode',
'name': 'geocode.countrycode'|trans({}, 'admin.messages')
},
{
'field': 'a.postalCode',
'name': 'geocode.postalcode'|trans({}, 'admin.messages')
},
{
'field': 'a.placeName',
'name': 'geocode.placename'|trans({}, 'admin.messages')
},
{
'field': 'a.stateName',
'name': 'geocode.statename'|trans({}, 'admin.messages')
},
{
'field': 'a.provinceName',
'name': 'geocode.provincename'|trans({}, 'admin.messages')
},
{
'field': 'a.communityName',
'name': 'geocode.communityname'|trans({}, 'admin.messages')
},
{
'field': 'a.latitude',
'name': 'geocode.latitude'|trans({}, 'admin.messages')
},
{
'field': 'a.longitude',
'name': 'geocode.longitude'|trans({}, 'admin.messages')
},
{
'field': 'a.accuracy',
'name': 'geocode.accuracy'|trans({}, 'admin.messages')
},
] %}
{{ macro_admin.thead(theads, pagination, true) }}
{% endblock %}
{% block tbody %}
{% for entity in pagination %}
<tr data-id="{{ entity.id }}">
Expand Down
Loading

0 comments on commit 12ed962

Please sign in to comment.