mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 19:02:41 +01:00
5e6716399c
Summary: Ref T4103. This starts breaking out settings in a modern way to prepare for global defaults. Test Plan: - Edited diff settings. - Saw them take effect in primary settings pane. - Set stuff to new automatic defaults. - Tried to edit another user's settings. - Edited a bot's settings as an administrator. {F1669077} Reviewers: chad Reviewed By: chad Maniphest Tasks: T4103 Differential Revision: https://secure.phabricator.com/D15995
34 lines
830 B
PHP
34 lines
830 B
PHP
<?php
|
|
|
|
final class PhabricatorShowFiletreeSetting
|
|
extends PhabricatorSelectSetting {
|
|
|
|
const SETTINGKEY = 'diff-filetree';
|
|
|
|
const VALUE_DISABLE_FILETREE = 0;
|
|
const VALUE_ENABLE_FILETREE = 1;
|
|
|
|
public function getSettingName() {
|
|
return pht('Show Filetree');
|
|
}
|
|
|
|
protected function getControlInstructions() {
|
|
return pht(
|
|
'When viewing a revision or commit, you can enable a sidebar showing '.
|
|
'affected files. When this option is enabled, press {nav %s} to show '.
|
|
'or hide the sidebar.',
|
|
'f');
|
|
}
|
|
|
|
public function getSettingDefaultValue() {
|
|
return self::VALUE_DISABLE_FILETREE;
|
|
}
|
|
|
|
protected function getSelectOptions() {
|
|
return array(
|
|
self::VALUE_DISABLE_FILETREE => pht('Disable Filetree'),
|
|
self::VALUE_ENABLE_FILETREE => pht('Enable Filetree'),
|
|
);
|
|
}
|
|
|
|
}
|