This commit is contained in:
2025-07-06 21:36:09 +02:00
parent 77160b1905
commit b1df69696f
13 changed files with 955 additions and 51 deletions

View File

@ -14,6 +14,8 @@
"doctrine/orm": "^3.3",
"friendsofsymfony/rest-bundle": "^3.8",
"guzzlehttp/guzzle": "^7.9",
"league/commonmark": "^2.7",
"netcarver/textile": "^4.1",
"oneup/uploader-bundle": "^5.0",
"phpdocumentor/reflection-docblock": "^5.4",
"phpstan/phpdoc-parser": "^1.33",
@ -46,7 +48,8 @@
"symfony/validator": "7.1.*",
"symfony/web-link": "7.1.*",
"symfony/yaml": "7.1.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/extra-bundle": "^3.21",
"twig/markdown-extra": "^3.21",
"twig/twig": "^2.12|^3.0"
},
"config": {

545
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "4e3288f402ef7fdd6634a7695bbba17e",
"content-hash": "02db7717ce6acd724d39ff2a85d6986b",
"packages": [
{
"name": "apereo/phpcas",
@ -137,6 +137,81 @@
],
"time": "2025-03-29T13:50:30+00:00"
},
{
"name": "dflydev/dot-access-data",
"version": "v3.0.3",
"source": {
"type": "git",
"url": "https://github.com/dflydev/dflydev-dot-access-data.git",
"reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f",
"reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^0.12.42",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.3",
"scrutinizer/ocular": "1.6.0",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Dflydev\\DotAccessData\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Dragonfly Development Inc.",
"email": "info@dflydev.com",
"homepage": "http://dflydev.com"
},
{
"name": "Beau Simensen",
"email": "beau@dflydev.com",
"homepage": "http://beausimensen.com"
},
{
"name": "Carlos Frutos",
"email": "carlos@kiwing.it",
"homepage": "https://github.com/cfrutos"
},
{
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "https://www.colinodell.com"
}
],
"description": "Given a deep data structure, access data by dot notation.",
"homepage": "https://github.com/dflydev/dflydev-dot-access-data",
"keywords": [
"access",
"data",
"dot",
"notation"
],
"support": {
"issues": "https://github.com/dflydev/dflydev-dot-access-data/issues",
"source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3"
},
"time": "2024-07-08T12:26:09+00:00"
},
{
"name": "doctrine/cache",
"version": "2.2.0",
@ -1852,6 +1927,195 @@
],
"time": "2025-03-27T12:30:47+00:00"
},
{
"name": "league/commonmark",
"version": "2.7.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6fbb36d44824ed4091adbcf4c7d4a3923cdb3405",
"reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"league/config": "^1.1.1",
"php": "^7.4 || ^8.0",
"psr/event-dispatcher": "^1.0",
"symfony/deprecation-contracts": "^2.1 || ^3.0",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"cebe/markdown": "^1.0",
"commonmark/cmark": "0.31.1",
"commonmark/commonmark.js": "0.31.1",
"composer/package-versions-deprecated": "^1.8",
"embed/embed": "^4.4",
"erusev/parsedown": "^1.0",
"ext-json": "*",
"github/gfm": "0.29.0",
"michelf/php-markdown": "^1.4 || ^2.0",
"nyholm/psr7": "^1.5",
"phpstan/phpstan": "^1.8.2",
"phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0",
"scrutinizer/ocular": "^1.8.1",
"symfony/finder": "^5.3 | ^6.0 | ^7.0",
"symfony/process": "^5.4 | ^6.0 | ^7.0",
"symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0",
"unleashedtech/php-coding-standard": "^3.1.1",
"vimeo/psalm": "^4.24.0 || ^5.0.0"
},
"suggest": {
"symfony/yaml": "v2.3+ required if using the Front Matter extension"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"League\\CommonMark\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "https://www.colinodell.com",
"role": "Lead Developer"
}
],
"description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)",
"homepage": "https://commonmark.thephpleague.com",
"keywords": [
"commonmark",
"flavored",
"gfm",
"github",
"github-flavored",
"markdown",
"md",
"parser"
],
"support": {
"docs": "https://commonmark.thephpleague.com/",
"forum": "https://github.com/thephpleague/commonmark/discussions",
"issues": "https://github.com/thephpleague/commonmark/issues",
"rss": "https://github.com/thephpleague/commonmark/releases.atom",
"source": "https://github.com/thephpleague/commonmark"
},
"funding": [
{
"url": "https://www.colinodell.com/sponsor",
"type": "custom"
},
{
"url": "https://www.paypal.me/colinpodell/10.00",
"type": "custom"
},
{
"url": "https://github.com/colinodell",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/league/commonmark",
"type": "tidelift"
}
],
"time": "2025-05-05T12:20:28+00:00"
},
{
"name": "league/config",
"version": "v1.2.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/config.git",
"reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3",
"reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3",
"shasum": ""
},
"require": {
"dflydev/dot-access-data": "^3.0.1",
"nette/schema": "^1.2",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.8.2",
"phpunit/phpunit": "^9.5.5",
"scrutinizer/ocular": "^1.8.1",
"unleashedtech/php-coding-standard": "^3.1",
"vimeo/psalm": "^4.7.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.2-dev"
}
},
"autoload": {
"psr-4": {
"League\\Config\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Colin O'Dell",
"email": "colinodell@gmail.com",
"homepage": "https://www.colinodell.com",
"role": "Lead Developer"
}
],
"description": "Define configuration arrays with strict schemas and access values with dot notation",
"homepage": "https://config.thephpleague.com",
"keywords": [
"array",
"config",
"configuration",
"dot",
"dot-access",
"nested",
"schema"
],
"support": {
"docs": "https://config.thephpleague.com/",
"issues": "https://github.com/thephpleague/config/issues",
"rss": "https://github.com/thephpleague/config/releases.atom",
"source": "https://github.com/thephpleague/config"
},
"funding": [
{
"url": "https://www.colinodell.com/sponsor",
"type": "custom"
},
{
"url": "https://www.paypal.me/colinpodell/10.00",
"type": "custom"
},
{
"url": "https://github.com/colinodell",
"type": "github"
}
],
"time": "2022-12-11T20:36:23+00:00"
},
{
"name": "monolog/monolog",
"version": "3.9.0",
@ -1955,6 +2219,213 @@
],
"time": "2025-03-24T10:02:05+00:00"
},
{
"name": "netcarver/textile",
"version": "v4.1.3",
"source": {
"type": "git",
"url": "https://github.com/textile/php-textile.git",
"reference": "a16ccd9e7c5ab758cf66fca5ab2b39eaae1b616c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/textile/php-textile/zipball/a16ccd9e7c5ab758cf66fca5ab2b39eaae1b616c",
"reference": "a16ccd9e7c5ab758cf66fca5ab2b39eaae1b616c",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpstan/phpstan": "1.12.11",
"phpunit/phpunit": "^9.5.20",
"psy/psysh": "^0.12.4",
"squizlabs/php_codesniffer": "3.*",
"symfony/yaml": "^5.4.40"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"Netcarver\\Textile\\": "src/Netcarver/Textile/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Textile markup language parser",
"homepage": "https://github.com/textile/php-textile",
"keywords": [
"document",
"format",
"html",
"language",
"markup",
"parser",
"php-textile",
"plaintext",
"textile"
],
"support": {
"issues": "https://github.com/textile/php-textile/issues",
"source": "https://github.com/textile/php-textile",
"wiki": "https://github.com/textile/php-textile/wiki"
},
"time": "2025-01-07T14:11:32+00:00"
},
{
"name": "nette/schema",
"version": "v1.3.2",
"source": {
"type": "git",
"url": "https://github.com/nette/schema.git",
"reference": "da801d52f0354f70a638673c4a0f04e16529431d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/schema/zipball/da801d52f0354f70a638673c4a0f04e16529431d",
"reference": "da801d52f0354f70a638673c4a0f04e16529431d",
"shasum": ""
},
"require": {
"nette/utils": "^4.0",
"php": "8.1 - 8.4"
},
"require-dev": {
"nette/tester": "^2.5.2",
"phpstan/phpstan-nette": "^1.0",
"tracy/tracy": "^2.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0-only",
"GPL-3.0-only"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "📐 Nette Schema: validating data structures against a given Schema.",
"homepage": "https://nette.org",
"keywords": [
"config",
"nette"
],
"support": {
"issues": "https://github.com/nette/schema/issues",
"source": "https://github.com/nette/schema/tree/v1.3.2"
},
"time": "2024-10-06T23:10:23+00:00"
},
{
"name": "nette/utils",
"version": "v4.0.7",
"source": {
"type": "git",
"url": "https://github.com/nette/utils.git",
"reference": "e67c4061eb40b9c113b218214e42cb5a0dda28f2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/e67c4061eb40b9c113b218214e42cb5a0dda28f2",
"reference": "e67c4061eb40b9c113b218214e42cb5a0dda28f2",
"shasum": ""
},
"require": {
"php": "8.0 - 8.4"
},
"conflict": {
"nette/finder": "<3",
"nette/schema": "<1.2.2"
},
"require-dev": {
"jetbrains/phpstorm-attributes": "dev-master",
"nette/tester": "^2.5",
"phpstan/phpstan": "^1.0",
"tracy/tracy": "^2.9"
},
"suggest": {
"ext-gd": "to use Image",
"ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
"ext-json": "to use Nette\\Utils\\Json",
"ext-mbstring": "to use Strings::lower() etc...",
"ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0-only",
"GPL-3.0-only"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
"homepage": "https://nette.org",
"keywords": [
"array",
"core",
"datetime",
"images",
"json",
"nette",
"paginator",
"password",
"slugify",
"string",
"unicode",
"utf-8",
"utility",
"validation"
],
"support": {
"issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v4.0.7"
},
"time": "2025-06-03T04:55:08+00:00"
},
{
"name": "oneup/uploader-bundle",
"version": "5.0.1",
@ -8350,6 +8821,78 @@
],
"time": "2025-02-19T14:29:33+00:00"
},
{
"name": "twig/markdown-extra",
"version": "v3.21.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/markdown-extra.git",
"reference": "f4616e1dd375209dacf6026f846e6b537d036ce4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/markdown-extra/zipball/f4616e1dd375209dacf6026f846e6b537d036ce4",
"reference": "f4616e1dd375209dacf6026f846e6b537d036ce4",
"shasum": ""
},
"require": {
"php": ">=8.1.0",
"symfony/deprecation-contracts": "^2.5|^3",
"twig/twig": "^3.13|^4.0"
},
"require-dev": {
"erusev/parsedown": "dev-master as 1.x-dev",
"league/commonmark": "^1.0|^2.0",
"league/html-to-markdown": "^4.8|^5.0",
"michelf/php-markdown": "^1.8|^2.0",
"symfony/phpunit-bridge": "^6.4|^7.0"
},
"type": "library",
"autoload": {
"files": [
"Resources/functions.php"
],
"psr-4": {
"Twig\\Extra\\Markdown\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
}
],
"description": "A Twig extension for Markdown",
"homepage": "https://twig.symfony.com",
"keywords": [
"html",
"markdown",
"twig"
],
"support": {
"source": "https://github.com/twigphp/markdown-extra/tree/v3.21.0"
},
"funding": [
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/twig/twig",
"type": "tidelift"
}
],
"time": "2025-01-31T20:45:36+00:00"
},
{
"name": "twig/twig",
"version": "v3.21.1",

View File

@ -3,7 +3,7 @@ twig:
form_themes: ['bootstrap_5_layout.html.twig']
globals:
appName: "%appName%"
redmineUrl: "%redmineUrl%"
when@test:
twig:
strict_variables: true

View File

@ -31,3 +31,4 @@ services:
App\Security\DynamicAuthenticator:
arguments:
$modeAuth: '%env(MODE_AUTH)%'

View File

@ -2,6 +2,7 @@
namespace App\Controller;
use App\Repository\IssueRepository;
use App\Service\RedmineService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
@ -49,4 +50,14 @@ class HomeController extends AbstractController
'usesidebar' => false,
]);
}
#[Route('/user/issue/{id}', name: 'issue_view')]
public function view(int $id, IssueRepository $issueRepository): Response
{
$issue = $issueRepository->find($id);
return $this->render('issue/view.html.twig', [
'issue' => $issue,
]);
}
}

