Skip to content

Commit

Permalink
Order admin manifest theme entries.
Browse files Browse the repository at this point in the history
Tweak for table overflow.
  • Loading branch information
dracos committed Aug 30, 2024
1 parent fa1c1f8 commit 0248683
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion perllib/FixMyStreet/App/Controller/Admin/ManifestTheme.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sub auto :Private {
my ($self, $c) = @_;

if ( $c->cobrand->moniker eq 'fixmystreet' ) {
$c->stash(rs => $c->model('DB::ManifestTheme')->search_rs({}), show_all => 1);
$c->stash(rs => $c->model('DB::ManifestTheme')->search_rs({}, { order_by => 'cobrand' }), show_all => 1);
} else {
$c->stash(rs => $c->model('DB::ManifestTheme')->search_rs({ cobrand => $c->cobrand->moniker }));
}
Expand Down
18 changes: 12 additions & 6 deletions templates/web/base/admin/manifesttheme/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
<tr>
<th> [% loc('Cobrand') %] </th>
<th> [% loc('FixMyStreet Name') %] </th>
<th> [% loc('FixMyStreet Short Name') %] </th>
<th> [% loc('WasteWorks Name') %] </th>
<th> [% loc('WasteWorks Short Name') %] </th>
<th> [% loc('Background Colour') %] </th>
<th> [% loc('Theme Colour') %] </th>
<th> &nbsp; </th>
Expand All @@ -17,10 +15,18 @@
[% FOR theme IN rs.all %]
<tr>
<td>[% theme.cobrand %]</td>
<td>[% theme.name %]</td>
<td>[% theme.short_name %]</td>
<td>[% theme.wasteworks_name %]</td>
<td>[% theme.wasteworks_short_name %]</td>
<td>
[% theme.name %]
[% IF theme.name != theme.short_name %]
<br>([% theme.short_name %])
[% END %]
</td>
<td>
[% theme.wasteworks_name %]
[% IF theme.wasteworks_name != theme.wasteworks_short_name %]
<br>([% theme.wasteworks_short_name %])
[% END %]
</td>
<td>[% theme.background_colour %]</td>
<td>[% theme.theme_colour %]</td>
<td> <a href="[% c.uri_for(c.controller.action_for('edit'), [theme.cobrand]) %]" class="btn">[% loc('Edit') %]</a> </td>
Expand Down

0 comments on commit 0248683

Please sign in to comment.