Commit 7c4d25a4 authored by Clement Ho's avatar Clement Ho

Fix CE conflicts from master

parent d0ddfcd0
...@@ -54,10 +54,6 @@ export default class FileTemplateSelector { ...@@ -54,10 +54,6 @@ export default class FileTemplateSelector {
reportSelection(options) { reportSelection(options) {
const { query, e, data } = options; const { query, e, data } = options;
<<<<<<< HEAD
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
e.preventDefault(); e.preventDefault();
return this.mediator.selectTemplateFile(this, query, data); return this.mediator.selectTemplateFile(this, query, data);
} }
......
...@@ -64,11 +64,8 @@ $(() => { ...@@ -64,11 +64,8 @@ $(() => {
rootPath: $boardApp.dataset.rootPath, rootPath: $boardApp.dataset.rootPath,
bulkUpdatePath: $boardApp.dataset.bulkUpdatePath, bulkUpdatePath: $boardApp.dataset.bulkUpdatePath,
detailIssue: Store.detail, detailIssue: Store.detail,
<<<<<<< HEAD
milestoneTitle: $boardApp.dataset.boardMilestoneTitle, milestoneTitle: $boardApp.dataset.boardMilestoneTitle,
=======
defaultAvatar: $boardApp.dataset.defaultAvatar, defaultAvatar: $boardApp.dataset.defaultAvatar,
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
}, },
computed: { computed: {
detailIssueVisible () { detailIssueVisible () {
......
...@@ -157,11 +157,7 @@ gl.issueBoards.IssueCardInner = Vue.extend({ ...@@ -157,11 +157,7 @@ gl.issueBoards.IssueCardInner = Vue.extend({
> >
<img <img
class="avatar avatar-inline s20" class="avatar avatar-inline s20"
<<<<<<< HEAD
:src="assignee.avatarUrl"
=======
:src="assignee.avatar" :src="assignee.avatar"
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
width="20" width="20"
height="20" height="20"
:alt="avatarUrlTitle(assignee)" :alt="avatarUrlTitle(assignee)"
......
...@@ -5,7 +5,7 @@ class ListAssignee { ...@@ -5,7 +5,7 @@ class ListAssignee {
this.id = user.id; this.id = user.id;
this.name = user.name; this.name = user.name;
this.username = user.username; this.username = user.username;
this.avatarUrl = user.avatar_url; this.avatar = user.avatar_url;
} }
} }
......
...@@ -17,10 +17,7 @@ class ListIssue { ...@@ -17,10 +17,7 @@ class ListIssue {
this.assignees = []; this.assignees = [];
this.selected = false; this.selected = false;
this.position = obj.relative_position || Infinity; this.position = obj.relative_position || Infinity;
<<<<<<< HEAD
this.milestone_id = obj.milestone_id; this.milestone_id = obj.milestone_id;
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
if (obj.milestone) { if (obj.milestone) {
this.milestone = new ListMilestone(obj.milestone); this.milestone = new ListMilestone(obj.milestone);
...@@ -30,11 +27,7 @@ class ListIssue { ...@@ -30,11 +27,7 @@ class ListIssue {
this.labels.push(new ListLabel(label)); this.labels.push(new ListLabel(label));
}); });
<<<<<<< HEAD
this.assignees = obj.assignees.map(a => new ListAssignee(a));
=======
this.assignees = obj.assignees.map(a => new ListAssignee(a, defaultAvatar)); this.assignees = obj.assignees.map(a => new ListAssignee(a, defaultAvatar));
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
} }
addLabel (label) { addLabel (label) {
......
...@@ -23,18 +23,13 @@ gl.issueBoards.BoardsStore = { ...@@ -23,18 +23,13 @@ gl.issueBoards.BoardsStore = {
this.state.lists = []; this.state.lists = [];
this.filter.path = gl.utils.getUrlParamsArray().join('&'); this.filter.path = gl.utils.getUrlParamsArray().join('&');
}, },
<<<<<<< HEAD
createNewListDropdownData() { createNewListDropdownData() {
this.state.currentBoard = {}; this.state.currentBoard = {};
this.state.currentPage = ''; this.state.currentPage = '';
this.state.reload = false; this.state.reload = false;
}, },
addList (listObj) {
const list = new List(listObj);
=======
addList (listObj, defaultAvatar) { addList (listObj, defaultAvatar) {
const list = new List(listObj, defaultAvatar); const list = new List(listObj, defaultAvatar);
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
this.state.lists.push(list); this.state.lists.push(list);
return list; return list;
......
...@@ -53,12 +53,9 @@ import UserCallout from './user_callout'; ...@@ -53,12 +53,9 @@ import UserCallout from './user_callout';
import { ProtectedTagCreate, ProtectedTagEditList } from './protected_tags'; import { ProtectedTagCreate, ProtectedTagEditList } from './protected_tags';
import ShortcutsWiki from './shortcuts_wiki'; import ShortcutsWiki from './shortcuts_wiki';
import BlobViewer from './blob/viewer/index'; import BlobViewer from './blob/viewer/index';
<<<<<<< HEAD
import GeoNodes from './geo_nodes'; import GeoNodes from './geo_nodes';
import ServiceDeskRoot from './projects/settings_service_desk/service_desk_root'; import ServiceDeskRoot from './projects/settings_service_desk/service_desk_root';
=======
import AutoWidthDropdownSelect from './issuable/auto_width_dropdown_select'; import AutoWidthDropdownSelect from './issuable/auto_width_dropdown_select';
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
const ShortcutsBlob = require('./shortcuts_blob'); const ShortcutsBlob = require('./shortcuts_blob');
......
...@@ -13,17 +13,13 @@ class FilteredSearchManager { ...@@ -13,17 +13,13 @@ class FilteredSearchManager {
this.tokensContainer = this.container.querySelector('.tokens-container'); this.tokensContainer = this.container.querySelector('.tokens-container');
this.filteredSearchTokenKeys = gl.FilteredSearchTokenKeys; this.filteredSearchTokenKeys = gl.FilteredSearchTokenKeys;
<<<<<<< HEAD
if (page === 'issues' || page === 'boards') { if (page === 'issues' || page === 'boards') {
this.filteredSearchTokenKeys = gl.FilteredSearchTokenKeysWithWeights; this.filteredSearchTokenKeys = gl.FilteredSearchTokenKeysWithWeights;
} }
this.recentSearchesStore = new RecentSearchesStore();
=======
this.recentSearchesStore = new RecentSearchesStore({ this.recentSearchesStore = new RecentSearchesStore({
isLocalStorageAvailable: RecentSearchesService.isAvailable(), isLocalStorageAvailable: RecentSearchesService.isAvailable(),
}); });
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
let recentSearchesKey = 'issue-recent-searches'; let recentSearchesKey = 'issue-recent-searches';
if (page === 'merge_requests') { if (page === 'merge_requests') {
recentSearchesKey = 'merge-request-recent-searches'; recentSearchesKey = 'merge-request-recent-searches';
......
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
return $el.text(); return $el.text();
}, },
clicked: (options) => { clicked: (options) => {
<<<<<<< HEAD
const $link = options.$el; const $link = options.$el;
if (!$link.data('revert')) { if (!$link.data('revert')) {
...@@ -60,9 +59,6 @@ ...@@ -60,9 +59,6 @@
$dateInput.enable(); $dateInput.enable();
}); });
} }
=======
this.formSubmit(null, options.$el);
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
}, },
}); });
}); });
......
...@@ -126,7 +126,6 @@ ...@@ -126,7 +126,6 @@
return $value.css('display', ''); return $value.css('display', '');
}, },
vue: $dropdown.hasClass('js-issue-board-sidebar'), vue: $dropdown.hasClass('js-issue-board-sidebar'),
<<<<<<< HEAD
hideRow: function(milestone) { hideRow: function(milestone) {
if ($('html').hasClass('issue-boards-page') && !$dropdown.hasClass('js-issue-board-sidebar') && if ($('html').hasClass('issue-boards-page') && !$dropdown.hasClass('js-issue-board-sidebar') &&
!$dropdown.closest('.add-issues-modal').length && gl.issueBoards.BoardsStore.state.currentBoard.milestone) { !$dropdown.closest('.add-issues-modal').length && gl.issueBoards.BoardsStore.state.currentBoard.milestone) {
...@@ -143,8 +142,6 @@ ...@@ -143,8 +142,6 @@
return true; return true;
}, },
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
clicked: function(options) { clicked: function(options) {
const { $el, e } = options; const { $el, e } = options;
let selected = options.selectedObj; let selected = options.selectedObj;
......
...@@ -54,12 +54,8 @@ ...@@ -54,12 +54,8 @@
} }
}, },
clicked(opts) { clicked(opts) {
<<<<<<< HEAD
const { $el, e } = opts; const { $el, e } = opts;
const item = opts.selectedObj; const item = opts.selectedObj;
=======
const { e } = opts;
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
e.preventDefault(); e.preventDefault();
......
...@@ -84,11 +84,7 @@ export default { ...@@ -84,11 +84,7 @@ export default {
return !this.showLess || (index < this.defaultRenderCount && this.showLess); return !this.showLess || (index < this.defaultRenderCount && this.showLess);
}, },
avatarUrl(user) { avatarUrl(user) {
<<<<<<< HEAD
return user.avatarUrl || user.avatar_url;
=======
return user.avatar || user.avatar_url; return user.avatar || user.avatar_url;
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
}, },
assigneeUrl(user) { assigneeUrl(user) {
return `${this.rootPath}${user.username}`; return `${this.rootPath}${user.username}`;
......
...@@ -33,23 +33,12 @@ export default { ...@@ -33,23 +33,12 @@ export default {
saveAssignees() { saveAssignees() {
this.loading = true; this.loading = true;
<<<<<<< HEAD
this.mediator.saveAssignees(this.field) this.mediator.saveAssignees(this.field)
.then(() => { .then(() => {
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
=======
function setLoadingFalse() {
this.loading = false;
}
this.mediator.saveAssignees(this.field)
.then(setLoadingFalse.bind(this))
.catch(() => {
setLoadingFalse();
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
return new Flash('Error occurred when saving assignees'); return new Flash('Error occurred when saving assignees');
}); });
}, },
......
...@@ -17,17 +17,6 @@ export default { ...@@ -17,17 +17,6 @@ export default {
}, },
methods: { methods: {
listenForSlashCommands() { listenForSlashCommands() {
<<<<<<< HEAD
$(document).on('ajax:success', '.gfm-form', (e, data) => {
const subscribedCommands = ['spend_time', 'time_estimate'];
const changedCommands = data.commands_changes
? Object.keys(data.commands_changes)
: [];
if (changedCommands && _.intersection(subscribedCommands, changedCommands).length) {
this.mediator.fetch();
}
});
=======
$(document).on('ajax:success', '.gfm-form', this.slashCommandListened); $(document).on('ajax:success', '.gfm-form', this.slashCommandListened);
}, },
slashCommandListened(e, data) { slashCommandListened(e, data) {
...@@ -43,7 +32,6 @@ export default { ...@@ -43,7 +32,6 @@ export default {
if (changedCommands && _.intersection(subscribedCommands, changedCommands).length) { if (changedCommands && _.intersection(subscribedCommands, changedCommands).length) {
this.mediator.fetch(); this.mediator.fetch();
} }
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
}, },
}, },
mounted() { mounted() {
......
...@@ -4,11 +4,7 @@ import sidebarAssignees from './components/assignees/sidebar_assignees'; ...@@ -4,11 +4,7 @@ import sidebarAssignees from './components/assignees/sidebar_assignees';
import Mediator from './sidebar_mediator'; import Mediator from './sidebar_mediator';
<<<<<<< HEAD
document.addEventListener('DOMContentLoaded', () => {
=======
function domContentLoaded() { function domContentLoaded() {
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
const mediator = new Mediator(gl.sidebarOptions); const mediator = new Mediator(gl.sidebarOptions);
mediator.fetch(); mediator.fetch();
...@@ -21,13 +17,8 @@ function domContentLoaded() { ...@@ -21,13 +17,8 @@ function domContentLoaded() {
} }
new Vue(sidebarTimeTracking).$mount('#issuable-time-tracker'); new Vue(sidebarTimeTracking).$mount('#issuable-time-tracker');
<<<<<<< HEAD
});
=======
} }
document.addEventListener('DOMContentLoaded', domContentLoaded); document.addEventListener('DOMContentLoaded', domContentLoaded);
export default domContentLoaded; export default domContentLoaded;
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
...@@ -30,13 +30,8 @@ export default class SidebarMediator { ...@@ -30,13 +30,8 @@ export default class SidebarMediator {
this.service.get() this.service.get()
.then((response) => { .then((response) => {
const data = response.json(); const data = response.json();
<<<<<<< HEAD
this.store.processAssigneeData(data);
this.store.processTimeTrackingData(data);
=======
this.store.setAssigneeData(data); this.store.setAssigneeData(data);
this.store.setTimeTrackingData(data); this.store.setTimeTrackingData(data);
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
}) })
.catch(() => new Flash('Error occured when fetching sidebar data')); .catch(() => new Flash('Error occured when fetching sidebar data'));
} }
......
...@@ -17,21 +17,13 @@ export default class SidebarStore { ...@@ -17,21 +17,13 @@ export default class SidebarStore {
return SidebarStore.singleton; return SidebarStore.singleton;
} }
<<<<<<< HEAD
processAssigneeData(data) {
=======
setAssigneeData(data) { setAssigneeData(data) {
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
if (data.assignees) { if (data.assignees) {
this.assignees = data.assignees; this.assignees = data.assignees;
} }
} }
<<<<<<< HEAD
processTimeTrackingData(data) {
=======
setTimeTrackingData(data) { setTimeTrackingData(data) {
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
this.timeEstimate = data.time_estimate; this.timeEstimate = data.time_estimate;
this.totalTimeSpent = data.total_time_spent; this.totalTimeSpent = data.total_time_spent;
this.humanTimeEstimate = data.human_time_estimate; this.humanTimeEstimate = data.human_time_estimate;
......
...@@ -284,18 +284,10 @@ ...@@ -284,18 +284,10 @@
.avatar-counter { .avatar-counter {
display: none; display: none;
vertical-align: middle; vertical-align: middle;
<<<<<<< HEAD
line-height: 18px; line-height: 18px;
height: 20px; height: 20px;
padding-left: 3px; padding-left: 3px;
padding-right: 3px; padding-right: 3px;
=======
min-width: 20px;
line-height: 19px;
height: 20px;
padding-left: 2px;
padding-right: 2px;
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
border-radius: 2em; border-radius: 2em;
} }
......
...@@ -450,10 +450,6 @@ ...@@ -450,10 +450,6 @@
margin: -5px; margin: -5px;
} }
<<<<<<< HEAD
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
.user-list { .user-list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
......
...@@ -8,10 +8,7 @@ ...@@ -8,10 +8,7 @@
- if current_user - if current_user
:javascript :javascript
window.uploads_path = "#{namespace_project_uploads_path project.namespace,project}"; window.uploads_path = "#{namespace_project_uploads_path project.namespace,project}";
<<<<<<< HEAD
window.preview_markdown_path = "#{preview_markdown_path(project)}"; window.preview_markdown_path = "#{preview_markdown_path(project)}";
=======
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
- content_for :header_content do - content_for :header_content do
.js-dropdown-menu-projects .js-dropdown-menu-projects
......
...@@ -16,11 +16,7 @@ ...@@ -16,11 +16,7 @@
"v-if" => "issue.assignees", "v-if" => "issue.assignees",
"v-for" => "assignee in issue.assignees" } "v-for" => "assignee in issue.assignees" }
.dropdown .dropdown
<<<<<<< HEAD
%button.dropdown-menu-toggle.js-user-search.js-author-search.js-multiselect.js-save-user-data.js-issue-board-sidebar{ type: "button", ref: "assigneeDropdown", data: { toggle: "dropdown", field_name: "issue[assignee_ids][]", first_user: (current_user.username if current_user), current_user: "true", project_id: @project.id, null_user: "true", multi_select: "true", dropdown: { header: 'Assignee(s)'} }, %button.dropdown-menu-toggle.js-user-search.js-author-search.js-multiselect.js-save-user-data.js-issue-board-sidebar{ type: "button", ref: "assigneeDropdown", data: { toggle: "dropdown", field_name: "issue[assignee_ids][]", first_user: (current_user.username if current_user), current_user: "true", project_id: @project.id, null_user: "true", multi_select: "true", dropdown: { header: 'Assignee(s)'} },
=======
%button.dropdown-menu-toggle.js-user-search.js-author-search.js-multiselect.js-save-user-data.js-issue-board-sidebar{ type: "button", ref: "assigneeDropdown", data: { toggle: "dropdown", field_name: "issue[assignee_ids][]", first_user: (current_user.username if current_user), current_user: "true", project_id: @project.id, null_user: "true", multi_select: "true", 'max-select' => 1, dropdown: { header: 'Assignee' } },
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
":data-issuable-id" => "issue.id", ":data-issuable-id" => "issue.id",
":data-selected" => "assigneeId", ":data-selected" => "assigneeId",
":data-issue-update" => "'#{namespace_project_issues_path(@project.namespace, @project)}/' + issue.id + '.json'" } ":data-issue-update" => "'#{namespace_project_issues_path(@project.namespace, @project)}/' + issue.id + '.json'" }
......
...@@ -50,11 +50,7 @@ ...@@ -50,11 +50,7 @@
= link_to 'Edit', edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'hidden-xs hidden-sm btn btn-grouped issuable-edit' = link_to 'Edit', edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'hidden-xs hidden-sm btn btn-grouped issuable-edit'
.issue-details.issuable-details .issue-details.issuable-details
<<<<<<< HEAD
.detail-page-description.content-block{ class: ('hide-bottom-border' unless @issue.description.present? ) } .detail-page-description.content-block{ class: ('hide-bottom-border' unless @issue.description.present? ) }
=======
.detail-page-description.content-block
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
.issue-title-data.hidden{ "data" => { "endpoint" => rendered_title_namespace_project_issue_path(@project.namespace, @project, @issue), .issue-title-data.hidden{ "data" => { "endpoint" => rendered_title_namespace_project_issue_path(@project.namespace, @project, @issue),
"can-update-tasks-class" => can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '', "can-update-tasks-class" => can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '',
} } } }
......
...@@ -24,22 +24,15 @@ ...@@ -24,22 +24,15 @@
.col-md-10 .col-md-10
.merge_access_levels-container .merge_access_levels-container
= dropdown_tag('Select', = dropdown_tag('Select',
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-merge js-multiselect wide', options: { toggle_class: 'js-allowed-to-merge js-multiselect wide',
dropdown_class: 'dropdown-menu-user dropdown-menu-selectable capitalize-header', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable capitalize-header', filter: true,
data: { input_id: 'merge_access_levels_attributes', default_label: 'Select' } }) data: { input_id: 'merge_access_levels_attributes', default_label: 'Select' } })
=======
options: { toggle_class: 'js-allowed-to-merge wide',
dropdown_class: 'dropdown-menu-selectable capitalize-header',
data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes' }})
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
.form-group .form-group
%label.col-md-2.text-right{ for: 'push_access_levels_attributes' } %label.col-md-2.text-right{ for: 'push_access_levels_attributes' }
Allowed to push: Allowed to push:
.col-md-10 .col-md-10
.push_access_levels-container .push_access_levels-container
= dropdown_tag('Select', = dropdown_tag('Select',
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-push js-multiselect wide', options: { toggle_class: 'js-allowed-to-push js-multiselect wide',
dropdown_class: 'dropdown-menu-user dropdown-menu-selectable capitalize-header', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable capitalize-header', filter: true,
data: { input_id: 'push_access_levels_attributes', default_label: 'Select' } }) data: { input_id: 'push_access_levels_attributes', default_label: 'Select' } })
...@@ -47,11 +40,6 @@ ...@@ -47,11 +40,6 @@
Only groups that Only groups that
= link_to 'have this project shared', help_page_path('workflow/share_projects_with_other_groups') = link_to 'have this project shared', help_page_path('workflow/share_projects_with_other_groups')
can be added here can be added here
=======
options: { toggle_class: 'js-allowed-to-push wide',
dropdown_class: 'dropdown-menu-selectable capitalize-header',
data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes' }})
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
.panel-footer .panel-footer
= f.submit 'Protect', class: 'btn-create btn', disabled: true = f.submit 'Protect', class: 'btn-create btn', disabled: true
%td %td
= hidden_field_tag "allowed_to_merge_#{protected_branch.id}", protected_branch.merge_access_levels.first.access_level = hidden_field_tag "allowed_to_merge_#{protected_branch.id}", protected_branch.merge_access_levels.first.access_level
= dropdown_tag( (protected_branch.merge_access_levels.first.humanize || 'Select') , = dropdown_tag( (protected_branch.merge_access_levels.first.humanize || 'Select') ,
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header', options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header',
=======
options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header',
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
data: { field_name: "allowed_to_merge_#{protected_branch.id}", access_level_id: protected_branch.merge_access_levels.first.id }}) data: { field_name: "allowed_to_merge_#{protected_branch.id}", access_level_id: protected_branch.merge_access_levels.first.id }})
%td %td
= hidden_field_tag "allowed_to_push_#{protected_branch.id}", protected_branch.push_access_levels.first.access_level = hidden_field_tag "allowed_to_push_#{protected_branch.id}", protected_branch.push_access_levels.first.access_level
= dropdown_tag( (protected_branch.push_access_levels.first.humanize || 'Select') , = dropdown_tag( (protected_branch.push_access_levels.first.humanize || 'Select') ,
<<<<<<< HEAD
options: { toggle_class: 'js-allowed-to-push', dropdown_class: 'dropdown-menu-selectable js-allowed-to-push-container capitalize-header', options: { toggle_class: 'js-allowed-to-push', dropdown_class: 'dropdown-menu-selectable js-allowed-to-push-container capitalize-header',
=======
options: { toggle_class: 'js-allowed-to-push', dropdown_class: 'dropdown-menu-selectable js-allowed-to-push-container capitalize-header',
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
data: { field_name: "allowed_to_push_#{protected_branch.id}", access_level_id: protected_branch.push_access_levels.first.id }}) data: { field_name: "allowed_to_push_#{protected_branch.id}", access_level_id: protected_branch.push_access_levels.first.id }})
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
.selectbox.hide-collapsed .selectbox.hide-collapsed
- issuable.assignees.each do |assignee| - issuable.assignees.each do |assignee|
= hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", assignee.id, id: nil = hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", assignee.id, id: nil
<<<<<<< HEAD
- options = { toggle_class: 'js-user-search js-author-search', title: 'Assign to', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author', placeholder: 'Search users', data: { first_user: (current_user.username if current_user), current_user: true, project_id: (@project.id if @project), author_id: issuable.author_id, field_name: "#{issuable.to_ability_name}[assignee_id]", issue_update: issuable_json_path(issuable), ability_name: issuable.to_ability_name, null_user: true } } - options = { toggle_class: 'js-user-search js-author-search', title: 'Assign to', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author', placeholder: 'Search users', data: { first_user: (current_user.username if current_user), current_user: true, project_id: (@project.id if @project), author_id: issuable.author_id, field_name: "#{issuable.to_ability_name}[assignee_id]", issue_update: issuable_json_path(issuable), ability_name: issuable.to_ability_name, null_user: true } }
...@@ -60,25 +59,11 @@ ...@@ -60,25 +59,11 @@
- if issuable.assignees.length == 0 - if issuable.assignees.length == 0
= hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", 0, id: nil = hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", 0, id: nil
- title = 'Select assignee(s)' - title = 'Select assignee(s)'
=======
- options = { toggle_class: 'js-user-search js-author-search', title: 'Assign to', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author', placeholder: 'Search users', data: { first_user: (current_user.username if current_user), current_user: true, project_id: (@project.id if @project), author_id: issuable.author_id, field_name: "#{issuable.to_ability_name}[assignee_ids][]", issue_update: issuable_json_path(issuable), ability_name: issuable.to_ability_name, null_user: true } }
- if issuable.instance_of?(Issue)
- if issuable.assignees.length == 0
= hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", 0, id: nil
- title = 'Select assignee'
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
- options[:toggle_class] += ' js-multiselect js-save-user-data' - options[:toggle_class] += ' js-multiselect js-save-user-data'
- options[:data][:field_name] = "#{issuable.to_ability_name}[assignee_ids][]" - options[:data][:field_name] = "#{issuable.to_ability_name}[assignee_ids][]"
- options[:data][:multi_select] = true - options[:data][:multi_select] = true
- options[:data]['dropdown-title'] = title - options[:data]['dropdown-title'] = title
<<<<<<< HEAD
- options[:data]['dropdown-header'] = 'Assignee(s)' - options[:data]['dropdown-header'] = 'Assignee(s)'
=======
- options[:data]['dropdown-header'] = 'Assignee'
- options[:data]['max-select'] = 1
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
- else - else
- title = 'Select assignee' - title = 'Select assignee'
......
...@@ -20,11 +20,7 @@ ...@@ -20,11 +20,7 @@
- if issuable.assignees.length === 0 - if issuable.assignees.length === 0
= hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", 0, id: nil, data: { meta: '' } = hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", 0, id: nil, data: { meta: '' }
<<<<<<< HEAD
= dropdown_tag(users_dropdown_label(issuable.assignees), options: issue_dropdown_options(issuable, true)) = dropdown_tag(users_dropdown_label(issuable.assignees), options: issue_dropdown_options(issuable, true))
=======
= dropdown_tag(users_dropdown_label(issuable.assignees), options: issue_dropdown_options(issuable,false))
>>>>>>> 6ce1df41e175c7d62ca760b1e66cf1bf86150284
= link_to 'Assign to me', '#', class: "assign-to-me-link #{'hide' if issuable.assignees.include?(current_user)}" = link_to 'Assign to me', '#', class: "assign-to-me-link #{'hide' if issuable.assignees.include?(current_user)}"
- else - else
= form.label :assignee_id, "Assignee", class: "control-label #{"col-lg-4" if has_due_date}" = form.label :assignee_id, "Assignee", class: "control-label #{"col-lg-4" if has_due_date}"
......
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