diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
commit | db384e6b19af03b4c3c82a5760d83a3fd79f7982 (patch) | |
tree | 34beaef37df5f47ccbcf5729d7583aae093cffa0 /app/assets/javascripts/pages/shared/wikis/components | |
parent | 54fd7b1bad233e3944434da91d257fa7f63c3996 (diff) |
Add latest changes from gitlab-org/gitlab@16-3-stable-eev16.3.0-rc42
Diffstat (limited to 'app/assets/javascripts/pages/shared/wikis/components')
-rw-r--r-- | app/assets/javascripts/pages/shared/wikis/components/wiki_export.vue | 40 | ||||
-rw-r--r-- | app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue | 2 |
2 files changed, 41 insertions, 1 deletions
diff --git a/app/assets/javascripts/pages/shared/wikis/components/wiki_export.vue b/app/assets/javascripts/pages/shared/wikis/components/wiki_export.vue new file mode 100644 index 00000000000..4d13f25c4cb --- /dev/null +++ b/app/assets/javascripts/pages/shared/wikis/components/wiki_export.vue @@ -0,0 +1,40 @@ +<script> +import { GlDisclosureDropdown } from '@gitlab/ui'; +import { __ } from '~/locale'; +import printMarkdownDom from '~/lib/print_markdown_dom'; + +export default { + components: { + GlDisclosureDropdown, + }, + inject: ['target', 'title', 'stylesheet'], + computed: { + dropdownItems() { + return [ + { + text: __('Print as PDF'), + action: this.print, + }, + ]; + }, + }, + methods: { + print() { + printMarkdownDom({ + target: document.querySelector(this.target), + title: this.title, + stylesheet: this.stylesheet, + }); + }, + }, +}; +</script> +<template> + <gl-disclosure-dropdown + :items="dropdownItems" + icon="ellipsis_v" + category="tertiary" + placement="right" + no-caret + /> +</template> diff --git a/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue b/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue index 5bc630c61cb..553cb1f0464 100644 --- a/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue +++ b/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue @@ -344,7 +344,7 @@ export default { </div> </div> - <div class="row" data-testid="wiki-form-content-fieldset"> + <div class="row"> <div class="col-sm-12 row-sm-5"> <gl-form-group> <markdown-editor |