View File

@ -72,13 +72,18 @@ class ProjectController extends AbstractController
return $this->redirectToRoute('app_admin_project');
}
$form = $this->createForm(ProjectType::class, $project, ['mode' => 'update', 'redmineprojects' => $this->redmineService->getProjects($this->getParameter('redmineApikey'))]);
$redmine = $this->redmineService->getProject($project->getId(), $this->getParameter('redmineApikey'));
$project->setRedmine($redmine);
$em->persist($project);
$em->flush();
$form = $this->createForm(ProjectType::class, $project, ['mode' => 'update', 'redmineprojects' => $this->redmineService->getProjects($this->getParameter('redmineApikey')), 'redmine' => $redmine]);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$redmine = $this->redmineService->getProject($project->getId(), $this->getParameter('redmineApikey'));
$project->setRedmine($redmine);
$em->flush();
$this->redmineService->majProjectIssues($project, $this->getParameter('redmineApikey'), true);
$this->redmineService->majProjectIssues($project, $this->getParameter('redmineApikey'), false);
return $this->redirectToRoute('app_admin_project');
}
@ -91,6 +96,7 @@ class ProjectController extends AbstractController
'routedelete' => 'app_admin_project_delete',
'mode' => 'update',
'form' => $form,
'project' => $project,
]);
}

