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
|
|
|
|
2016-01-05 21:38:22 +01:00
|
|
|
if ($this->hasDiffusionRequest()) {
|
|
|
|
$drequest = $this->getDiffusionRequest();
|
|
|
|
$repository = $drequest->getRepository();
|
2016-01-02 20:28:31 +01:00
|
|
|
$repo_uri = $repository->getURI();
|
2013-10-26 00:58:58 +02:00
|
|
|
$edit_uri = $this->getRepositoryControllerURI($repository, 'edit/');
|
2013-10-26 00:58:02 +02:00
|
|
|
|
2016-01-02 20:28:31 +01:00
|
|
|
$crumbs->addTextCrumb($repository->getDisplayname(), $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
|
|
|
}
|
2016-03-17 20:01:22 +01:00
|
|
|
$crumbs->setBorder(true);
|
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
|
|
|
}
|