mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Improve some UI/language for Phame posts when viewer doesn't have CAN_INTERACT
Summary: Ref T13661. Fix up some UI and language so it's more clear that this is about disabling blog comments. Test Plan: Viewed UIs, saw some more usable strings. Maniphest Tasks: T13661 Differential Revision: https://secure.phabricator.com/D21755
This commit is contained in:
parent
aae23f0204
commit
4dae3e7e1f
3 changed files with 40 additions and 0 deletions
|
@ -5288,6 +5288,7 @@ phutil_register_library_map(array(
|
||||||
'PhamePostEditConduitAPIMethod' => 'applications/phame/conduit/PhamePostEditConduitAPIMethod.php',
|
'PhamePostEditConduitAPIMethod' => 'applications/phame/conduit/PhamePostEditConduitAPIMethod.php',
|
||||||
'PhamePostEditController' => 'applications/phame/controller/post/PhamePostEditController.php',
|
'PhamePostEditController' => 'applications/phame/controller/post/PhamePostEditController.php',
|
||||||
'PhamePostEditEngine' => 'applications/phame/editor/PhamePostEditEngine.php',
|
'PhamePostEditEngine' => 'applications/phame/editor/PhamePostEditEngine.php',
|
||||||
|
'PhamePostEditEngineLock' => 'applications/phame/editor/PhamePostEditEngineLock.php',
|
||||||
'PhamePostEditor' => 'applications/phame/editor/PhamePostEditor.php',
|
'PhamePostEditor' => 'applications/phame/editor/PhamePostEditor.php',
|
||||||
'PhamePostFerretEngine' => 'applications/phame/search/PhamePostFerretEngine.php',
|
'PhamePostFerretEngine' => 'applications/phame/search/PhamePostFerretEngine.php',
|
||||||
'PhamePostFulltextEngine' => 'applications/phame/search/PhamePostFulltextEngine.php',
|
'PhamePostFulltextEngine' => 'applications/phame/search/PhamePostFulltextEngine.php',
|
||||||
|
@ -12182,6 +12183,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorDestructibleInterface',
|
'PhabricatorDestructibleInterface',
|
||||||
'PhabricatorTokenReceiverInterface',
|
'PhabricatorTokenReceiverInterface',
|
||||||
'PhabricatorConduitResultInterface',
|
'PhabricatorConduitResultInterface',
|
||||||
|
'PhabricatorEditEngineLockableInterface',
|
||||||
'PhabricatorFulltextInterface',
|
'PhabricatorFulltextInterface',
|
||||||
'PhabricatorFerretInterface',
|
'PhabricatorFerretInterface',
|
||||||
),
|
),
|
||||||
|
@ -12192,6 +12194,7 @@ phutil_register_library_map(array(
|
||||||
'PhamePostEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
'PhamePostEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||||
'PhamePostEditController' => 'PhamePostController',
|
'PhamePostEditController' => 'PhamePostController',
|
||||||
'PhamePostEditEngine' => 'PhabricatorEditEngine',
|
'PhamePostEditEngine' => 'PhabricatorEditEngine',
|
||||||
|
'PhamePostEditEngineLock' => 'PhabricatorEditEngineLock',
|
||||||
'PhamePostEditor' => 'PhabricatorApplicationTransactionEditor',
|
'PhamePostEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
'PhamePostFerretEngine' => 'PhabricatorFerretEngine',
|
'PhamePostFerretEngine' => 'PhabricatorFerretEngine',
|
||||||
'PhamePostFulltextEngine' => 'PhabricatorFulltextEngine',
|
'PhamePostFulltextEngine' => 'PhabricatorFulltextEngine',
|
||||||
|
|
29
src/applications/phame/editor/PhamePostEditEngineLock.php
Normal file
29
src/applications/phame/editor/PhamePostEditEngineLock.php
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhamePostEditEngineLock
|
||||||
|
extends PhabricatorEditEngineLock {
|
||||||
|
|
||||||
|
public function willPromptUserForLockOverrideWithDialog(
|
||||||
|
AphrontDialogView $dialog) {
|
||||||
|
|
||||||
|
return $dialog
|
||||||
|
->setTitle(pht('Edit Locked Post'))
|
||||||
|
->appendParagraph(
|
||||||
|
pht('Comments are disabled for this post. Edit it anyway?'))
|
||||||
|
->addSubmitButton(pht('Edit Post'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function willBlockUserInteractionWithDialog(
|
||||||
|
AphrontDialogView $dialog) {
|
||||||
|
|
||||||
|
return $dialog
|
||||||
|
->setTitle(pht('Post Locked'))
|
||||||
|
->appendParagraph(
|
||||||
|
pht('You can not interact with this post because it is locked.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLockedObjectDisplayText() {
|
||||||
|
return pht('Comments have been disabled for this post.');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ final class PhamePost extends PhameDAO
|
||||||
PhabricatorDestructibleInterface,
|
PhabricatorDestructibleInterface,
|
||||||
PhabricatorTokenReceiverInterface,
|
PhabricatorTokenReceiverInterface,
|
||||||
PhabricatorConduitResultInterface,
|
PhabricatorConduitResultInterface,
|
||||||
|
PhabricatorEditEngineLockableInterface,
|
||||||
PhabricatorFulltextInterface,
|
PhabricatorFulltextInterface,
|
||||||
PhabricatorFerretInterface {
|
PhabricatorFerretInterface {
|
||||||
|
|
||||||
|
@ -393,4 +394,11 @@ final class PhamePost extends PhameDAO
|
||||||
return new PhamePostFerretEngine();
|
return new PhamePostFerretEngine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -( PhabricatorEditEngineLockableInterface )----------------------------- */
|
||||||
|
|
||||||
|
public function newEditEngineLock() {
|
||||||
|
return new PhamePostEditEngineLock();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue