Commit 54a74800 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'ui-settings-okr-external-wiki' into 'master'

OKR: Update external wiki UI text and docs

See merge request gitlab-org/gitlab!58600
parents 90ab51d4 e3a0e6fc
# frozen_string_literal: true
class ExternalWikiService < Service
include ActionView::Helpers::UrlHelper
prop_accessor :external_wiki_url
validates :external_wiki_url, presence: true, public_url: true, if: :activated?
def title
......@@ -10,7 +10,7 @@ class ExternalWikiService < Service
end
def description
s_('ExternalWikiService|Replaces the link to the internal wiki with a link to an external wiki.')
s_('ExternalWikiService|Link to an external wiki from the sidebar.')
end
def self.to_param
......@@ -23,12 +23,19 @@ class ExternalWikiService < Service
type: 'text',
name: 'external_wiki_url',
title: s_('ExternalWikiService|External wiki URL'),
placeholder: s_('ExternalWikiService|The URL of the external wiki'),
placeholder: s_('ExternalWikiService|https://example.com/xxx/wiki/...'),
help: 'Enter the URL to the external wiki.',
required: true
}
]
end
def help
docs_link = link_to _('Learn more.'), Rails.application.routes.url_helpers.help_page_url('user/project/wiki/index', anchor: 'link-an-external-wiki'), target: '_blank', rel: 'noopener noreferrer'
s_('Link an external wiki from the project\'s sidebar. %{docs_link}').html_safe % { docs_link: docs_link.html_safe }
end
def execute(_data)
response = Gitlab::HTTP.get(properties['external_wiki_url'], verify: true)
response.body if response.code == 200
......
---
title: Updated outdated UI text and docs
merge_request: 58600
author:
type: other
......@@ -38,7 +38,7 @@ Click on the service links to see further configuration instructions and details
| Drone CI | Run CI/CD pipelines with Drone. | **{check-circle}** Yes |
| [Emails on push](emails_on_push.md) | Send commits and diff of each push by email. | **{dotted-circle}** No |
| [EWM](ewm.md) | Use IBM Engineering Workflow Management as the issue tracker. | **{dotted-circle}** No |
| External wiki | Replace internal wiki link with external wiki link. | **{dotted-circle}** No |
| [External wiki](../wiki/index.md#link-an-external-wiki) | Link an external wiki. | **{dotted-circle}** No |
| Flowdock | Use Flowdock with GitLab. | **{dotted-circle}** No |
| [GitHub](github.md) | Obtain statuses for commits and pull requests. | **{dotted-circle}** No |
| [Hangouts Chat](hangouts_chat.md) | Receive events notifications. | **{dotted-circle}** No |
......
......@@ -237,6 +237,49 @@ Group wikis can be edited by members with [Developer permissions](../../permissi
and above. Group wiki repositories can be moved using the
[Group repository storage moves API](../../../api/group_repository_storage_moves.md).
## Link an external wiki
To add a link to an external wiki from a project's left sidebar:
1. In your project, go to **Settings > Integrations**.
1. Select **External wiki**.
1. Add the URL to your external wiki.
1. (Optional) Select **Test settings** to verify the connection.
1. Select **Save changes**.
You can now see the **External wiki** option from your project's
left sidebar.
When you enable this integration, the link to the external
wiki won't replace the link to the internal wiki.
To hide the internal wiki from the sidebar, [disable the project's wiki](#disable-the-projects-wiki).
To hide the link to an external wiki:
1. In your project, go to **Settings > Integrations**.
1. Select **External wiki**.
1. Unselect **Enable integration**.
1. Select **Save changes**.
## Disable the project's wiki
To disable a project's internal wiki:
1. In your project, go to **Settings > General**.
1. Expand **Visibility, project features, permissions**.
1. Scroll down to find **Wiki** and toggle it off (in gray).
1. Select **Save changes**.
The internal wiki is now disabled, and users and project members:
- Cannot find the link to the wiki from the project's sidebar.
- Cannot add, delete, or edit wiki pages.
- Cannot view any wiki page.
Previously added wiki pages are preserved in case you
want to re-enable the wiki. To re-enable it, repeat the process
to disable the wiki but toggle it on (in blue).
## Resources
- [Wiki settings for administrators](../../../administration/wikis/index.md)
......
......@@ -13097,10 +13097,10 @@ msgstr ""
msgid "ExternalWikiService|External wiki URL"
msgstr ""
msgid "ExternalWikiService|Replaces the link to the internal wiki with a link to an external wiki."
msgid "ExternalWikiService|Link to an external wiki from the sidebar."
msgstr ""
msgid "ExternalWikiService|The URL of the external wiki"
msgid "ExternalWikiService|https://example.com/xxx/wiki/..."
msgstr ""
msgid "Externally installed"
......@@ -19040,6 +19040,9 @@ msgstr ""
msgid "Link Prometheus monitoring to GitLab."
msgstr ""
msgid "Link an external wiki from the project's sidebar. %{docs_link}"
msgstr ""
msgid "Link copied"
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment