Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionController.php
| Show First 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | protected function renderPathLinks(DiffusionRequest $drequest, $action) { | ||||
| return $links; | return $links; | ||||
| } | } | ||||
| protected function renderStatusMessage($title, $body) { | protected function renderStatusMessage($title, $body) { | ||||
| return id(new PHUIInfoView()) | return id(new PHUIInfoView()) | ||||
| ->setSeverity(PHUIInfoView::SEVERITY_WARNING) | ->setSeverity(PHUIInfoView::SEVERITY_WARNING) | ||||
| ->setTitle($title) | ->setTitle($title) | ||||
| ->setFlush(true) | |||||
| ->appendChild($body); | ->appendChild($body); | ||||
| } | } | ||||
| protected function renderTablePagerBox(PHUIPagerView $pager) { | protected function renderTablePagerBox(PHUIPagerView $pager) { | ||||
| return id(new PHUIBoxView()) | return id(new PHUIBoxView()) | ||||
| ->addMargin(PHUI::MARGIN_LARGE) | ->addMargin(PHUI::MARGIN_LARGE) | ||||
| ->appendChild($pager); | ->appendChild($pager); | ||||
| } | } | ||||
| protected function renderCommitHashTag(DiffusionRequest $drequest) { | |||||
| $stable_commit = $drequest->getStableCommit(); | |||||
| $commit = phutil_tag( | |||||
| 'a', | |||||
| array( | |||||
| 'href' => $drequest->generateURI( | |||||
| array( | |||||
| 'action' => 'commit', | |||||
| 'commit' => $stable_commit, | |||||
| )), | |||||
| ), | |||||
| $drequest->getRepository()->formatCommitName($stable_commit, true)); | |||||
epriestley: Odd indent. | |||||
Not Done Inline ActionsOh, I think this is the thing I suggest replacing with getLocalName(). Since you're using formatCommitName(), the fix is to add a second true parameter for the "local" format: formatCommitName($stable_commit, true). epriestley: Oh, I think this is the thing I suggest replacing with `getLocalName()`.
Since you're using… | |||||
| $tag = id(new PHUITagView()) | |||||
| ->setName($commit) | |||||
| ->setShade('indigo') | |||||
| ->setType(PHUITagView::TYPE_SHADE); | |||||
| return $tag; | |||||
| } | |||||
| protected function renderDirectoryReadme(DiffusionBrowseResultSet $browse) { | protected function renderDirectoryReadme(DiffusionBrowseResultSet $browse) { | ||||
| $readme_path = $browse->getReadmePath(); | $readme_path = $browse->getReadmePath(); | ||||
| if ($readme_path === null) { | if ($readme_path === null) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| $drequest = $this->getDiffusionRequest(); | $drequest = $this->getDiffusionRequest(); | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| Show All 38 Lines | |||||
Odd indent.