1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-25 15:00:58 +01:00
phorge-phorge/src/applications/diffusion/controller/DiffusionRepositoryEditController.php

35 lines
930 B
PHP
Raw Normal View History

<?php
abstract class DiffusionRepositoryEditController
extends DiffusionController {
public function buildApplicationCrumbs($is_main = false) {
$crumbs = parent::buildApplicationCrumbs();
if ($this->diffusionRequest) {
$repository = $this->getDiffusionRequest()->getRepository();
$repo_uri = $this->getRepositoryControllerURI($repository, '');
$edit_uri = $this->getRepositoryControllerURI($repository, 'edit/');
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName('r'.$repository->getCallsign())
->setHref($repo_uri));
if ($is_main) {
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit Repository')));
} else {
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Edit'))
->setHref($edit_uri));
}
}
return $crumbs;
}
}