mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Diffusion/BrowseFile: Set highlighted with blame as default view
Summary: As per title: when browsing files in Diffusion, set "Highlighted with blame" as the default view instead of falling back to "Highlighted". Test Plan: Tested view with a local Diffusion setup, defaults correctly. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1278 Differential Revision: https://secure.phabricator.com/D2669
This commit is contained in:
parent
a8b5ca63bf
commit
2d52881d4e
1 changed files with 6 additions and 2 deletions
|
@ -32,6 +32,10 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
|||
|
||||
$path = $drequest->getPath();
|
||||
$selected = $request->getStr('view');
|
||||
// If requested without a view, assume that blame is required (see T1278).
|
||||
if (!$selected) {
|
||||
$selected = 'blame';
|
||||
}
|
||||
$needs_blame = ($selected == 'blame' || $selected == 'plainblame');
|
||||
|
||||
$file_query = DiffusionFileContentQuery::newFromDiffusionRequest(
|
||||
|
@ -220,10 +224,10 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
|||
$select = AphrontFormSelectControl::renderSelectTag(
|
||||
$request->getStr('view'),
|
||||
array(
|
||||
'highlighted' => 'View as Highlighted Text',
|
||||
'blame' => 'View as Highlighted Text with Blame',
|
||||
'plain' => 'View as Plain Text',
|
||||
'highlighted' => 'View as Highlighted Text',
|
||||
'plainblame' => 'View as Plain Text with Blame',
|
||||
'plain' => 'View as Plain Text',
|
||||
'raw' => 'View as raw document',
|
||||
),
|
||||
array(
|
||||
|
|
Loading…
Reference in a new issue