Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
23332570c9
commit
71c16c702a
|
@ -50,6 +50,7 @@ export default {
|
|||
subscription_event: this.form.find('input[name="update[subscription_event]"]').val(),
|
||||
health_status: this.form.find('input[name="update[health_status]"]').val(),
|
||||
epic_id: this.form.find('input[name="update[epic_id]"]').val(),
|
||||
sprint_id: this.form.find('input[name="update[iteration_id]"]').val(),
|
||||
add_label_ids: [],
|
||||
remove_label_ids: [],
|
||||
},
|
||||
|
|
|
@ -79,6 +79,16 @@ export default class IssuableBulkUpdateSidebar {
|
|||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
if (IS_EE) {
|
||||
import('ee/vue_shared/components/sidebar/iterations_dropdown_bundle')
|
||||
.then(({ default: iterationsDropdown }) => {
|
||||
iterationsDropdown();
|
||||
})
|
||||
.catch((e) => {
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setupBulkUpdateActions() {
|
||||
|
|
|
@ -10,7 +10,7 @@ import initProjectPermissionsSettings from '../shared/permissions';
|
|||
import initProjectDeleteButton from '~/projects/project_delete_button';
|
||||
import UserCallout from '~/user_callout';
|
||||
import initServiceDesk from '~/projects/settings_service_desk';
|
||||
import mountSearchSettings from './mount_search_settings';
|
||||
import initSearchSettings from '~/search_settings';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initFilePickers();
|
||||
|
@ -32,5 +32,5 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
),
|
||||
);
|
||||
|
||||
mountSearchSettings();
|
||||
initSearchSettings();
|
||||
});
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
const mountSearchSettings = async () => {
|
||||
const el = document.querySelector('.js-search-settings-app');
|
||||
|
||||
if (el) {
|
||||
const { default: initSearch } = await import(
|
||||
/* webpackChunkName: 'search_settings' */ '~/search_settings'
|
||||
);
|
||||
initSearch({ el });
|
||||
}
|
||||
};
|
||||
|
||||
export default mountSearchSettings;
|
|
@ -1,23 +1,10 @@
|
|||
import Vue from 'vue';
|
||||
import $ from 'jquery';
|
||||
import { expandSection, closeSection } from '~/settings_panels';
|
||||
import SearchSettings from '~/search_settings/components/search_settings.vue';
|
||||
const initSearch = async () => {
|
||||
const el = document.querySelector('.js-search-settings-app');
|
||||
|
||||
const initSearch = ({ el }) =>
|
||||
new Vue({
|
||||
el,
|
||||
render: (h) =>
|
||||
h(SearchSettings, {
|
||||
ref: 'searchSettings',
|
||||
props: {
|
||||
searchRoot: document.querySelector('#content-body'),
|
||||
sectionSelector: 'section.settings',
|
||||
},
|
||||
on: {
|
||||
collapse: (section) => closeSection($(section)),
|
||||
expand: (section) => expandSection($(section)),
|
||||
},
|
||||
}),
|
||||
});
|
||||
if (el) {
|
||||
const { default: mount } = await import(/* webpackChunkName: 'search_settings' */ './mount');
|
||||
mount({ el });
|
||||
}
|
||||
};
|
||||
|
||||
export default initSearch;
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
import Vue from 'vue';
|
||||
import $ from 'jquery';
|
||||
import { expandSection, closeSection } from '~/settings_panels';
|
||||
import SearchSettings from '~/search_settings/components/search_settings.vue';
|
||||
|
||||
const mountSearch = ({ el }) =>
|
||||
new Vue({
|
||||
el,
|
||||
render: (h) =>
|
||||
h(SearchSettings, {
|
||||
ref: 'searchSettings',
|
||||
props: {
|
||||
searchRoot: document.querySelector('#content-body'),
|
||||
sectionSelector: 'section.settings',
|
||||
},
|
||||
on: {
|
||||
collapse: (section) => closeSection($(section)),
|
||||
expand: (section) => expandSection($(section)),
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
export default mountSearch;
|
|
@ -1,15 +1,14 @@
|
|||
- is_project_overview = local_assigns.fetch(:is_project_overview, false)
|
||||
|
||||
%div{ class: container_class }
|
||||
.nav-block.d-none.d-sm-flex.activities.gl-static
|
||||
= render 'shared/event_filter'
|
||||
.controls.gl-display-flex
|
||||
= link_to project_path(@project, rss_url_options), title: s_("ProjectActivityRSS|Subscribe"), class: 'btn gl-button btn-default btn-icon d-none d-sm-inline-flex has-tooltip' do
|
||||
= sprite_icon('rss', css_class: 'qa-rss-icon gl-icon')
|
||||
- if is_project_overview && can?(current_user, :download_code, @project)
|
||||
.project-clone-holder.d-none.d-md-inline-flex.gl-ml-2
|
||||
= render "projects/buttons/clone", dropdown_class: 'dropdown-menu-right'
|
||||
.nav-block.d-none.d-sm-flex.activities.gl-static
|
||||
= render 'shared/event_filter'
|
||||
.controls.gl-display-flex
|
||||
= link_to project_path(@project, rss_url_options), title: s_("ProjectActivityRSS|Subscribe"), class: 'btn gl-button btn-default btn-icon d-none d-sm-inline-flex has-tooltip' do
|
||||
= sprite_icon('rss', css_class: 'qa-rss-icon gl-icon')
|
||||
- if is_project_overview && can?(current_user, :download_code, @project)
|
||||
.project-clone-holder.d-none.d-md-inline-flex.gl-ml-2
|
||||
= render "projects/buttons/clone", dropdown_class: 'dropdown-menu-right'
|
||||
|
||||
.content_list.project-activity{ :"data-href" => activity_project_path(@project) }
|
||||
.loading
|
||||
.spinner.spinner-md
|
||||
.content_list.project-activity{ :"data-href" => activity_project_path(@project) }
|
||||
.loading
|
||||
.spinner.spinner-md
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%span.ref-name= protected_branch.name
|
||||
|
||||
- if @project.root_ref?(protected_branch.name)
|
||||
%span.badge.badge-info.d-inline default
|
||||
%span.badge.gl-badge.badge-pill.badge-info.d-inline default
|
||||
|
||||
%div
|
||||
- if protected_branch.wildcard?
|
||||
|
@ -20,4 +20,4 @@
|
|||
|
||||
- if can_admin_project
|
||||
%td
|
||||
= link_to 'Unprotect', [@project, protected_branch, { update_section: 'js-protected-branches-settings' }], disabled: local_assigns[:disabled], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning"
|
||||
= link_to 'Unprotect', [@project, protected_branch, { update_section: 'js-protected-branches-settings' }], disabled: local_assigns[:disabled], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn gl-button btn-warning"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
- type = local_assigns.fetch(:type)
|
||||
- bulk_issue_health_status_flag = type == :issues && @project&.group&.feature_available?(:issuable_health_status)
|
||||
- epic_bulk_edit_flag = @project&.group&.feature_available?(:epics) && type == :issues
|
||||
- bulk_iterations_flag = @project.feature_available?(:iterations) && @project&.group.present? && type == :issues
|
||||
|
||||
%aside.issues-bulk-update.js-right-sidebar.right-sidebar{ "aria-live" => "polite", data: { 'signed-in': current_user.present? } }
|
||||
.issuable-sidebar.hidden
|
||||
|
@ -41,6 +42,8 @@
|
|||
= _('Milestone')
|
||||
.filter-item
|
||||
= dropdown_tag(_("Select milestone"), options: { title: _("Assign milestone"), toggle_class: "js-milestone-select js-extra-options js-filter-submit js-filter-bulk-update", filter: true, dropdown_class: "dropdown-menu-selectable dropdown-menu-milestone", placeholder: _("Search milestones"), data: { show_no: true, field_name: "update[milestone_id]", project_id: @project.id, use_id: true, default_label: _("Milestone") } })
|
||||
- if bulk_iterations_flag
|
||||
= render_if_exists 'shared/iterations_dropdown', path: @project.group.full_path
|
||||
.block
|
||||
.title
|
||||
= _('Labels')
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Apply new GitLab UI for badge and button in project's protected branch settings
|
||||
merge_request: 52207
|
||||
author: Yogi (@yo)
|
||||
type: other
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Remove container_class in project activity which removes extra padding
|
||||
merge_request: 51878
|
||||
author: Yogi (@yo)
|
||||
type: fixed
|
|
@ -20,19 +20,21 @@ Only the items visible on the current page are selected for bulk editing (up to
|
|||
|
||||
## Bulk edit issues at the group level
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7249) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.1.
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/7249) in GitLab 12.1.
|
||||
> - Assigning epic ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/210470) in GitLab 13.2.
|
||||
> - Editing health status [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218395) in GitLab 13.2.
|
||||
> - Editing iteration [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196806) in GitLab 13.9.
|
||||
|
||||
NOTE:
|
||||
You need a permission level of [Reporter or higher](../../permissions.md) to manage issues.
|
||||
|
||||
When bulk editing issues in a group, you can edit the following attributes:
|
||||
|
||||
- Epic ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/210470) in
|
||||
[GitLab Premium](https://about.gitlab.com/pricing/) 13.2.) **(PREMIUM)**
|
||||
- Milestone
|
||||
- Labels
|
||||
- Health status ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218395) in
|
||||
[GitLab Ultimate](https://about.gitlab.com/pricing/) 13.2.) **(ULTIMATE)**
|
||||
- [Epic](../epics/index.md)
|
||||
- [Milestone](../../project/milestones/index.md)
|
||||
- [Labels](../../project/labels.md)
|
||||
- [Health status](../../project/issues/index.md#health-status)
|
||||
- [Iteration](../iterations/index.md)
|
||||
|
||||
To update multiple project issues at the same time:
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@ Only the items visible on the current page are selected for bulk editing (up to
|
|||
|
||||
## Bulk edit issues at the project level
|
||||
|
||||
> - Assigning epic ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/210470) in GitLab 13.2.
|
||||
> - Editing health status [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218395) in GitLab 13.2.
|
||||
> - Editing iteration [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196806) in GitLab 13.9.
|
||||
|
||||
NOTE:
|
||||
You need a permission level of [Reporter or higher](../permissions.md) to manage issues.
|
||||
|
||||
|
@ -28,13 +32,12 @@ When bulk editing issues in a project, you can edit the following attributes:
|
|||
|
||||
- Status (open/closed)
|
||||
- Assignee
|
||||
- Epic ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/210470) in
|
||||
[GitLab Premium](https://about.gitlab.com/pricing/) 13.2.) **(PREMIUM)**
|
||||
- Milestone
|
||||
- Labels
|
||||
- Health status ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/218395) in
|
||||
[GitLab Ultimate](https://about.gitlab.com/pricing/) 13.2.) **(ULTIMATE)**
|
||||
- Subscriptions
|
||||
- [Epic](../group/epics/index.md)
|
||||
- [Milestone](milestones/index.md)
|
||||
- [Labels](labels.md)
|
||||
- [Health status](issues/index.md#health-status)
|
||||
- Notification subscription
|
||||
- [Iteration](../group/iterations/index.md)
|
||||
|
||||
To update multiple project issues at the same time:
|
||||
|
||||
|
|
|
@ -25996,6 +25996,9 @@ msgstr ""
|
|||
msgid "Select health status"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select iteration"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select label"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
|
||||
import initSearch from '~/search_settings';
|
||||
import mountSearchSettings from '~/pages/projects/edit/mount_search_settings';
|
||||
|
||||
jest.mock('~/search_settings');
|
||||
|
||||
describe('pages/projects/edit/mount_search_settings', () => {
|
||||
afterEach(() => {
|
||||
resetHTMLFixture();
|
||||
});
|
||||
|
||||
it('initializes search settings when js-search-settings-app is available', async () => {
|
||||
setHTMLFixture('<div class="js-search-settings-app"></div>');
|
||||
|
||||
await mountSearchSettings();
|
||||
|
||||
expect(initSearch).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('does not initialize search settings when js-search-settings-app is unavailable', async () => {
|
||||
await mountSearchSettings();
|
||||
|
||||
expect(initSearch).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
|
@ -1,36 +1,25 @@
|
|||
import $ from 'jquery';
|
||||
import { setHTMLFixture } from 'helpers/fixtures';
|
||||
import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
|
||||
import initSearch from '~/search_settings';
|
||||
import { expandSection, closeSection } from '~/settings_panels';
|
||||
import mount from '~/search_settings/mount';
|
||||
|
||||
jest.mock('~/settings_panels');
|
||||
|
||||
describe('search_settings/index', () => {
|
||||
let app;
|
||||
|
||||
beforeEach(() => {
|
||||
const el = document.createElement('div');
|
||||
|
||||
setHTMLFixture('<div id="content-body"></div>');
|
||||
|
||||
app = initSearch({ el });
|
||||
});
|
||||
jest.mock('~/search_settings/mount');
|
||||
|
||||
describe('~/search_settings', () => {
|
||||
afterEach(() => {
|
||||
app.$destroy();
|
||||
resetHTMLFixture();
|
||||
});
|
||||
|
||||
it('calls settings_panel.onExpand when expand event is emitted', () => {
|
||||
const section = { name: 'section' };
|
||||
app.$refs.searchSettings.$emit('expand', section);
|
||||
it('initializes search settings when js-search-settings-app is available', async () => {
|
||||
setHTMLFixture('<div class="js-search-settings-app"></div>');
|
||||
|
||||
expect(expandSection).toHaveBeenCalledWith($(section));
|
||||
await initSearch();
|
||||
|
||||
expect(mount).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('calls settings_panel.closeSection when collapse event is emitted', () => {
|
||||
const section = { name: 'section' };
|
||||
app.$refs.searchSettings.$emit('collapse', section);
|
||||
it('does not initialize search settings when js-search-settings-app is unavailable', async () => {
|
||||
await initSearch();
|
||||
|
||||
expect(closeSection).toHaveBeenCalledWith($(section));
|
||||
expect(mount).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
import $ from 'jquery';
|
||||
import { setHTMLFixture } from 'helpers/fixtures';
|
||||
import mount from '~/search_settings/mount';
|
||||
import { expandSection, closeSection } from '~/settings_panels';
|
||||
|
||||
jest.mock('~/settings_panels');
|
||||
|
||||
describe('search_settings/mount', () => {
|
||||
let app;
|
||||
|
||||
beforeEach(() => {
|
||||
const el = document.createElement('div');
|
||||
|
||||
setHTMLFixture('<div id="content-body"></div>');
|
||||
|
||||
app = mount({ el });
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
app.$destroy();
|
||||
});
|
||||
|
||||
it('calls settings_panel.onExpand when expand event is emitted', () => {
|
||||
const section = { name: 'section' };
|
||||
app.$refs.searchSettings.$emit('expand', section);
|
||||
|
||||
expect(expandSection).toHaveBeenCalledWith($(section));
|
||||
});
|
||||
|
||||
it('calls settings_panel.closeSection when collapse event is emitted', () => {
|
||||
const section = { name: 'section' };
|
||||
app.$refs.searchSettings.$emit('collapse', section);
|
||||
|
||||
expect(closeSection).toHaveBeenCalledWith($(section));
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue