Skip to content

Commit 3ac300f

Browse files
committed
Reorder these to match what you see in CP nav.
1 parent 1c28ed6 commit 3ac300f

2 files changed

Lines changed: 36 additions & 36 deletions

File tree

resources/views/blueprints/index.blade.php

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,31 @@
7979
</ui-panel>
8080
@endif
8181

82+
@if (Statamic\Facades\Nav::all()->count() > 0)
83+
<ui-subheading size="lg" class="mb-2">{{ __('Navigation') }}</ui-subheading>
84+
<ui-panel>
85+
<table class="data-table">
86+
<thead>
87+
<tr>
88+
<th class="text-start!">{{ __('Blueprint') }}</th>
89+
</tr>
90+
</thead>
91+
<tbody>
92+
@foreach (Statamic\Facades\Nav::all() as $nav)
93+
<tr>
94+
<td>
95+
<div class="flex items-center gap-2">
96+
<ui-icon name="navigation" class="text-gray-500 me-1" />
97+
<a href="{{ cp_route('blueprints.navigation.edit', $nav->handle()) }}" v-pre>{{ __($nav->title()) }}</a>
98+
</div>
99+
</td>
100+
</tr>
101+
@endforeach
102+
</tbody>
103+
</table>
104+
</ui-panel>
105+
@endif
106+
82107
@if (Statamic\Facades\Taxonomy::all()->count() > 0)
83108
<ui-subheading size="lg" class="mb-2">{{ __('Taxonomies') }}</ui-subheading>
84109
<ui-panel>
@@ -113,8 +138,8 @@
113138
</ui-panel>
114139
@endif
115140

116-
@if (Statamic\Facades\Nav::all()->count() > 0)
117-
<ui-subheading size="lg" class="mb-2">{{ __('Navigation') }}</ui-subheading>
141+
@if (Statamic\Facades\AssetContainer::all()->count() > 0)
142+
<ui-subheading size="lg" class="mb-2">{{ __('Asset Containers') }}</ui-subheading>
118143
<ui-panel>
119144
<table class="data-table">
120145
<thead>
@@ -123,12 +148,12 @@
123148
</tr>
124149
</thead>
125150
<tbody>
126-
@foreach (Statamic\Facades\Nav::all() as $nav)
151+
@foreach (Statamic\Facades\AssetContainer::all() as $container)
127152
<tr>
128153
<td>
129154
<div class="flex items-center gap-2">
130-
<ui-icon name="navigation" class="text-gray-500 me-1" />
131-
<a href="{{ cp_route('blueprints.navigation.edit', $nav->handle()) }}" v-pre>{{ __($nav->title()) }}</a>
155+
<ui-icon name="assets" class="text-gray-500 me-1" />
156+
<a href="{{ cp_route('blueprints.asset-containers.edit', $container->handle()) }}" v-pre>{{ __($container->title()) }}</a>
132157
</div>
133158
</td>
134159
</tr>
@@ -163,31 +188,6 @@
163188
</ui-panel>
164189
@endif
165190

166-
@if (Statamic\Facades\AssetContainer::all()->count() > 0)
167-
<ui-subheading size="lg" class="mb-2">{{ __('Asset Containers') }}</ui-subheading>
168-
<ui-panel>
169-
<table class="data-table">
170-
<thead>
171-
<tr>
172-
<th class="text-start!">{{ __('Blueprint') }}</th>
173-
</tr>
174-
</thead>
175-
<tbody>
176-
@foreach (Statamic\Facades\AssetContainer::all() as $container)
177-
<tr>
178-
<td>
179-
<div class="flex items-center gap-2">
180-
<ui-icon name="assets" class="text-gray-500 me-1" />
181-
<a href="{{ cp_route('blueprints.asset-containers.edit', $container->handle()) }}" v-pre>{{ __($container->title()) }}</a>
182-
</div>
183-
</td>
184-
</tr>
185-
@endforeach
186-
</tbody>
187-
</table>
188-
</ui-panel>
189-
@endif
190-
191191
@if (Statamic\Facades\User::current()->can('configure form fields') && Statamic\Facades\Form::all()->count() > 0)
192192
<ui-subheading size="lg" class="mb-2">{{ __('Forms') }}</ui-subheading>
193193
<ui-panel>

src/CommandPalette/Palette.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,22 @@ protected function buildFields(): self
5656
->flatMap(fn ($collection) => $collection->entryBlueprintCommandPaletteLinks())
5757
->each(fn (Link $link) => $this->addCommand($link));
5858

59-
Facades\Taxonomy::all()
60-
->flatMap(fn ($taxonomy) => $taxonomy->termBlueprintCommandPaletteLinks())
61-
->each(fn (Link $link) => $this->addCommand($link));
62-
6359
Facades\Nav::all()
6460
->map(fn ($nav) => $nav->blueprintCommandPaletteLink())
6561
->each(fn (Link $link) => $this->addCommand($link));
6662

67-
Facades\GlobalSet::all()
68-
->map(fn ($set) => $set->blueprintCommandPaletteLink())
63+
Facades\Taxonomy::all()
64+
->flatMap(fn ($taxonomy) => $taxonomy->termBlueprintCommandPaletteLinks())
6965
->each(fn (Link $link) => $this->addCommand($link));
7066

7167
Facades\AssetContainer::all()
7268
->map(fn ($container) => $container->blueprintCommandPaletteLink())
7369
->each(fn (Link $link) => $this->addCommand($link));
7470

71+
Facades\GlobalSet::all()
72+
->map(fn ($set) => $set->blueprintCommandPaletteLink())
73+
->each(fn (Link $link) => $this->addCommand($link));
74+
7575
Facades\Form::all()
7676
->map(fn ($form) => $form->blueprintCommandPaletteLink())
7777
->each(fn (Link $link) => $this->addCommand($link));

0 commit comments

Comments
 (0)