diff --git a/core/modules/forum/config/install/tour.tour.forum-container.yml b/core/modules/forum/config/install/tour.tour.forum-container.yml new file mode 100644 index 0000000..4dbd81f --- /dev/null +++ b/core/modules/forum/config/install/tour.tour.forum-container.yml @@ -0,0 +1,61 @@ +id: forum-container +label: Add or Edit a forum container +langcode: en +routes: + - route_name: forum.add_container + - route_name: forum.edit_container +tips: + introduction: + id: introduction + plugin: text + label: Adding or Editing a container + body:

This form can be used to edit an existing container or add a new container to your site.

Containers are used to group forums together. For example if you ran a Drupal forum you might create a 'Support' container and include forums for 'Installing Drupal' and 'Getting started' inside the 'Support' Container

+ weight: "1" + container-name: + id: container-name + plugin: text + label: Container name + body: Enter a name to identify this container. Eg 'Support' + weight: "2" + attributes: + data-id: edit-name + container-description: + id: container-description + plugin: text + label: Container description + body: Give your container a description to help identify the purpose of the container and the types of forum it will contain. You can also use the container description to provide guidelines for other site administrators to help them decide which container a new forum might belong in. + weight: "3" + attributes: + data-id: edit-description-value + container-parent: + id: container-parent + plugin: text + label: Container parent + body: If you wish to nest your containers, select the parent container here. If you don't require nesting, choose <root>. + weight: "4" + attributes: + data-id: edit-parent-0 + container-weight: + id: container-weight + plugin: text + label: Container weight + body:

Use the weight field to alter the order in which containers are displayed. Use a lower number to move a container to the top of the list.

E.g. if you have two containers, one with weight of -5 and one with weight of 5, the one with the -5 weight will be displayed first.

Items with the same weight are sorted alphabetically.

+ weight: "5" + attributes: + data-id: edit-weight + container-save: + id: container-save + plugin: text + label: Save + body: When you have finished completing the form, click 'Save' to create the new container or save the changes to an existing container. + weight: "6" + attributes: + data-id: edit-submit + container-delete: + id: container-delete + plugin: text + label: Delete + body: Use this button to delete your container. You will be required to confirm you wish to delete the container before it is actually deleted. + weight: "7" + attributes: + data-id: edit-delete diff --git a/core/modules/forum/config/install/tour.tour.forum-forum.yml b/core/modules/forum/config/install/tour.tour.forum-forum.yml new file mode 100644 index 0000000..0d62c35 --- /dev/null +++ b/core/modules/forum/config/install/tour.tour.forum-forum.yml @@ -0,0 +1,61 @@ +id: forum-forum +label: Add or Edit a forum +langcode: en +routes: + - route_name: forum.add_forum + - route_name: forum.edit_forum +tips: + introduction: + id: introduction + plugin: text + label: Adding or Editing a forum + body:

This form can be used to edit an existing forum or add a new forum to your site.

Forums can be place at the top level, or inside a container.

Each forum contains topics. For example if you have a forum called 'Installing Drupal', your site users could post relevant topics with threaded replies in that forum.

+ weight: "1" + forum-name: + id: forum-name + plugin: text + label: Forum name + body: Enter a name to identify this forum. Eg 'Installing Drupal' + weight: "2" + attributes: + data-id: edit-name + forum-description: + id: forum-description + plugin: text + label: Forum description + body: Give your forum a description to help identify the purpose of the forum and the types of topics it will contain. You can also use the forum description to provide guidelines for site users with regards to appropriate topics and conduct. + weight: "3" + attributes: + data-id: edit-description-value + forum-parent: + id: forum-parent + plugin: text + label: Forum parent + body: If you wish to nest your forums, select the parent container or forum here. If you don't require nesting, choose <root>. + weight: "4" + attributes: + data-id: edit-parent-0 + forum-weight: + id: forum-weight + plugin: text + label: Forum weight + body:

Use the weight field to alter the order in which forums are displayed. Use a lower number to move a forum to the top of the list.

