Skip to content

Commit

Permalink
Fix translation link
Browse files Browse the repository at this point in the history
ENG-17101
  • Loading branch information
hadomskyi committed Aug 15, 2024
1 parent 7e3e6a0 commit daf901f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/elements/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use lilthq\craftliltplugin\elements\actions\JobEdit;
use lilthq\craftliltplugin\elements\db\TranslationQuery;
use lilthq\craftliltplugin\models\TranslationModelTrait;
use craft\elements\User;
use lilthq\craftliltplugin\records\TranslationNotificationsRecord;
use lilthq\craftliltplugin\records\TranslationRecord;

Expand Down Expand Up @@ -128,6 +129,16 @@ public function getIsReviewed(): bool
return $this->getIsPublished() || $this->status === TranslationRecord::STATUS_READY_TO_PUBLISH;
}

public function getUrl(): ?string
{
return $this->getCpEditUrl();
}

public function canView(User $user): bool
{
return true;
}

public function getStatusHtml(): string
{
$label = self::statuses()[$this->status]['label'] ?? self::statuses()[$this->status];
Expand Down

0 comments on commit daf901f

Please sign in to comment.