597 search results

// ... lines 1 - 94
{% block main %}
{% set _list_item_actions = easyadmin_get_actions_for_list_item(_entity_config.name) %}
<div class="table-responsive">
<table class="table">
// ... lines 100 - 129
<tbody>
{% block table_body %}
{% for item in paginator.currentPageResults %}
// ... line 133
<tr data-id="{{ _item_id }}">
// ... lines 135 - 143
{% if _list_item_actions|length > 0 %}
// ... line 145
<td data-label="{{ _column_label }}" class="actions">
{% block item_actions %}
{{ include('@EasyAdmin/default/includes/_actions.html.twig', {
actions: _list_item_actions,
request_parameters: _request_parameters,
translation_domain: _entity_config.translation_domain,
trans_parameters: _trans_parameters,
item_id: _item_id
}, with_context = false) }}
{% endblock item_actions %}
</td>
{% endif %}
</tr>
// ... lines 159 - 164
{% endfor %}
{% endblock table_body %}
</tbody>
</table>
</div>
// ... lines 170 - 189
{% endblock main %}
// ... lines 191 - 244
See Code Block in Script
{% if item.isScientist %}
<i class="fa fa-graduation-cap"></i>
{% endif %}
// ... lines 4 - 6
See Code Block in Script
{% if item.isScientist %}
<i class="fa fa-graduation-cap"></i>
{% endif %}
{{ value|default('Stranger') }}
See Code Block in Script
// ... lines 1 - 2
{% block item_actions %}
{% set _list_item_actions = _list_item_actions|filter_admin_actions(item) %}
// ... lines 5 - 6
{% endblock %}
See Code Block in Script
// ... lines 1 - 38
{% block content_header %}
{{ dump() }}
// ... lines 41 - 93
{% endblock content_header %}
// ... lines 95 - 245
See Code Block in Script
// ... lines 1 - 2
{% block item_actions %}
{% set _list_item_actions = _list_item_actions|filter_admin_actions(item) %}
{{ parent() }}
{% endblock %}
See Code Block in Script
EasyAdmin 4 requires PHP 8.0.2 or higher and Symfony 5.4 or higher. Why did you say that it only for Symfony 6?
Andrzej S.
Andrzej S.
Read Full Comment
14 lines | app/config/routing.yml
// ... lines 1 - 9
easy_admin_bundle:
resource: "@EasyAdminBundle/Controller/"
type: annotation
prefix: /easyadmin
See Code Block in Script
14 lines | app/config/routing.yml
// ... lines 1 - 9
easy_admin_bundle:
// ... lines 11 - 12
prefix: /easyadmin
See Code Block in Script
14 lines | app/config/routing.yml
// ... lines 1 - 9
easy_admin_bundle:
resource: "@EasyAdminBundle/Controller/"
type: annotation
prefix: /easyadmin
See Code Block in Script
14 lines | app/config/routing.yml
// ... lines 1 - 9
easy_admin_bundle:
resource: "@AppBundle/Controller/EasyAdmin/AdminController.php"
// ... lines 12 - 14
See Code Block in Script
158 lines | app/config/config.yml
// ... lines 1 - 80
easy_admin:
// ... lines 82 - 97
entities:
// ... lines 99 - 158
See Code Block in Script
159 lines | app/config/config.yml
// ... lines 1 - 80
easy_admin:
// ... lines 82 - 97
entities:
Genus:
// ... line 100
controller: AppBundle\Controller\EasyAdmin\GenusController
// ... lines 102 - 159
See Code Block in Script
14 lines | app/config/routing.yml
// ... lines 1 - 9
easy_admin_bundle:
// ... lines 11 - 12
prefix: /easyadmin
See Code Block in Script
170 lines | app/config/config.yml
// ... lines 1 - 80
easy_admin:
// ... lines 82 - 97
entities:
Genus:
// ... lines 100 - 130
form:
fields:
- { type: 'group', css_class: 'col-sm-6', label: 'Basic information' }
- name
- speciesCount
- { property: 'firstDiscoveredAt', type_options: { widget: 'single_text' }}
- { property: 'subFamily', type: 'easyadmin_autocomplete' }
- { type: 'section', label: 'Optional' }
// ... lines 139 - 170
See Code Block in Script
170 lines | app/config/config.yml
// ... lines 1 - 80
easy_admin:
// ... lines 82 - 97
entities:
Genus:
// ... lines 100 - 130
form:
fields:
- { type: 'group', css_class: 'col-sm-6', label: 'Basic information' }
- name
- speciesCount
- { property: 'firstDiscoveredAt', type_options: { widget: 'single_text' }}
- { property: 'subFamily', type: 'easyadmin_autocomplete' }
- { type: 'section', label: 'Optional' }
- { property: 'funFact', type: 'textarea', css_class: 'js-markdown-input' }
- isPublished
- { type: 'group', css_class: 'col-sm-6', label: 'Studied by ...' }
// ... lines 143 - 170
See Code Block in Script
170 lines | app/config/config.yml
// ... lines 1 - 80
easy_admin:
// ... lines 82 - 97
entities:
Genus:
// ... lines 100 - 130
form:
fields:
- { type: 'group', css_class: 'col-sm-6', label: 'Basic information' }
- name
- speciesCount
- { property: 'firstDiscoveredAt', type_options: { widget: 'single_text' }}
- { property: 'subFamily', type: 'easyadmin_autocomplete' }
- { type: 'section', label: 'Optional' }
- { property: 'funFact', type: 'textarea', css_class: 'js-markdown-input' }
- isPublished
- { type: 'group', css_class: 'col-sm-6', label: 'Studied by ...' }
-
property: 'genusScientists'
type: 'text'
type_options:
mapped: false
attr: { class: 'js-genus-scientists-field' }
-
type: 'group'
css_class: 'col-sm-6'
label: 'Identification'
icon: 'id-card-o'
help: 'For administrators'
-
property: id
type_options: {disabled: true}
-
property: 'slug'
help: 'unique auto-generated value'
type_options: { disabled: true }
// ... lines 163 - 170
See Code Block in Script
138 lines | app/config/config.yml
// ... lines 1 - 80
easy_admin:
// ... lines 82 - 91
entities:
Genus:
// ... lines 94 - 114
form:
fields:
// ... lines 117 - 124
- { property: 'subFamily', type: 'easyadmin_autocomplete' }
// ... lines 126 - 138
See Code Block in Script
128 lines | app/config/admin.yml
easy_admin:
site_name: 'Aqua<i>Note</i>'
design:
brand_color: '#81b9ba'
assets:
css: ['css/custom_backend.css']
js:
- 'https://unpkg.com/snarkdown@1.2.2/dist/snarkdown.umd.js'
- 'js/custom_backend.js'
templates:
field_id: 'admin/fields/_id.html.twig'
form_theme:
- horizontal
- easy_admin/_form_theme.html.twig
menu:
- { label: 'Dashboard', route: 'admin_dashboard', default: true }
- { label: 'Open front-end', route: 'app_genus_list' }
- { entity: 'User', label: 'Users', icon: 'user' }
-
label: 'Genus'
children:
-
entity: 'Genus'
label: 'Pet genus'
icon: 'paw'
params:
action: 'show'
id: 2
- Genus
-
entity: 'Genus'
label: 'Genuses (sorted by ID)'
params:
sortField: 'id'
sortDirection: 'ASC'
pizza: 'delicious'
- GenusHorde
- { label: 'Related' }
- { entity: 'GenusNote', label: 'Notes', icon: 'sticky-note' }
- { entity: 'SubFamily', label: 'Sub-Families', icon: '' }
-
label: 'Important stuff'
icon: 'exclamation'
children:
-
label: 'Silly kittens'
url: 'https://www.youtube.com/results?search_query=silly+kittens'
target: '_blank'
-
label: 'Wet cats'
url: 'http://www.boredpanda.com/funny-wet-cats/'
target: '_blank'
list:
title: 'List of %%entity_label%%'
actions: ['show', 'export']
entities:
Genus:
class: AppBundle\Entity\Genus
controller: AppBundle\Controller\EasyAdmin\GenusController
label: Genuses
help: Genuses are not covered under warranty!
list:
help: Do not feed!
actions:
- { name: 'edit', icon: 'pencil', label: 'Edit' }
- { name: 'show', icon: 'info-circle', label: '' }
fields:
- 'id'
- 'name'
- 'isPublished'
- { property: 'firstDiscoveredAt', format: 'M Y', label: 'Discovered' }
- 'funFact'
- { property: 'speciesCount', format: '%b' }
sort: 'name'
search:
help: null
fields: ['id', 'name']
show:
actions:
-
name: 'genus_feed'
type: 'route'
label: 'Feed genus'
css_class: 'btn btn-info'
icon: 'cutlery'
- { name: 'changePublishedStatus', css_class: 'btn' }
# templates:
# field_id: 'admin/fields/_id.html.twig'
form:
fields:
- { type: 'group', css_class: 'col-sm-6', label: 'Basic information' }
- name
- speciesCount
- { property: 'firstDiscoveredAt', type_options: { widget: 'single_text' }}
- { property: 'subFamily', type: 'easyadmin_autocomplete' }
- { type: 'section', label: 'Optional' }
- { property: 'funFact', type: 'textarea', css_class: 'js-markdown-input' }
- isPublished
- { type: 'group', css_class: 'col-sm-6', label: 'Studied by ...' }
-
property: 'genusScientists'
type: 'text'
type_options:
mapped: false
attr: { class: 'js-genus-scientists-field' }
-
type: 'group'
css_class: 'col-sm-6 new-row'
label: 'Identification'
icon: 'id-card-o'
help: 'For administrators'
-
property: id
type_options: {disabled: true}
-
property: 'slug'
help: 'unique auto-generated value'
type_options: { disabled: true }
new:
fields:
- '-id'
- '-slug'
GenusHorde:
class: AppBundle\Entity\Genus
label: HORDE of Genuses
See Code Block in Script
140 lines | app/config/config.yml
// ... lines 1 - 80
easy_admin:
// ... lines 82 - 89
entities:
// ... lines 91 - 110
GenusHorde:
class: AppBundle\Entity\Genus
label: HORDE of Genuses ? !!!
// ... lines 114 - 140
See Code Block in Script