Commit a3e57620 authored by Kushal Pandya's avatar Kushal Pandya

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

CE Update project settings section titles and info

See merge request gitlab-org/gitlab-ce!25817
parents b6e50a4e dc8ab052
- breadcrumb_title "General Settings"
- page_title "General"
- breadcrumb_title _("General Settings")
- page_title _("General")
- @content_class = "limit-container-width" unless fluid_layout
- expanded = Rails.env.test?
.project-edit-container
%section.settings.general-settings.no-animate#js-general-project-settings{ class: ('expanded' if expanded) }
.settings-header
%h4
General project
%button.btn.js-settings-toggle{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
%p
Update your project name, description, avatar, and other general settings.
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, tags, avatar')
%button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%p= _('Update your project name, tags, description and avatar.')
.settings-content
.project-edit-errors
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project" }, authenticity_token: true do |f|
......@@ -63,12 +61,10 @@
%section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded) }
.settings-header
%h4
Permissions
%button.btn.js-settings-toggle{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
%p
Enable or disable certain project features and choose access levels.
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Visibility, project features, permissions')
%button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%p= _('Choose visibility level, enable/disable project features (issues, repository, wiki, snippets) and set permissions.')
.settings-content
= 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' }
......@@ -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)] }
.settings-header
%h4
Merge request
%button.btn.js-settings-toggle{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
%p
Customize your merge request restrictions.
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests')
%button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%p= _('Choose your merge method, set up a default merge request description template.')
.settings-content
= render_if_exists 'shared/promotions/promote_mr_features'
......@@ -97,11 +91,10 @@
= 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) }
.settings-header
%h4
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
= s_('ProjectSettings|Badges')
%button.btn.js-settings-toggle{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
......@@ -111,16 +104,15 @@
.settings-content
= render 'shared/badges/badge_settings'
= render_if_exists 'projects/service_desk_settings'
= render 'export', project: @project
%section.qa-advanced-settings.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded) }
.settings-header
%h4
Advanced
%button.btn.js-settings-toggle{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
%p
Perform advanced options such as housekeeping, archiving, renaming, transferring, or removing your project.
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced')
%button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%p= _('Housekeeping, export, path, transfer, remove, archive.')
.settings-content
.sub-section
%h4 Housekeeping
......
......@@ -564,6 +564,9 @@ msgstr ""
msgid "AdminUsers|Without projects"
msgstr ""
msgid "Advanced"
msgstr ""
msgid "Advanced permissions, Large File Storage and Two-Factor authentication settings."
msgstr ""
......@@ -1446,6 +1449,12 @@ msgstr ""
msgid "Choose the top-level group for your repository imports."
msgstr ""
msgid "Choose visibility level, enable/disable project features (issues, repository, wiki, snippets) and set permissions."
msgstr ""
msgid "Choose your merge method, set up a default merge request description template."
msgstr ""
msgid "CiStatusLabel|canceled"
msgstr ""
......@@ -3621,6 +3630,9 @@ msgstr ""
msgid "General"
msgstr ""
msgid "General Settings"
msgstr ""
msgid "General pipelines"
msgstr ""
......@@ -3941,6 +3953,9 @@ msgstr ""
msgid "Housekeeping successfully started"
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."
msgstr ""
......@@ -4893,6 +4908,9 @@ msgstr ""
msgid "Name:"
msgstr ""
msgid "Naming, tags, avatar"
msgstr ""
msgid "Naming, visibility"
msgstr ""
......@@ -8186,6 +8204,9 @@ msgstr ""
msgid "Update your group name, description, avatar, and visibility."
msgstr ""
msgid "Update your project name, tags, description and avatar."
msgstr ""
msgid "Updating"
msgstr ""
......@@ -8417,6 +8438,9 @@ msgstr ""
msgid "Visibility level:"
msgstr ""
msgid "Visibility, project features, permissions"
msgstr ""
msgid "Visibility:"
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