From 4ea26f22c4ab38a40a86ff032b1f41472fd71db6 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 8 Nov 2013 19:30:04 +0100 Subject: [PATCH] Add html instructions for diff/patch, todo and design tasks. --- migration/import_projects.php | 2 + migration/import_task.php | 2 +- migration/migration_steps.txt | 6 ++- .../option/PhabricatorCoreConfigOptions.php | 12 ++++++ .../DifferentialDiffCreateController.php | 4 +- .../ManiphestTaskEditController.php | 33 ++++++++++++++- .../rsrc/custom/static/design_guidelines.html | 2 + .../rsrc/custom/static/diff_guidelines.html | 35 ++++++++++++++++ .../rsrc/custom/static/patch_guidelines.html | 40 +++++++++++++++---- .../rsrc/custom/static/todo_guidelines.html | 2 + 10 files changed, 123 insertions(+), 15 deletions(-) create mode 100644 webroot/rsrc/custom/static/design_guidelines.html create mode 100644 webroot/rsrc/custom/static/diff_guidelines.html create mode 100644 webroot/rsrc/custom/static/todo_guidelines.html diff --git a/migration/import_projects.php b/migration/import_projects.php index f9de9a07b6..77ce3a94ba 100755 --- a/migration/import_projects.php +++ b/migration/import_projects.php @@ -49,3 +49,5 @@ create_project("Text Editor", "None", true, array(), "Text editor built into Ble //create_project("Tools", "None", true, array(), ""); // Tools create_project("Game Engine", "None", true, array(), "Blender game engine."); +create_project("Websites", "None", true, array(), "Project for Blender websites like blender.org, developer.blender.org or wiki.blender.org."); + diff --git a/migration/import_task.php b/migration/import_task.php index fcafb0399b..5bb51b6b95 100755 --- a/migration/import_task.php +++ b/migration/import_task.php @@ -104,7 +104,7 @@ for($id = intval($argv[1]); $id < intval($argv[2]); $id+=1) { } if($close_as_archived) - $archive_message = "This task was automatically closed as archived as part of migration, because it was determined to be no longer active.\n\nThe authoritative list of addons is now on the wiki, only individual bug reports are handled here now. See the #Addons project page for more information on the workflow."; + $archive_message = "This task was automatically closed as archived as part of migration, because it was determined to be no longer active.\n\nThe authoritative list of addons is on the wiki, we no longer have a report for each addon to track bugs and updates. Bugs can be reported individually and assigned to the addon developers. See the #Addons project page for more information on the workflow."; $extra .= "**Project**: " . $mtask->project . "\n"; $extra .= "**Tracker**: " . $mtask->tracker . "\n"; diff --git a/migration/migration_steps.txt b/migration/migration_steps.txt index 6ee7aa104e..2736f85de6 100644 --- a/migration/migration_steps.txt +++ b/migration/migration_steps.txt @@ -6,7 +6,10 @@ A) CONFIGURE PHABRICATOR ./bin/config set feed.public true ./bin/config set welcome.file rsrc/custom/static/welcome.html ./bin/config set report_guidelines.file rsrc/custom/static/report_guidelines.html -./bin/config set patch_guidelines.file "rsrc/custom/static/patch_guidelines.html", +./bin/config set patch_guidelines.file "rsrc/custom/static/patch_guidelines.html" +./bin/config set diff_guidelines.file "rsrc/custom/static/diff_guidelines.html" +./bin/config set design_guidelines.file "rsrc/custom/static/design_guidelines.html" +./bin/config set todo_guidelines.file "rsrc/custom/static/todo_guidelines.html" ./bin/config set metamta.domain developer.blender.org ./bin/config set metamta.default-address noreply@developer.blender.org ./bin/config set metamta.user-address-format real @@ -34,7 +37,6 @@ set maniphest.custom-field-definitions "Patch": "Patch", "Design": "Design", "To Do": "To Do", - "Feature Request": "Feature Request", "OpenGL Error": "OpenGL Error" } } diff --git a/src/applications/config/option/PhabricatorCoreConfigOptions.php b/src/applications/config/option/PhabricatorCoreConfigOptions.php index 9f6c540be4..9f29205044 100644 --- a/src/applications/config/option/PhabricatorCoreConfigOptions.php +++ b/src/applications/config/option/PhabricatorCoreConfigOptions.php @@ -195,6 +195,18 @@ final class PhabricatorCoreConfigOptions ->setLocked(true) ->setDescription( pht('Custom HTML file to show when submitting new patch.')), + $this->newOption('diff_guidelines.file', 'string', null) + ->setLocked(true) + ->setDescription( + pht('Custom HTML file to show when submitting new diff.')), + $this->newOption('design_guidelines.file', 'string', null) + ->setLocked(true) + ->setDescription( + pht('Custom HTML file to show when submitting new Design.')), + $this->newOption('todo_guidelines.file', 'string', null) + ->setLocked(true) + ->setDescription( + pht('Custom HTML file to show when submitting new To Do.')), $this->newOption('phabricator.cache-namespace', 'string', null) ->setLocked(true) ->setDescription(pht('Cache namespace.')), diff --git a/src/applications/differential/controller/DifferentialDiffCreateController.php b/src/applications/differential/controller/DifferentialDiffCreateController.php index 628277a74a..d190234b7b 100644 --- a/src/applications/differential/controller/DifferentialDiffCreateController.php +++ b/src/applications/differential/controller/DifferentialDiffCreateController.php @@ -53,11 +53,11 @@ final class DifferentialDiffCreateController extends DifferentialController { $cancel_uri = $this->getApplicationURI(); - if (PhabricatorEnv::getEnvConfig('patch_guidelines.file') !== null) { + if (PhabricatorEnv::getEnvConfig('diff_guidelines.file') !== null) { $webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/'; $instructions = phutil_safe_html( FileSystem::readFile($webroot . - PhabricatorEnv::getEnvConfig('patch_guidelines.file'))); + PhabricatorEnv::getEnvConfig('diff_guidelines.file'))); } else { $instructions = pht( 'The best way to create a Differential diff is by using %s, but you '. diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php index 0eba76d435..fae488b421 100644 --- a/src/applications/maniphest/controller/ManiphestTaskEditController.php +++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php @@ -468,6 +468,36 @@ final class ManiphestTaskEditController extends ManiphestController { $cancel_uri = '/T'.$parent_task->getID(); $button_name = pht('Create Task'); $header_name = pht('Create New Subtask'); + } else if ($request->getStr('type') == 'Patch') { + $button_name = pht('Submit Patch'); + $header_name = pht('Submit a Patch'); + + if (PhabricatorEnv::getEnvConfig('patch_guidelines.file') !== null) { + $webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/'; + $instructions = phutil_safe_html( + FileSystem::readFile($webroot . + PhabricatorEnv::getEnvConfig('patch_guidelines.file'))); + } + } else if ($request->getStr('type') == 'Design') { + $button_name = pht('Create Design Task'); + $header_name = pht('Create a Design Task'); + + if (PhabricatorEnv::getEnvConfig('design_guidelines.file') !== null) { + $webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/'; + $instructions = phutil_safe_html( + FileSystem::readFile($webroot . + PhabricatorEnv::getEnvConfig('design_guidelines.file'))); + } + } else if ($request->getStr('type') == 'To Do') { + $button_name = pht('Create To Do'); + $header_name = pht('Create a To Do'); + + if (PhabricatorEnv::getEnvConfig('todo_guidelines.file') !== null) { + $webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/'; + $instructions = phutil_safe_html( + FileSystem::readFile($webroot . + PhabricatorEnv::getEnvConfig('todo_guidelines.file'))); + } } else if ($request->getStr('type') == 'Bug') { $button_name = pht('Report Bug'); $header_name = pht('Report a Bug'); @@ -480,7 +510,6 @@ final class ManiphestTaskEditController extends ManiphestController { FileSystem::readFile($webroot . PhabricatorEnv::getEnvConfig('report_guidelines.file'))); } - } else { $button_name = pht('Create Task'); $header_name = pht('Create New Task'); @@ -606,7 +635,7 @@ final class ManiphestTaskEditController extends ManiphestController { ->setName('projects') ->setValue($projects_value) ->setID($project_tokenizer_id) - ->setCaption(pht('Add relevant projects tags here')) + ->setCaption(pht('Add relevant projects tags here. In most cases you need to add at least one of BF Blender, Game Engine, Addons or Websites.')) ->setDatasource('/typeahead/common/projects/')); } diff --git a/webroot/rsrc/custom/static/design_guidelines.html b/webroot/rsrc/custom/static/design_guidelines.html new file mode 100644 index 0000000000..a3915a4a57 --- /dev/null +++ b/webroot/rsrc/custom/static/design_guidelines.html @@ -0,0 +1,2 @@ +Design tasks are created by developers and module members to work out the design of functionality, and involve the community for feedback. They are not intended to be created by users, rather the focus is always on functionality that developers plan to work on. + diff --git a/webroot/rsrc/custom/static/diff_guidelines.html b/webroot/rsrc/custom/static/diff_guidelines.html new file mode 100644 index 0000000000..2c1c3bee79 --- /dev/null +++ b/webroot/rsrc/custom/static/diff_guidelines.html @@ -0,0 +1,35 @@ +

Where to Submit Patches

+
+ + +
+ +

Documentation

+
+ + +
+ +

License

+
+

By submitting code here, you agree that the code is (compatible with) GNU GPL v2 or later.
+If you choose for a compatible non-GPL license, notify it in the patch.

+ +
+ +

Create a Diff

+
+ + + diff --git a/webroot/rsrc/custom/static/patch_guidelines.html b/webroot/rsrc/custom/static/patch_guidelines.html index baf307c286..bb35e040f0 100644 --- a/webroot/rsrc/custom/static/patch_guidelines.html +++ b/webroot/rsrc/custom/static/patch_guidelines.html @@ -1,9 +1,33 @@ -By submitting code to this tracker, you agree that the code is (compatible with) GNU GPL 2 or later. -If you choose for a compatible non-GPL license, notify it in the patch. -
-