View File

@ -27,6 +27,15 @@ class Project
#[ORM\Column(nullable: false)]
private array $redmine;
#[ORM\Column(nullable: true)]
private ?array $hiddenstatuses = null;
#[ORM\Column(nullable: true)]
private ?array $hiddensprints = null;
#[ORM\Column(nullable: true)]
private ?array $hiddenversions = null;
/**
* @var Collection<int, User>
*/
@ -112,6 +121,42 @@ class Project
return $this;
}
public function getHiddenstatuses(): ?array
{
return $this->hiddenstatuses;
}
public function setHiddenstatuses(array $hiddenstatuses): static
{
$this->hiddenstatuses = $hiddenstatuses;
return $this;
}
public function getHiddensprints(): ?array
{
return $this->hiddensprints;
}
public function setHiddensprints(array $hiddensprints): static
{
$this->hiddensprints = $hiddensprints;
return $this;
}
public function getHiddenversions(): ?array
{
return $this->hiddenversions;
}
public function setHiddenversions(array $hiddenversions): static
{
$this->hiddenversions = $hiddenversions;
return $this;
}
/**
* @return Collection<int, User>
*/

View File

@ -21,11 +21,13 @@ class ProjectType extends AbstractType
foreach ($options['redmineprojects'] as $redmine) {
$redmines[$redmine['name']] = $redmine['id'];
}
$builder
->add('id', ChoiceType::class, [
'label' => 'Projet Redmine',
'choices' => $redmines,
'placeholder' => 'Sélectionnez un projet',
'disabled' => ('update' == $options['mode']),
])
->add('submit', SubmitType::class, [
@ -48,6 +50,50 @@ class ProjectType extends AbstractType
'required' => false,
'by_reference' => false,
]);
if ('update' == $options['mode']) {
$redmines = [];
foreach ($options['redmine']['issue_statuses'] as $redmine) {
$redmines[$redmine['name']] = $redmine['id'];
}
$builder
->add('hiddenstatuses', ChoiceType::class, [
'label' => 'Statuts Cachés',
'choices' => $redmines,
'placeholder' => 'Sélectionnez un statut',
'multiple' => true,
'attr' => ['class' => 'select2'],
]);
$redmines = [];
foreach ($options['redmine']['sprints'] as $redmine) {
$redmines[$redmine['name']] = $redmine['id'];
}
$builder
->add('hiddensprints', ChoiceType::class, [
'label' => 'Sprints Cachés',
'choices' => $redmines,
'placeholder' => 'Sélectionnez un sprint',
'multiple' => true,
'attr' => ['class' => 'select2'],
]);
$redmines = [];
foreach ($options['redmine']['versions'] as $redmine) {
$redmines[$redmine['name']] = $redmine['id'];
}
$builder
->add('hiddenversions', ChoiceType::class, [
'label' => 'Versions Cachés',
'choices' => $redmines,
'placeholder' => 'Sélectionnez une version',
'multiple' => true,
'attr' => ['class' => 'select2'],
]);
}
}
public function configureOptions(OptionsResolver $resolver): void
@ -56,6 +102,7 @@ class ProjectType extends AbstractType
'data_class' => Project::class,
'mode' => 'submit',
'redmineprojects' => [],
'redmine' => [],
]);
}
}

