2013-05-24 21:37:42 +02:00
|
|
|
<?php
|
|
|
|
|
2013-10-26 00:58:58 +02:00
|
|
|
abstract class DiffusionRepositoryEditController
|
|
|
|
extends DiffusionController {
|
2013-05-24 21:37:42 +02:00
|
|
|
|
2015-01-06 21:34:58 +01:00
|
|
|
protected function buildApplicationCrumbs($is_main = false) {
|
2013-10-26 00:58:58 +02:00
|
|
|
$crumbs = parent::buildApplicationCrumbs();
|
2013-05-24 21:37:42 +02:00
|
|
|
|
2013-10-26 00:58:58 +02:00
|
|
|
if ($this->diffusionRequest) {
|
|
|
|
$repository = $this->getDiffusionRequest()->getRepository();
|
|
|
|
$repo_uri = $this->getRepositoryControllerURI($repository, '');
|
|
|
|
$edit_uri = $this->getRepositoryControllerURI($repository, 'edit/');
|
2013-10-26 00:58:02 +02:00
|
|
|
|
2013-12-19 02:47:34 +01:00
|
|
|
$crumbs->addTextCrumb('r'.$repository->getCallsign(), $repo_uri);
|
2013-10-25 22:58:15 +02:00
|
|
|
|
2013-10-30 21:15:32 +01:00
|
|
|
if ($is_main) {
|
2013-12-19 02:47:34 +01:00
|
|
|
$crumbs->addTextCrumb(pht('Edit Repository'));
|
2013-10-30 21:15:32 +01:00
|
|
|
} else {
|
2013-12-19 02:47:34 +01:00
|
|
|
$crumbs->addTextCrumb(pht('Edit'), $edit_uri);
|
2013-10-30 21:15:32 +01:00
|
|
|
}
|
2013-10-25 22:58:03 +02:00
|
|
|
}
|
|
|
|
|
2013-10-26 00:58:58 +02:00
|
|
|
return $crumbs;
|
2013-10-25 22:59:02 +02:00
|
|
|
}
|
|
|
|
|
2013-05-24 21:37:42 +02:00
|
|
|
}
|