E.g. if you have two forums, one with weight of -5 and one with weight of 5, the one with the -5 weight will be displayed first.

Items with the same weight are sorted alphabetically.

+ weight: "5" + attributes: + data-id: edit-weight + forum-save: + id: forum-save + plugin: text + label: Save + body: When you have finished completing the form, click 'Save' to create the new forum or save the changes to an existing forum. + weight: "6" + attributes: + data-id: edit-submit + forum-delete: + id: forum-delete + plugin: text + label: Delete + body: Use this button to delete your forum. You will be required to confirm you wish to delete the forum before it is actually deleted. + weight: "7" + attributes: + data-id: edit-delete diff --git a/core/modules/forum/config/install/tour.tour.forum-forums.yml b/core/modules/forum/config/install/tour.tour.forum-forums.yml new file mode 100644 index 0000000..6bf889d --- /dev/null +++ b/core/modules/forum/config/install/tour.tour.forum-forums.yml @@ -0,0 +1,30 @@ +id: forum-forums +label: Forums and containers +langcode: en +routes: + - route_name: forum.overview +tips: + forum-forum-list: + id: forum-forum-list + plugin: text + label: Forums and containers + body:

This list displays the forums and containers available on your site.

Forums are used to group forum topics together. For example you may have a forum about "Installing Drupal".
Inside that users of your forum would post topics, for example "How do I configure multilingual support" to which other users would post threaded replies.

You can use containers to group forums together. For example you might create a "Support" container which would group forums such as "Installing Drupal" and "Extending Drupal" together.

+ weight: "1" + attributes: + data-id: taxonomy + forum-forum-add: + id: forum-forum-add + plugin: text + label: Add a new forum + body: Use this button to add a new forum to hold user posts. + weight: "2" + attributes: + data-class: button-action[href="/admin/structure/forum/add/forum"] + forum-container-add: + id: forum-container-list + plugin: text + label: Add a new container + body: Use this button to add a new container to group forums together. + weight: "3" + attributes: + data-class: button-action[href="/admin/structure/forum/add/container"] diff --git a/core/modules/forum/src/Tests/ForumTourTest.php b/core/modules/forum/src/Tests/ForumTourTest.php new file mode 100644 index 0000000..9296a80 --- /dev/null +++ b/core/modules/forum/src/Tests/ForumTourTest.php @@ -0,0 +1,75 @@ + array( + array('data-id' => 'edit-name'), + array('data-id' => 'edit-description-value'), + array('data-id' => 'edit-parent-0'), + array('data-id' => 'edit-weight'), + array('data-id' => 'edit-submit'), + ), + 'admin/structure/forum/add/container' => array( + array('data-id' => 'edit-name'), + array('data-id' => 'edit-description-value'), + array('data-id' => 'edit-parent-0'), + array('data-id' => 'edit-weight'), + array('data-id' => 'edit-submit'), + ), + 'admin/structure/forum/edit/forum/1' => array( + array('data-id' => 'edit-name'), + array('data-id' => 'edit-description-value'), + array('data-id' => 'edit-parent-0'), + array('data-id' => 'edit-weight'), + array('data-id' => 'edit-submit'), + array('data-id' => 'edit-delete'), + ), + 'admin/structure/forum' => array( + array('data-id' => 'taxonomy'), + // We can't use nav.action-links because PHPUnit doesn't recognise html5 + // elements. + array('data-class' => 'button-action[href="/admin/structure/forum/add/forum"]'), + array('data-class' => 'button-action[href="/admin/structure/forum/add/container"]'), + ), + ); + + /** + * The permissions required for a logged in user to test tour tips. + * + * @var array + * A list of permissions. + */ + protected $permissions = array('access tour', 'administer forums'); + + /** + * Modules to enable. + * + * @var array + */ + public static $modules = array('forum', 'tour'); + + public static function getInfo() { + return array( + 'name' => 'Forum tour', + 'description' => 'Ensures that forum tours work correctly.', + 'group' => 'Forum', + ); + } + +}