Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2dbc6b05
Commit
2dbc6b05
authored
Oct 02, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename assign select to user select
parent
ca938979
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
23 deletions
+41
-23
app/assets/javascripts/boards/components/board_form.vue
app/assets/javascripts/boards/components/board_form.vue
+7
-3
app/assets/javascripts/boards/components/user_select.vue
app/assets/javascripts/boards/components/user_select.vue
+29
-19
app/assets/javascripts/boards/models/issue.js
app/assets/javascripts/boards/models/issue.js
+1
-0
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+3
-1
app/views/shared/boards/_switcher.html.haml
app/views/shared/boards/_switcher.html.haml
+1
-0
No files found.
app/assets/javascripts/boards/components/board_form.vue
View file @
2dbc6b05
...
...
@@ -81,14 +81,18 @@
</form-block>
<form-block>
<assignee-select
<user-select
any-user-text=
"Any assignee"
:board=
"board"
field-name=
"assignee_id"
label=
"Assignee"
v-model=
"board.assignee_id"
:selected=
"board.assignee"
:can-edit=
"canAdminBoard"
placeholder-text=
"Select assignee"
:project-id=
"projectId"
:group-id=
"groupId"
wrapper-class=
"assignee"
/>
</form-block>
...
...
@@ -126,7 +130,7 @@ import FormBlock from './form_block.vue';
import
BoardMilestoneSelect
from
'
./milestone_select.vue
'
;
import
BoardWeightSelect
from
'
./weight_select.vue
'
;
import
BoardLabelsSelect
from
'
./labels_select.vue
'
;
import
AssigneeSelect
from
'
./assignee
_select.vue
'
;
import
UserSelect
from
'
./user
_select.vue
'
;
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
...
...
@@ -179,12 +183,12 @@ export default Vue.extend({
};
},
components
:
{
AssigneeSelect
,
BoardLabelsSelect
,
BoardMilestoneSelect
,
BoardWeightSelect
,
FormBlock
,
PopupDialog
,
UserSelect
,
},
computed
:
{
buttonText
()
{
...
...
app/assets/javascripts/boards/components/
assignee
_select.vue
→
app/assets/javascripts/boards/components/
user
_select.vue
View file @
2dbc6b05
<
template
>
<div
class=
"block
assignee
"
>
<div
class=
"block
"
:class=
"wrapperClass
"
>
<div
class=
"title append-bottom-10"
>
Assignee
{{
label
}}
<a
v-if=
"canEdit"
class=
"js-sidebar-dropdown-toggle edit-link pull-right"
...
...
@@ -23,7 +23,7 @@
</div>
<div
class=
"media-body"
>
<div
class=
"bold author"
>
{{
selected
N
ame
}}
{{
selected
.
n
ame
}}
</div>
<div
class=
"username"
>
...
...
@@ -32,7 +32,7 @@
</div>
</div>
<div
v-else
>
Any assignee
{{
anyUserText
}}
</div>
</div>
...
...
@@ -44,17 +44,17 @@
ref=
"dropdown"
:data-field-name=
"fieldName"
data-current-user=
"true"
data-dropdown-title=
"Select assignee
"
data-any-user=
"Any assignee
"
:data-dropdown-title=
"placeholderText
"
:data-any-user=
"anyUserText
"
:data-group-id=
"groupId"
:data-project-id=
"projectId"
:data-selected=
"selected
I
d"
:data-selected=
"selected
.i
d"
data-toggle=
"dropdown"
aria-expanded=
"false"
type=
"button"
>
<span
class=
"dropdown-toggle-text"
>
Select assignee
{{
placeholderText
}}
</span>
<i
aria-hidden=
"true"
class=
"fa fa-chevron-down"
data-hidden=
"true"
></i>
</button>
<div
class=
"dropdown-menu dropdown-select dropdown-menu-paging dropdown-menu-user dropdown-menu-selectable dropdown-menu-author"
>
...
...
@@ -85,6 +85,11 @@ import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_ima
export
default
{
props
:
{
anyUserText
:
{
type
:
String
,
required
:
false
,
default
:
'
Any user
'
,
},
board
:
{
type
:
Object
,
required
:
true
,
...
...
@@ -103,6 +108,15 @@ export default {
required
:
false
,
default
:
''
,
},
label
:
{
type
:
String
,
required
:
true
,
},
placeholderText
:
{
type
:
String
,
required
:
false
,
default
:
'
Select user
'
,
},
projectId
:
{
type
:
String
,
required
:
false
,
...
...
@@ -112,28 +126,24 @@ export default {
type
:
Object
,
required
:
false
,
default
:
()
=>
({}),
}
},
data
()
{
return
{
selectedId
:
this
.
board
.
assignee_id
,
}
}
,
wrapperClass
:
{
type
:
String
,
required
:
false
,
default
:
''
,
}
,
},
components
:
{
UserAvatarImage
,
},
computed
:
{
hasValue
()
{
return
this
.
board
.
assignee_id
;
},
selectedName
()
{
return
this
.
board
.
assignee
?
this
.
board
.
assignee
.
name
:
''
;
return
this
.
selected
.
id
;
},
},
watch
:
{
board
:
{
handler
()
{
this
.
selectedId
=
this
.
board
.
assignee_id
;
this
.
$nextTick
(()
=>
{
new
UsersSelect
();
});
...
...
app/assets/javascripts/boards/models/issue.js
View file @
2dbc6b05
...
...
@@ -20,6 +20,7 @@ class ListIssue {
this
.
position
=
obj
.
relative_position
||
Infinity
;
this
.
milestone_id
=
obj
.
milestone_id
;
this
.
project_id
=
obj
.
project_id
;
this
.
weight
=
obj
.
weight
;
if
(
obj
.
project
)
{
this
.
project
=
new
IssueProject
(
obj
.
project
);
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
2dbc6b05
/* eslint-disable comma-dangle, space-before-function-paren, one-var, no-shadow, dot-notation, max-len */
/* global List */
import
_
from
'
underscore
'
;
import
Vue
from
'
vue
'
;
import
Cookies
from
'
js-cookie
'
;
import
boardsStoreEE
from
'
ee/boards/stores/boards_store_ee
'
;
import
{
getUrlParamsArray
}
from
'
../../lib/utils/common_utils
'
;
...
...
@@ -59,9 +60,10 @@ gl.issueBoards.BoardsStore = {
this
.
boardConfig
.
id
=
board
.
id
;
this
.
boardConfig
.
weight
=
board
.
weight
;
this
.
boardConfig
.
labels
=
board
.
labels
||
[];
Vue
.
set
(
this
.
boardConfig
,
'
label_ids
'
,
board
.
labels
.
map
(
b
=>
b
.
id
));
this
.
boardConfig
.
author_id
=
board
.
author_id
;
this
.
boardConfig
.
assignee_id
=
board
.
assignee_id
;
this
.
boardConfig
.
assignee
=
board
.
assignee
;
Vue
.
set
(
this
.
boardConfig
,
'
assignee
'
,
board
.
assignee
)
;
},
addList
(
listObj
,
defaultAvatar
)
{
const
list
=
new
List
(
listObj
,
defaultAvatar
);
...
...
app/views/shared/boards/_switcher.html.haml
View file @
2dbc6b05
...
...
@@ -41,4 +41,5 @@
"group-id"
=>
@group
&
.
id
,
":can-admin-board"
=>
can?
(
current_user
,
:admin_board
,
parent
),
":scoped-issue-board-feature-enabled"
=>
parent
.
feature_available?
(
:scoped_issue_board
),
"weights"
=>
Issue
.
weight_options
,
"v-if"
=>
"currentPage"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment