Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionBrowseController.php
| Show First 20 Lines • Show All 910 Lines • ▼ Show 20 Lines | private function renderGitLFSButton() { | ||||
| $text = pht('Download from Git LFS'); | $text = pht('Download from Git LFS'); | ||||
| $icon = 'fa-download'; | $icon = 'fa-download'; | ||||
| return id(new PHUIButtonView()) | return id(new PHUIButtonView()) | ||||
| ->setTag('a') | ->setTag('a') | ||||
| ->setText($text) | ->setText($text) | ||||
| ->setHref($href) | ->setHref($href) | ||||
| ->setIcon($icon); | ->setIcon($icon) | ||||
| ->setColor(PHUIButtonView::GREY); | |||||
| } | } | ||||
| private function buildDisplayRows( | private function buildDisplayRows( | ||||
| array $lines, | array $lines, | ||||
| array $blame_list, | array $blame_list, | ||||
| array $blame_commits, | array $blame_commits, | ||||
| $show_blame) { | $show_blame) { | ||||
| ▲ Show 20 Lines • Show All 991 Lines • ▼ Show 20 Lines | private function buildGitLFSCorpus(PhabricatorRepositoryGitLFSRef $ref) { | ||||
| $messages = array(); | $messages = array(); | ||||
| $messages[] = pht( | $messages[] = pht( | ||||
| 'This %s file is stored in Git Large File Storage.', | 'This %s file is stored in Git Large File Storage.', | ||||
| phutil_format_bytes($ref->getByteSize())); | phutil_format_bytes($ref->getByteSize())); | ||||
| try { | try { | ||||
| $file = $this->loadGitLFSFile($ref); | $file = $this->loadGitLFSFile($ref); | ||||
| $data = $this->renderGitLFSButton(); | $this->corpusButtons[] = $this->renderGitLFSButton(); | ||||
| } catch (Exception $ex) { | } catch (Exception $ex) { | ||||
| $severity = PHUIInfoView::SEVERITY_ERROR; | $severity = PHUIInfoView::SEVERITY_ERROR; | ||||
| $messages[] = pht('The data for this file could not be loaded.'); | $messages[] = pht('The data for this file could not be loaded.'); | ||||
| } | } | ||||
| $this->corpusButtons[] = $this->renderFileButton( | $this->corpusButtons[] = $this->renderFileButton( | ||||
| null, pht('View Raw LFS Pointer')); | null, pht('View Raw LFS Pointer')); | ||||
| ▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines | |||||