Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this an active breadcrumb route? #3177

Closed
GaryQ opened this issue Mar 9, 2020 · 1 comment
Closed

Is this an active breadcrumb route? #3177

GaryQ opened this issue Mar 9, 2020 · 1 comment
Labels
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).

Comments

@GaryQ
Copy link

GaryQ commented Mar 9, 2020

Scanning though breadcrumbs.php ...

Not sure if this route is active or not but it seems to be missing the trans() if it is active.

Breadcrumbs::register(
        'attachments.edit',
        function (BreadcrumbsGenerator $breadcrumbs, Attachment $attachment) {
            $object = $attachment->attachable;
            if ($object instanceof TransactionJournal) {
                $group = $object->transactionGroup;
                if (null !== $group && $group instanceof TransactionGroup) {
                    $breadcrumbs->parent('transactions.show', $object->transactionGroup);
                }
            }

            if ($object instanceof Bill) {
                $breadcrumbs->parent('bills.show', $object);
            }
            $breadcrumbs->push(limitStringLength($attachment->filename), route('attachments.edit', [$attachment]));

if so then technically following the syntax of the delete route the last line should be:

            $breadcrumbs->push(trans('firefly.edit_attachment', ['name' => limitStringLength($attachment->filename)])), route('attachments.edit', [$attachment]));
@JC5
Copy link
Member

JC5 commented Mar 9, 2020

Indeed. I’ll pick it up. The route is active. Right now it just says “filename” if you edit it.

@JC5 JC5 added the bug Verified and replicated bugs and issues. label Mar 9, 2020
@JC5 JC5 added the fixed Bugs that are fixed (in a coming release). label Mar 10, 2020
@JC5 JC5 closed this as completed in 086e4d5 Mar 13, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified and replicated bugs and issues. fixed Bugs that are fixed (in a coming release).
Projects
None yet
Development

No branches or pull requests

2 participants