Skip to content

Commit

Permalink
Merge branch 'release/v1.0.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxes3 committed Feb 26, 2024
2 parents d53adbb + f71ec24 commit e13ceb0
Show file tree
Hide file tree
Showing 22 changed files with 287 additions and 130 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
mysql root password: root
- uses: actions/checkout@v2
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: prepare yarn
run: composer install -q --no-ansi --no-interaction --no-scripts --prefer-dist
- name: Yarn
run: cd tests/App && yarn install && yarn dev
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/simple-phpunit
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## v1.0.8
- More documentation and better styling of the documentation
- Added new dependency `symfony/stimulus-bundle@^2.0` and allowed `symfony/webpack-encore-bundle@^2.0`
- Refactored/Simplified profile in sidebar and dashboard
- Improved styling of menus
- Changed return type of `VoterAttributeTrait` from `?Page` to `null|string|Page`

## v1.0.6
- Removed dependency to `coduo/php-to-string`
- Added new bundle configuration `enable_turbo` (default `false`)
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
[![Latest Stable Version](https://poser.pugx.org/araise/crud-bundle/v/stable)](https://packagist.org/packages/araise/crud-bundle)

# Docs araise framework
# araise CRUD Bundle - Documentation

This bundle is part of the [araise.dev](https://araise.dev) framework.


## Documentation

[crud.docs.araise.dev](https://crud.docs.araise.dev/#/)

You might be interested in the documentation of other bundles in the araise framework:

- [araise Core Bundle](https://core.docs.araise.dev/)
- [araise Table Bundle](https://table.docs.araise.dev/)
- [araise Search Bundle](https://search.docs.araise.dev/)

## Screenshots
<img src="https://uploads.whatwedo.io/github/whatwedo/CrudBundle/crud-calendar.png" width="45%"></img> <img src="https://uploads.whatwedo.io/github/whatwedo/CrudBundle/crud-dashboard.png" width="45%"></img> <img src="https://uploads.whatwedo.io/github/whatwedo/CrudBundle/crud-popup-create.png" width="45%"></img> <img src="https://uploads.whatwedo.io/github/whatwedo/CrudBundle/crud-table-subtable.png" width="45%"></img>

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"symfony/twig-bundle": "^5.4|^6.0",
"symfony/process": "^5.4|^6.0",
"symfony/ux-turbo": "^2.0",
"symfony/webpack-encore-bundle": "^1.14",
"symfony/stimulus-bundle": "^2.0",
"symfony/webpack-encore-bundle": "^1.14|^2.0",
"araise/core-bundle": "^1.0",
"araise/table-bundle": "^1.0",
"araise/search-bundle": "^3.0",
Expand Down
6 changes: 4 additions & 2 deletions docs/cookbook/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ public function configureFilters(Table $table)
{
parent::configureFilters($table);
$table->getFilterExtension()
->addFilter('age', 'Age', new NumberFilterType(self::getQueryAlias() . '.age'));
// addFilter(acronym, label, FilterType)
->addFilterType('age', 'Age', NumberFilterType::class, [
FilterType::OPT_COLUMN => (self::getQueryAlias() . '.age')
]);
// addFilterType(acronym, label, FilterType, options)
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Docs araise framework</title>
<title>araise Framework - Documentation</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<link rel="icon" href="media/favicon-32x32.png" sizes="32x32">
<meta name="description" content="This bundle is part of the araise.dev framework.">
Expand Down Expand Up @@ -37,9 +37,9 @@
</style>
<script>
window.$docsify = {
name: 'Docs araise framework',
name: 'araise Framework - Documentation',
repo: 'araise-dev/CrudBundle',
logo: '/media/araise-neg.svg',
logo: '/media/araise-crud-neg.svg',
loadSidebar: true,
alias: {
'/.*/_sidebar.md': '/_sidebar.md'
Expand Down
66 changes: 66 additions & 0 deletions docs/media/araise-crud-neg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Form/Type/EntityAjaxType.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function finishView(FormView $view, FormInterface $form, array $options):
);
}
if ($url !== null) {
$view->vars['attr']['data-araise--core-bundle--select-url-value'] = $url;
$view->vars['attr']['data-araise--core-bundle--combobox-url-value'] = $url;
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/Resources/translations/messages.de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ araise_crud:
confirm_delete: Wirklich löschen?
yes: Ja
no: Nein
profile:
logout: Logout
edit_link: Profil bearbeiten

wwd:
araise_table_entity_filter:
Expand Down
3 changes: 3 additions & 0 deletions src/Resources/translations/messages.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ araise_crud:
confirm_delete: Are you sure you want to delete?
yes: Yes
no: No
profile:
logout: Logout
edit_link: Edit Profil

wwd:
araise_table_entity_filter:
Expand Down
22 changes: 13 additions & 9 deletions src/Resources/views/base.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% from "@araiseCrud/includes/sidebar/_profile.html.twig" import profile %}

<!doctype html>
<html class="h-full bg-neutral-100" lang="{{ app.request.locale }}">
<head>
Expand Down Expand Up @@ -87,6 +89,13 @@
</div>
{% endblock %}
{% endblock %}

{% block sidebar_profile %}
{{ profile({
name: username|default('Default')|capitalize,
logout_link: path('app_logout')
}) }}
{% endblock %}
</div>

<div class="flex-shrink-0 w-14"></div>
Expand All @@ -103,10 +112,7 @@
</div>
{{ block('sidebar_subnavigation') }}
{{ block('sidebar_service') }}

{% block sidebar_profile %}
{% include "@araiseCrud/includes/sidebar/_profile.html.twig" %}
{% endblock %}
{{ block('sidebar_profile') }}
</div>
</div>

Expand All @@ -117,8 +123,6 @@
>
<div class="whatwedo_crud-topbar_mobile bg-white px-4 flex md:hidden justify-between items-center">
{{ block('logo') }}

{{ block('sidebar_profile') }}
</div>

{% block topbar %}
Expand All @@ -139,17 +143,17 @@
{% endblock %}

{% block breadcrumbs %}
{% include "@araiseCrud/includes/topbar/_breadcrumbs.html.twig" %}
{% include '@araiseCrud/includes/topbar/_breadcrumbs.html.twig' %}
{% endblock %}

{% block actions %}
{% include "@araiseCrud/includes/topbar/_actions.html.twig" %}
{% include '@araiseCrud/includes/topbar/_actions.html.twig' %}
{% endblock %}
</nav>
{% endblock %}

{% block messages %}
{% include "@araiseCrud/includes/main/_messages.html.twig" %}
{% include '@araiseCrud/includes/main/_messages.html.twig' %}
{% endblock %}

<div class="whatwedo_crud-maincontent m-4 grow">
Expand Down
13 changes: 7 additions & 6 deletions src/Resources/views/dashboard.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@
{% endfor %}
</div>

<div class="m-4 md:m-8 p-4 bg-white drop-shadow-sm">
<p class="whatwedo-utility-paragraph mb-0">
{% block dashboard_paragraph %}
{% endblock %}
</p>
</div>
{% if block('dashboard_paragraph') is not empty %}
<div class="m-4 md:m-8 p-4 bg-white drop-shadow-sm">
<p class="whatwedo-utility-paragraph mb-0">
{% block dashboard_paragraph %}{% endblock %}
</p>
</div>
{% endif %}

</div>
{% endblock %}
16 changes: 6 additions & 10 deletions src/Resources/views/dashboard/cards.html.twig
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
<div class="flex flex-col bg-neutral-300 p-8 pb-20 lg:pb-12 drop-shadow">
{% if card.icon is defined %}
<div class="flex justify-between">
<div class="flex flex-col bg-neutral-300 drop-shadow">
<div class="flex justify-between p-8">
<div>
{% endif %}

<h4 class="text-base font-normal mb-2">{{ card.title }}</h4>
<p class="text-3xl font-semibold text-neutral-800">{{ card.value }}</p>
{% if card.meta is defined %}
<span class="text-sm font-medium text-neutral-500 mt-1">{{ card.meta }}</span>
{% endif %}

{% if card.icon is defined %}
</div>
{{ bootstrap_icon(card.icon, {
{% if card.icon is defined %}
{{ bootstrap_icon(card.icon, {
width: '1.2rem',
height: '1.2rem',
}) }}
{% endif %}
</div>
{% endif %}

{% if card.link is defined %}
<a href="{{ path(card.link) }}" class="absolute inset-x-0 bottom-0 px-8 py-4 bg-neutral-100/60 hover:bg-neutral-100/80 transition-colors">
<a href="{{ path(card.link, card.link_parameter|default([])) }}" class="px-8 py-4 bg-neutral-100/60 hover:bg-neutral-100/80 transition-colors">
<span class="font-semibold text-base text-black">{{ 'wwd.dashboard.to_overview'|trans }}</span>
</a>
{% endif %}
Expand Down
10 changes: 7 additions & 3 deletions src/Resources/views/extensions/knp_menu_main.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,20 @@
{% import _self as knp_menu %}

{# classes for link/button item #}
{% set classes = 'bg-white text-neutral-900 hover:bg-neutral-100 active:bg-neutral-200 group w-full flex items-center px-3 py-2.5 text-base font-semibold transition-colors' %}
{% set classes = 'bg-white text-neutral-900 hover:bg-neutral-100 active:bg-neutral-200 group w-full flex items-center px-3 py-2.5 text-base transition-colors' %}

{% if matcher.isCurrent(item) %}
{% set classes = classes|replace({'bg-white': 'bg-neutral-200'}) %}
{% if matcher.isAncestor(item, options.matchingDepth) %}
{% set classes = classes|replace({'bg-white': 'bg-neutral-300 hover:bg-neutral-200'}) %}
{% endif %}

{% if matcher.isCurrent(item) %}
{% set classes = classes|replace({'bg-white': 'bg-neutral-200'}) %}
{% endif %}

{% if matcher.isCurrent(item) or matcher.isAncestor(item, options.matchingDepth) or item.level == '1' %}
{% set classes = classes ~ ' font-semibold' %}
{% endif %}

{% set attributes = item.attributes|merge({
class: (item.attributes.class|default('') ~ ' ' ~ classes)|trim,
}) %}
Expand Down
Loading

0 comments on commit e13ceb0

Please sign in to comment.