Skip to content

Commit d54d9ed

Browse files
committed
Add initial component versions to credits page
1 parent e764646 commit d54d9ed

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

src/Controller/Dashboard/DashboardRootController.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use CodedMonkey\Dirigent\Doctrine\Entity\Registry;
99
use CodedMonkey\Dirigent\Doctrine\Entity\User;
1010
use CodedMonkey\Dirigent\Doctrine\Repository\PackageRepository;
11+
use CodedMonkey\Dirigent\Kernel;
12+
use Composer\Composer;
1113
use EasyCorp\Bundle\EasyAdminBundle\Config\Assets;
1214
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
1315
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
@@ -138,7 +140,11 @@ public function adminDocs(string $page = 'readme'): Response
138140
#[Route('/dashboard/credits', name: 'dashboard_credits')]
139141
public function credits(): Response
140142
{
141-
return $this->render('dashboard/credits.html.twig');
143+
return $this->render('dashboard/credits.html.twig', [
144+
'composerVersion' => Composer::VERSION,
145+
'dirigentVersion' => Kernel::VERSION,
146+
'phpVersion' => PHP_VERSION,
147+
]);
142148
}
143149

144150
private function parseDocumentationFile(string $directory, string $page): array

templates/dashboard/credits.html.twig

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,43 @@
33
{% block page_title %}Credits{% endblock %}
44

55
{% block page_content %}
6-
<h2 class="h5">Administrators</h2>
6+
<h3 class="h5">Administrators</h3>
77

8-
<h2 class="h5">Developer</h2>
8+
<h3 class="h5">Developer</h3>
99
<p>Dirigent was developed by <a href="https://www.codedmonkey.com">Coded Monkey</a>.</p>
1010
<div class="mb-3">
1111
<a href="https://www.codedmonkey.com" title="Coded Monkey">
1212
<img src="https://www.gravatar.com/avatar/c23d082464fd39da2bca3936abc9372e" alt="Coded Monkey" class="img-thumbnail">
1313
</a>
1414
</div>
15-
<h3 class="h6">Sponsors</h3>
15+
<h4 class="h6">Sponsors</h4>
1616
<p>
1717
Dirigent is looking for sponsors. <a href="https://www.codedmonkey.com/sponsor?project=dirigent">Click here</a>
1818
to sponsor development of Dirigent.
1919
</p>
20+
<h2 class="h4">Components</h2>
21+
<div class="row">
22+
<div class="col-md-5 col-lg-4">
23+
<div class="list-group">
24+
<div class="list-group-item">
25+
<div class="d-flex justify-content-between">
26+
<div><a href="https://dirigent.dev">Dirigent</a></div>
27+
<div>v{{ dirigentVersion }}</div>
28+
</div>
29+
</div>
30+
<div class="list-group-item">
31+
<div class="d-flex justify-content-between">
32+
<div><a href="https://getcomposer.org">Composer</a></div>
33+
<div>v{{ composerVersion }}</div>
34+
</div>
35+
</div>
36+
<div class="list-group-item">
37+
<div class="d-flex justify-content-between">
38+
<div><a href="https://www.php.net">PHP</a></div>
39+
<div>v{{ phpVersion }}</div>
40+
</div>
41+
</div>
42+
</div>
43+
</div>
44+
</div>
2045
{% endblock %}

0 commit comments

Comments
 (0)