View File

@ -0,0 +1,55 @@
<?php
namespace App\Twig;
use Netcarver\Textile\Parser;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
class TextileExtension extends AbstractExtension
{
public function getFilters(): array
{
return [
new TwigFilter('textile_to_html', [$this, 'textileToHtml'], ['is_safe' => ['html']]),
];
}
public function textileToHtml(string $text): string
{
$text = $this->fixTextileTable($text);
$parser = new Parser();
return $parser->parse($text);
}
private function fixTextileTable(string $text): string
{
$lines = explode("\n", $text);
$fixed = [];
foreach ($lines as $line) {
$line = trim($line);
if (!$line) {
$fixed[] = '';
continue;
}
if (preg_match('/^\|.*\|$/', $line)) {
$fixed[] = $line;
continue;
}
// Ligne mal formée potentiellement issue dun tableau
$columns = array_map('trim', explode('|', $line));
$columns = array_filter($columns);
if (count($columns)) {
$fixed[] = '|'.implode('|', $columns).'|';
} else {
$fixed[] = $line;
}
}
return implode("\n", $fixed);
}
}

View File

@ -1,4 +1,13 @@
{
"doctrine/deprecations": {
"version": "1.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.0",
"ref": "87424683adc81d7dc305eefec1fced883084aab9"
}
},
"doctrine/doctrine-bundle": {
"version": "2.13",
"recipe": {

View File

@ -2,27 +2,44 @@
{% block localstyle %}
<style>
.navbar {
width: 100%;
position: fixed;
z-index: 1000;
}
main {
padding-top:80px;
}
content {
padding:0px;
}
.containerScrum {
.scrumContainer {
display:none;
}
.containerFiltre{
.issueContainer {
position:fixed;
width:750px;
}
.filtreContainer{
display:flex;
width:250px;
width:300px;
flex-direction:column;
background-color: var(--bs-dark);
padding:5px;
}
.containerStatus{
display:flex;
width:10000px;
overflow-x:scrool;
//width:10000px;
overflow-x:scroll;
}
.colStatus {
.statusCard {
width:300px;
padding: 15px 10px 0px 10px;
}
@ -45,7 +62,7 @@
min-height:60px;
}
h5 {
.versionCard h5 {
color: var(--bs-primary-text-emphasis);
font-size:16px;
padding-left:10px;
@ -65,6 +82,15 @@
cursor: move;
}
.issueAction{
align-self: baseline;
padding: 0px 2px 0px 5px;
}
.fa-eye {
cursor: pointer;
}
.issueSubject{
zoom: 70%;
flex-grow: 1;
@ -74,13 +100,27 @@
{% block body %}
<div class='containerScrum'>
<div class='containerFiltre'>
<div class='issueContainer'>
</div>
<div class='scrumContainer'>
<div class='filtreContainer'>
<label>Statut</label>
<select id="statusFilter" class="select2 form-select" multiple="true" tabindex="-1" aria-hidden="true">
{% for statut in project.redmine.issue_statuses %}
{% if statut.id not in project.hiddenstatuses %}
<option value="{{statut.id}}">{{statut.name}}</option>
{% endif %}
{% endfor %}
</select>
<label>Sprints</label>
<select id="sprintFilter" class="select2 form-select" multiple="true" tabindex="-1" aria-hidden="true">
<option value="None">Aucun</option>
{% for sprint in project.redmine.sprints|reverse %}
<option value="{{sprint.id}}">{{sprint.name}}</option>
{% if sprint.id not in project.hiddensprints %}
<option value="{{sprint.id}}">{{sprint.name}}</option>
{% endif %}
{% endfor %}
</select>
@ -88,7 +128,9 @@
<select id="versionFilter" class="select2 form-select" multiple="true" tabindex="-1" aria-hidden="true">
<option value="None">Aucune</option>
{% for version in project.redmine.versions|reverse %}
<option value="{{version.id}}">{{version.name}}</option>
{% if version.id not in project.hiddenversions %}
<option value="{{version.id}}">{{version.name}}</option>
{% endif %}
{% endfor %}
</select>
@ -97,59 +139,67 @@
<div class='containerStatus'>
{% for status in project.redmine.issue_statuses %}
<div class='colStatus'>
<h2>{{ status.name }}</h2>
{% if status.id not in project.hiddenstatuses %}
<div class='statusCard statusCard{{status.id}}'>
<h2>{{ status.name }}</h2>
{% for sprint in project.redmine.sprints|reverse %}
<div class='sprintCard sprintCard{{sprint.id}} card' style='margin-bottom:20px'>
{% for sprint in project.redmine.sprints|reverse %}
{% if sprint.id not in project.hiddensprints %}
<div class='sprintCard sprintCard{{sprint.id}} card' style='margin-bottom:20px'>
<div class='card-header'>
Sprint = {{ sprint.name }}
</div>
{% for version in project.redmine.versions|reverse %}
{% if version.id not in project.hiddenversions %}
<div class='versionCard versionCard{{version.id}} card-body'>
<h5>Version = {{ version.name }}</h5>
<div class='versionBody' data-id='{{status.id}}-{{sprint.id}}-{{version.name}}'></div>
</div>
{% endif %}
{% endfor %}
<div class='versionCard versionCardNone card-body'>
<h5>Version = Aucune</h5>
<div class='versionBody' data-id='{{status.id}}-{{sprint.id}}-'></div>
</div>
</div>
{% endif %}
{% endfor %}
<div class='sprintCard sprintCardNone card'>
<div class='card-header'>
Sprint = {{ sprint.name }}
Sprint Aucun
</div>
{% for version in project.redmine.versions|reverse %}
{% for version in project.redmine.versions|reverse %}
{% if version.id not in project.hiddenversions %}
<div class='versionCard versionCard{{version.id}} card-body'>
<h5>Version = {{ version.name }}</h5>
<div class='versionBody' data-id='{{status.id}}-{{sprint.id}}-{{version.name}}'></div>
<div class='versionBody' data-id='{{status.id}}--{{version.name}}'></div>
</div>
{% endfor %}
{% endif %}
{% endfor %}
<div class='versionCard versionCardNone card-body'>
<h5>Version = Aucune</h5>
<div class='versionBody' data-id='{{status.id}}-{{sprint.id}}-'></div>
<div class='versionBody' data-id='{{status.id}}--'></div>
</div>
</div>
{% endfor %}
<div class='sprintCard sprintCardNone card'>
<div class='card-header'>
Sprint Aucun
</div>
{% for version in project.redmine.versions|reverse %}
<div class='versionCard versionCard{{version.id}} card-body'>
<h5>Version = {{ version.name }}</h5>
<div class='versionBody' data-id='{{status.id}}--{{version.name}}'></div>
</div>
{% endfor %}
<div class='versionCard versionCardNone card-body'>
<h5>Version = Aucune</h5>
<div class='versionBody' data-id='{{status.id}}--'></div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<div class='viewIssue'>
</div>
{% for issue in project.issues %}
<div class="issueCard card" data-status='{{issue.redmine.status.id}}' data-sprint='{{issue.rowsprint}}' data-version='{{issue.rowversion}}'>
<div class='issueHeader'>
<div class='issueId'>#{{issue.id}}</div>
<div class='issueSubject'>{{issue.redmine.subject}}</div>
<div class='issueAction'>
<i class='fas fa-eye' onClick='fetchAndRenderIssue({{issue.id}})'></i>
</div>
</div>
<div class='issueBody'>
sprint = {{issue.rowsprint}}<br>
@ -167,6 +217,18 @@
let showIssuebody = false;
function showhide() {
// Statut
selected = $('#statusFilter').val();
if (!selected || selected.length === 0) {
$('.statusCard').show();
}
else {
$('.statusCard').hide();
selected.forEach(function (id) {
$('.statusCard' + id).show();
});
}
// Sprint
selected = $('#sprintFilter').val();
if (!selected || selected.length === 0) {
@ -210,11 +272,15 @@
if ($column.length) {
$column.append($(this));
}
else { console.log ('no ='+id);}
else {
console.log ('no ='+id);
$(this).hide();
}
});
$('.containerScrum').css('display', 'flex');
$('.scrumContainer').css('display', 'flex');
// Filtre
$('#statusFilter').on('change',showhide);
$('#sprintFilter').on('change',showhide);
$('#versionFilter').on('change',showhide);
showhide();
@ -224,6 +290,28 @@
toogleIssueBody();
});
function fetchAndRenderIssue(issueId) {
url='{{path('issue_view',{id:'xxx'})}}';
url=url.replace('xxx',issueId);
console.log(url);
$.ajax({
url: url,
method: 'GET',
dataType: 'html',
success: function (html) {
$('.issueContainer').html(html);
$('.issueContainer').show();
$('.scrumContainer').css('padding-left','750px');
},
error: function (xhr, status, error) {
console.error('Erreur lors du chargement de lissue :', error);
$('.issueContainer').html('<div class="alert alert-danger">Erreur lors du chargement de lissue.</div>');
}
});
}
$(function () {
let $sourceContainer = null;
let $movedItem = null;

View File

@ -0,0 +1,76 @@
<div class="card mb-3">
<div class="card-header">
<div class="mb-0 d-flex" style="align-items:baseline">
<h5 style="flex-grow:1">#{{ issue.redmine.id }} {{ issue.redmine.subject }}</h5>
<a href="{{redmineUrl}}/issues/{{issue.id}}" target="_blank" class="btn btn-primary"><i class="fas fa-eye"></i></a>
<div class="btn btn-secondary" onClick="$('.issueContainer').hide();$('.scrumContainer').css('padding-left','0px');"><i class="fas fa-window-close"></i></div>
</div>
<small class="text-muted">Projet : {{ issue.redmine.project.name }} • Tracker : {{ issue.redmine.tracker.name }}</small>
</div>
<div class="card-body" style="height:500px;overflow-y:auto">
<div class="d-flex">
<div class="mb-3" style="flex-grow:0.5">
<strong>Statut :</strong> {{ issue.redmine.status.name }}<br>
<strong>Priorité :</strong> {{ issue.redmine.priority.name }}<br><br>
{% set sprintName = null %}
{% for sprint in issue.project.redmine.sprints %}
{% if sprint.id == issue.rowsprint %}
{% set sprintName = sprint.name %}
{% endif %}
{% endfor %}
{% if sprintName %}
<strong>Sprint :</strong> {{sprintName}} (Position {{ issue.redmine.sprint.position }})<br>
{% else %}
<strong>Sprint :</strong> Aucun (Position {{ issue.redmine.sprint.position }})<br>
{% endif %}
<strong>Story Point :</strong> {{issue.redmine.sprint.story_points}}<br>
</div>
<div>
<strong>Auteur :</strong> {{ issue.redmine.author.name }}<br>
<strong>Progression :</strong> {{ issue.redmine.done_ratio }}%<br>
<strong>Créé le :</strong>{{ issue.redmine.created_on|date('d/m/Y H:i') }}<br>
<strong>Mis à jour le :</strong>{{ issue.redmine.updated_on|date('d/m/Y H:i') }}<br>
<strong>Date de début :</strong> {{ issue.redmine.start_date|date('d/m/Y') }}<br>
<strong>Date de fin :</strong> {{ issue.redmine.due_date|date('d/m/Y') }}<br>
</div>
</div>
{% if issue.redmine.description %}
<div class="mb-3">
<hr>
<strong>Description :</strong>
<p>{{ issue.redmine.description|markdown_to_html|textile_to_html }}</p>
</div>
{% endif %}
{% if issue.redmine.custom_fields|length %}
<div class="mb-3">
<hr>
<strong>Champs personnalisés :</strong>
<ul class="list-group">
{% for field in issue.redmine.custom_fields %}
<li class="list-group-item d-flex justify-content-between align-items-center">
{{ field.name }}
<span class="text-muted">
{% if field.multiple is defined and field.multiple and field.value is iterable %}
{{ field.value|join(', ') }}
{% elseif field.value %}
{{ field.value }}
{% else %}
<em>—</em>
{% endif %}
</span>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{{dump(issue.redmine)}}
</div>
</div>

View File

@ -24,9 +24,19 @@
<div class="card mt-3">
<div class="card-header">Information</div>
<div class="card-body">
{{ form_row(form.id) }}
{{ form_row(form.title) }}
</div>
</div>
<div class="card mt-3">
<div class="card-header">Parametres</div>
<div class="card-body">
{{ form_row(form.hiddenstatuses) }}
{{ form_row(form.hiddensprints) }}
{{ form_row(form.hiddenversions) }}
</div>
</div>
</div>
<div class="col-md-6 mx-auto">
@ -36,7 +46,17 @@
{{ form_row(form.users) }}
</div>
</div>
{% if mode=="update" %}
<div class="card mt-3">
<div class="card-header">Détail Redmine</div>
<div class="card-body">
{{ dump(project.redmine) }}
</div>
</div>
{% endif %}
</div>
</div>
{{ form_end(form) }}