Commit 98ad4e44 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'project-settings-freshen-titles-descriptions' into 'master'

Update project settings section titles and info

See merge request gitlab-org/gitlab-ee!9614
parents 2ebaf77b 9a17bd58
- breadcrumb_title "General Settings" - breadcrumb_title _("General Settings")
- page_title "General" - page_title _("General")
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
- expanded = Rails.env.test? - expanded = Rails.env.test?
.project-edit-container .project-edit-container
%section.settings.general-settings.no-animate#js-general-project-settings{ class: ('expanded' if expanded) } %section.settings.general-settings.no-animate#js-general-project-settings{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, tags, avatar')
General project %button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%button.btn.js-settings-toggle{ type: 'button' } %p= _('Update your project name, tags, description and avatar.')
= expanded ? 'Collapse' : 'Expand'
%p
Update your project name, description, avatar, and other general settings.
.settings-content .settings-content
.project-edit-errors .project-edit-errors
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project" }, authenticity_token: true do |f| = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project" }, authenticity_token: true do |f|
...@@ -63,12 +61,10 @@ ...@@ -63,12 +61,10 @@
%section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded) } %section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Visibility, project features, permissions')
Permissions %button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%button.btn.js-settings-toggle{ type: 'button' } %p= _('Choose visibility level, enable/disable project features (issues, repository, wiki, snippets) and set permissions.')
= expanded ? 'Collapse' : 'Expand'
%p
Enable or disable certain project features and choose access levels.
.settings-content .settings-content
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f| = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f|
%input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' } %input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' }
...@@ -81,12 +77,10 @@ ...@@ -81,12 +77,10 @@
%section.qa-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] } %section.qa-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] }
.settings-header .settings-header
%h4 %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests')
Merge request %button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%button.btn.js-settings-toggle{ type: 'button' } %p= _('Choose your merge method, set up a default merge request description template.')
= expanded ? 'Collapse' : 'Expand'
%p
Customize your merge request restrictions.
.settings-content .settings-content
= render_if_exists 'shared/promotions/promote_mr_features' = render_if_exists 'shared/promotions/promote_mr_features'
...@@ -97,11 +91,10 @@ ...@@ -97,11 +91,10 @@
= render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded = render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded
= render_if_exists 'projects/service_desk_settings'
%section.settings.no-animate{ class: ('expanded' if expanded) } %section.settings.no-animate{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
= s_('ProjectSettings|Badges') = s_('ProjectSettings|Badges')
%button.btn.js-settings-toggle{ type: 'button' } %button.btn.js-settings-toggle{ type: 'button' }
= expanded ? 'Collapse' : 'Expand' = expanded ? 'Collapse' : 'Expand'
...@@ -111,16 +104,15 @@ ...@@ -111,16 +104,15 @@
.settings-content .settings-content
= render 'shared/badges/badge_settings' = render 'shared/badges/badge_settings'
= render_if_exists 'projects/service_desk_settings'
= render 'export', project: @project = render 'export', project: @project
%section.qa-advanced-settings.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded) } %section.qa-advanced-settings.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced')
Advanced %button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%button.btn.js-settings-toggle{ type: 'button' } %p= _('Housekeeping, export, path, transfer, remove, archive.')
= expanded ? 'Collapse' : 'Expand'
%p
Perform advanced options such as housekeeping, archiving, renaming, transferring, or removing your project.
.settings-content .settings-content
.sub-section .sub-section
%h4 Housekeeping %h4 Housekeeping
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
- expanded = Rails.env.test? - expanded = Rails.env.test?
%section.settings.issues-feature.no-animate#js-issue-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:issues_access_level) == 0)] } %section.settings.issues-feature.no-animate#js-issue-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:issues_access_level) == 0)] }
.settings-header .settings-header
%h4 %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Issue settings')
Issue settings %button.btn.js-settings-toggle= expanded ? _('Collapse') : _('Expand')
%button.btn.js-settings-toggle %p= _('Customize your issue restrictions.')
= expanded ? 'Collapse' : 'Expand'
%p
Customize your issue restrictions.
.settings-content .settings-content
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "issue-settings-form" }, authenticity_token: true do |f| = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "issue-settings-form" }, authenticity_token: true do |f|
%input{ type: 'hidden', name: 'update_section', value: 'js-issue-settings' } %input{ type: 'hidden', name: 'update_section', value: 'js-issue-settings' }
......
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
%section.settings.merge-requests-feature.no-animate#js-merge-request-approval-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] } %section.settings.merge-requests-feature.no-animate#js-merge-request-approval-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] }
.settings-header .settings-header
%h4 %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _("Merge request approvals")
= _("Merge request approvals") %button.btn.js-settings-toggle{ type: 'button' }= expanded ? _("Collapse") : _("Expand")
%button.btn.js-settings-toggle{ type: 'button' }
= expanded ? _("Collapse") : _("Expand")
%p %p
= _("Customize your merge request approval settings.") = _("Set a number of approvals required, the approvers and other approval settings.")
= link_to icon('question-circle'), help_page_path("user/project/merge_requests/merge_request_approvals"), target: '_blank' = link_to _("Learn more about approvals."), help_page_path("user/project/merge_requests/merge_request_approvals"), target: '_blank'
.settings-content .settings-content
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { class: "merge-request-approval-settings-form" }, authenticity_token: true do |f| = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { class: "merge-request-approval-settings-form" }, authenticity_token: true do |f|
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-approval-settings' } %input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-approval-settings' }
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
- expanded = Rails.env.test? - expanded = Rails.env.test?
%section.settings.js-service-desk-setting-wrapper.no-animate#js-service-desk{ class: ('expanded' if expanded) } %section.settings.js-service-desk-setting-wrapper.no-animate#js-service-desk{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Service Desk')
Service Desk
%button.btn.js-settings-toggle %button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand' = expanded ? _('Collapse') : _('Expand')
%p %p
Customize your service desk settings. Customize your service desk settings.
= link_to "Learn more about service desk.", help_page_path('user/project/service_desk'), target: '_blank' = link_to "Learn more about service desk.", help_page_path('user/project/service_desk'), target: '_blank'
......
---
title: Update project settings section titles and info
merge_request: 9614
author:
type: other
...@@ -704,6 +704,9 @@ msgstr "" ...@@ -704,6 +704,9 @@ msgstr ""
msgid "AdminUsers|Without projects" msgid "AdminUsers|Without projects"
msgstr "" msgstr ""
msgid "Advanced"
msgstr ""
msgid "Advanced permissions, Large File Storage and Two-Factor authentication settings." msgid "Advanced permissions, Large File Storage and Two-Factor authentication settings."
msgstr "" msgstr ""
...@@ -1893,6 +1896,9 @@ msgstr "" ...@@ -1893,6 +1896,9 @@ msgstr ""
msgid "Choose the top-level group for your repository imports." msgid "Choose the top-level group for your repository imports."
msgstr "" msgstr ""
msgid "Choose visibility level, enable/disable project features (issues, repository, wiki, snippets) and set permissions."
msgstr ""
msgid "Choose what content you want to see on a group’s overview page" msgid "Choose what content you want to see on a group’s overview page"
msgstr "" msgstr ""
...@@ -1905,6 +1911,9 @@ msgstr "" ...@@ -1905,6 +1911,9 @@ msgstr ""
msgid "Choose which shards you wish to synchronize to this secondary node." msgid "Choose which shards you wish to synchronize to this secondary node."
msgstr "" msgstr ""
msgid "Choose your merge method, set up a default merge request description template."
msgstr ""
msgid "CiStatusLabel|canceled" msgid "CiStatusLabel|canceled"
msgstr "" msgstr ""
...@@ -3089,7 +3098,7 @@ msgstr "" ...@@ -3089,7 +3098,7 @@ msgstr ""
msgid "Customize language and region related settings." msgid "Customize language and region related settings."
msgstr "" msgstr ""
msgid "Customize your merge request approval settings." msgid "Customize your issue restrictions."
msgstr "" msgstr ""
msgid "Customize your pipeline configuration, view your pipeline status and coverage report." msgid "Customize your pipeline configuration, view your pipeline status and coverage report."
...@@ -4503,6 +4512,9 @@ msgstr "" ...@@ -4503,6 +4512,9 @@ msgstr ""
msgid "General" msgid "General"
msgstr "" msgstr ""
msgid "General Settings"
msgstr ""
msgid "General pipelines" msgid "General pipelines"
msgstr "" msgstr ""
...@@ -5213,6 +5225,9 @@ msgstr "" ...@@ -5213,6 +5225,9 @@ msgstr ""
msgid "Housekeeping successfully started" msgid "Housekeeping successfully started"
msgstr "" msgstr ""
msgid "Housekeeping, export, path, transfer, remove, archive."
msgstr ""
msgid "However, you are already a member of this %{member_source}. Sign in using a different account to accept the invitation." msgid "However, you are already a member of this %{member_source}. Sign in using a different account to accept the invitation."
msgstr "" msgstr ""
...@@ -5542,6 +5557,9 @@ msgstr "" ...@@ -5542,6 +5557,9 @@ msgstr ""
msgid "Issue events" msgid "Issue events"
msgstr "" msgstr ""
msgid "Issue settings"
msgstr ""
msgid "IssueBoards|Board" msgid "IssueBoards|Board"
msgstr "" msgstr ""
...@@ -5835,6 +5853,9 @@ msgstr "" ...@@ -5835,6 +5853,9 @@ msgstr ""
msgid "Learn more about Web Terminal" msgid "Learn more about Web Terminal"
msgstr "" msgstr ""
msgid "Learn more about approvals."
msgstr ""
msgid "Learn more about custom project templates" msgid "Learn more about custom project templates"
msgstr "" msgstr ""
...@@ -6485,6 +6506,9 @@ msgstr "" ...@@ -6485,6 +6506,9 @@ msgstr ""
msgid "Name:" msgid "Name:"
msgstr "" msgstr ""
msgid "Naming, tags, avatar"
msgstr ""
msgid "Naming, visibility" msgid "Naming, visibility"
msgstr "" msgstr ""
...@@ -8864,6 +8888,9 @@ msgstr "" ...@@ -8864,6 +8888,9 @@ msgstr ""
msgid "Session expiration, projects limit and attachment size." msgid "Session expiration, projects limit and attachment size."
msgstr "" msgstr ""
msgid "Set a number of approvals required, the approvers and other approval settings."
msgstr ""
msgid "Set a password on your account to pull or push via %{protocol}." msgid "Set a password on your account to pull or push via %{protocol}."
msgstr "" msgstr ""
...@@ -10643,6 +10670,9 @@ msgstr "" ...@@ -10643,6 +10670,9 @@ msgstr ""
msgid "Update your group name, description, avatar, and visibility." msgid "Update your group name, description, avatar, and visibility."
msgstr "" msgstr ""
msgid "Update your project name, tags, description and avatar."
msgstr ""
msgid "Updated" msgid "Updated"
msgstr "" msgstr ""
...@@ -10928,6 +10958,9 @@ msgstr "" ...@@ -10928,6 +10958,9 @@ msgstr ""
msgid "Visibility level:" msgid "Visibility level:"
msgstr "" msgstr ""
msgid "Visibility, project features, permissions"
msgstr ""
msgid "Visibility:" msgid "Visibility:"
msgstr "" msgstr ""
......
# frozen_string_literal: true
require 'spec_helper'
describe 'Projects settings' do
set(:project) { create(:project) }
let(:user) { project.owner }
let(:panel) { find('.general-settings', match: :first) }
let(:button) { panel.find('.btn.js-settings-toggle') }
let(:title) { panel.find('.settings-title') }
before do
sign_in(user)
visit edit_project_path(project)
end
it 'can toggle sections by clicking the title or button', :js do
expect_toggle_state(:expanded)
button.click
expect_toggle_state(:collapsed)
button.click
expect_toggle_state(:expanded)
title.click
expect_toggle_state(:collapsed)
title.click
expect_toggle_state(:expanded)
end
def expect_toggle_state(state)
is_collapsed = state == :collapsed
expect(button).to have_content(is_collapsed ? 'Expand' : 'Collapse')
expect(panel[:class]).send(is_collapsed ? 'not_to' : 'to', include('expanded'))
end
end
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