Add link to investments from the admin budget page

Since managing investments is a very common action, with this link
administrators won't have to go back to the index page to manage
investments; they can access it from either the budgets index page or
the budget page.

Since now the links we've got on the budget page are similar to the ones
we've got in the index page table, we're styling them in a similar way.

We're also fixing a small typo en the investments path; it works exactly
the same way as it used to, but passing `budget` instead of `budget_id:
budget.id` is shorter and more consistent with what we do in other
places.
This commit is contained in:
Javi Martín
2021-08-30 23:12:13 +02:00
parent 51a0bce58c
commit 8bb55f0d45
7 changed files with 149 additions and 137 deletions

View File

@@ -1,5 +1,6 @@
.admin .groups-and-headings {
$gap: rem-calc(map-get($grid-column-gutter, medium));
@include admin-action-icons;
> section + section {
margin-top: $line-height * 1.5;
@@ -51,15 +52,6 @@
@include icon-on-top;
}
.edit-link {
@include has-fa-icon(edit, regular);
}
.destroy-link {
@include has-fa-icon(trash-alt, regular);
color: darken($alert-color, 5%);
}
.new-link {
@include hollow-button;
flex-shrink: 0;

View File

@@ -1,40 +1,32 @@
.admin .budgets-links {
$gap: $line-height;
@include flex-with-gap($gap);
align-items: baseline;
$vertical-gap: $line-height;
@include admin-action-icons;
@include flex-with-gap;
align-items: flex-start;
flex-wrap: wrap;
margin-top: -$gap;
margin-top: -$vertical-gap;
> * {
margin-top: $gap;
$min-width: $sdg-icon-min-width;
margin-top: $vertical-gap;
min-width: $min-width;
@supports (max-width: max-content) {
flex-basis: $min-width;
flex-grow: 1;
max-width: max-content;
}
}
+ * {
margin-top: $line-height;
}
.preview-link {
@include has-fa-icon(eye, regular);
@include hollow-button;
}
.edit-link {
@include has-fa-icon(edit, regular);
@include hollow-button;
a {
@include icon-on-top;
}
.results-link {
@include hollow-button;
}
.edit-link,
.preview-link,
.results-link {
margin-left: $gap;
margin-top: $gap;
&::before {
margin-#{$global-right}: $font-icon-margin;
}
@include has-fa-icon(poll, solid);
}
}