Differential D12301 Diff 29532 src/applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php
| Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | EXAMPLE; | ||||
| $editor_doc_link = phutil_tag( | $editor_doc_link = phutil_tag( | ||||
| 'a', | 'a', | ||||
| array( | array( | ||||
| 'href' => PhabricatorEnv::getDoclink( | 'href' => PhabricatorEnv::getDoclink( | ||||
| 'User Guide: Configuring an External Editor'), | 'User Guide: Configuring an External Editor'), | ||||
| ), | ), | ||||
| pht('User Guide: Configuring an External Editor')); | pht('User Guide: Configuring an External Editor')); | ||||
| $font_default = PhabricatorEnv::getEnvConfig('style.monospace'); | |||||
| $pref_monospaced_textareas_value = $preferences | $pref_monospaced_textareas_value = $preferences | ||||
| ->getPreference($pref_monospaced_textareas); | ->getPreference($pref_monospaced_textareas); | ||||
| if (!$pref_monospaced_textareas_value) { | if (!$pref_monospaced_textareas_value) { | ||||
| $pref_monospaced_textareas_value = 'disabled'; | $pref_monospaced_textareas_value = 'disabled'; | ||||
| } | } | ||||
| $editor_instructions = pht('Link to edit files in external editor. '. | $editor_instructions = pht('Link to edit files in external editor. '. | ||||
| '%%f is replaced by filename, %%l by line number, %%r by repository '. | '%%f is replaced by filename, %%l by line number, %%r by repository '. | ||||
| Show All 31 Lines | $form = id(new AphrontFormView()) | ||||
| '' => pht('Supported (paths separated by spaces)'), | '' => pht('Supported (paths separated by spaces)'), | ||||
| 'disable' => pht('Not Supported'), | 'disable' => pht('Not Supported'), | ||||
| )) | )) | ||||
| ->setValue($preferences->getPreference($pref_multiedit))) | ->setValue($preferences->getPreference($pref_multiedit))) | ||||
| ->appendChild( | ->appendChild( | ||||
| id(new AphrontFormTextControl()) | id(new AphrontFormTextControl()) | ||||
| ->setLabel(pht('Monospaced Font')) | ->setLabel(pht('Monospaced Font')) | ||||
| ->setName($pref_monospaced) | ->setName($pref_monospaced) | ||||
| // Check plz | ->setCaption( | ||||
| ->setCaption(hsprintf( | pht('Overrides default fonts in tools like Differential.')) | ||||
| '%s<br />(%s: %s)', | |||||
| pht('Overrides default fonts in tools like Differential.'), | |||||
| pht('Default'), | |||||
| $font_default)) | |||||
| ->setValue($preferences->getPreference($pref_monospaced))) | ->setValue($preferences->getPreference($pref_monospaced))) | ||||
| ->appendChild( | ->appendChild( | ||||
| id(new AphrontFormMarkupControl()) | id(new AphrontFormMarkupControl()) | ||||
| ->setValue(phutil_tag( | ->setValue(phutil_tag( | ||||
| 'pre', | 'pre', | ||||
| array('class' => 'PhabricatorMonospaced'), | array('class' => 'PhabricatorMonospaced'), | ||||
| $example_string))) | $example_string))) | ||||
| ->appendChild( | ->appendChild( | ||||
| Show All 23 Lines | |||||