diff options
Diffstat (limited to 'app/views/admin/application_settings/_diagramsnet.html.haml')
-rw-r--r-- | app/views/admin/application_settings/_diagramsnet.html.haml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/views/admin/application_settings/_diagramsnet.html.haml b/app/views/admin/application_settings/_diagramsnet.html.haml new file mode 100644 index 00000000000..e493110a9dc --- /dev/null +++ b/app/views/admin/application_settings/_diagramsnet.html.haml @@ -0,0 +1,25 @@ +- expanded = integration_expanded?('diagramsnet_') +%section.settings.as-diagramsnet.no-animate#js-diagramsnet-settings{ class: ('expanded' if expanded) } + .settings-header + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only + = _('Diagrams.net') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do + = expanded ? _('Collapse') : _('Expand') + %p + = _('Render diagrams in your documents using diagrams.net.') + = link_to _('Learn more.'), help_page_path('administration/integration/diagrams_net.md'), target: '_blank', rel: 'noopener noreferrer' + .settings-content + = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-diagramsnet-settings'), html: { class: 'fieldset-form', id: 'diagramsnet-settings' } do |f| + = form_errors(@application_setting) if expanded + + %fieldset + .form-group + = f.gitlab_ui_checkbox_component :diagramsnet_enabled, + _('Enable diagrams.net') + .form-group + = f.label :diagramsnet_url, _('Diagrams.net URL'), class: 'label-bold' + = f.text_field :diagramsnet_url, class: 'form-control gl-form-input', placeholder: 'https://embed.diagrams.net' + .form-text.text-muted + = _('The hostname of your diagrams.net server.') + + = f.submit _('Save changes'), pajamas_button: true |