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
74d74f07
Commit
74d74f07
authored
Jul 29, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show Add list and Focus buttons on Group Boards
parent
951fbe6d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
25 deletions
+41
-25
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+24
-10
app/helpers/ee/form_helper.rb
app/helpers/ee/form_helper.rb
+1
-1
app/views/shared/boards/components/_board.html.haml
app/views/shared/boards/components/_board.html.haml
+3
-3
app/views/shared/boards/components/sidebar/_due_date.html.haml
...iews/shared/boards/components/sidebar/_due_date.html.haml
+3
-3
app/views/shared/issuable/_label_page_default.html.haml
app/views/shared/issuable/_label_page_default.html.haml
+4
-4
app/views/shared/issuable/_search_bar.html.haml
app/views/shared/issuable/_search_bar.html.haml
+6
-4
No files found.
app/assets/javascripts/boards/boards_bundle.js
View file @
74d74f07
...
...
@@ -143,8 +143,6 @@ $(() => {
data
:
{
modal
:
ModalStore
.
store
,
store
:
Store
.
state
,
isFullscreen
:
false
,
focusModeAvailable
:
gl
.
utils
.
convertPermissionToBoolean
(
$boardApp
.
dataset
.
focusModeAvailable
),
},
watch
:
{
disabled
()
{
...
...
@@ -180,14 +178,6 @@ $(() => {
this
.
toggleModal
(
true
);
}
},
toggleFocusMode
()
{
if
(
!
this
.
focusModeAvailable
)
{
return
;
}
$
(
this
.
$refs
.
toggleFocusModeButton
).
tooltip
(
'
hide
'
);
issueBoardsContent
.
classList
.
toggle
(
'
is-focused
'
);
this
.
isFullscreen
=
!
this
.
isFullscreen
;
},
},
mounted
()
{
this
.
updateTooltip
();
...
...
@@ -205,6 +195,30 @@ $(() => {
@click="openModal">
Add issues
</button>
</div>
`
,
});
gl
.
IssueBoardsToggleFocusBtn
=
new
Vue
({
el
:
document
.
getElementById
(
'
js-toggle-focus-btn
'
),
data
:
{
modal
:
ModalStore
.
store
,
store
:
Store
.
state
,
isFullscreen
:
false
,
focusModeAvailable
:
gl
.
utils
.
convertPermissionToBoolean
(
$boardApp
.
dataset
.
focusModeAvailable
),
},
methods
:
{
toggleFocusMode
()
{
if
(
!
this
.
focusModeAvailable
)
{
return
;
}
$
(
this
.
$refs
.
toggleFocusModeButton
).
tooltip
(
'
hide
'
);
issueBoardsContent
.
classList
.
toggle
(
'
is-focused
'
);
this
.
isFullscreen
=
!
this
.
isFullscreen
;
},
},
template
:
`
<div class="board-extra-actions">
<a
href="#"
class="btn btn-default has-tooltip prepend-left-10"
...
...
app/helpers/ee/form_helper.rb
View file @
74d74f07
...
...
@@ -3,7 +3,7 @@ module EE
def
issue_assignees_dropdown_options
options
=
super
if
@projec
t
.
feature_available?
(
:multiple_issue_assignees
)
if
current_board_paren
t
.
feature_available?
(
:multiple_issue_assignees
)
options
[
:title
]
=
'Select assignee(s)'
options
[
:data
][
:'dropdown-header'
]
=
'Assignee(s)'
options
[
:data
].
delete
(
:'max-select'
)
...
...
app/views/shared/boards/components/_board.html.haml
View file @
74d74f07
...
...
@@ -12,7 +12,7 @@
.issue-count-badge.pull-right.clearfix
{
"v-if"
=>
'list.type !== "blank"'
}
%span
.issue-count-badge-count.pull-left
{
":class"
=>
'
{
"has-btn"
:
list
.
type
!==
"closed"
&&
!
disabled
}
'
}
{{ list.issuesSize }}
-
if
can?
(
current_user
,
:admin_issue
,
@projec
t
)
-
if
can?
(
current_user
,
:admin_issue
,
current_board_paren
t
)
%button
.issue-count-badge-add-button.btn.btn-small.btn-default.has-tooltip.js-no-trigger-collapse
{
type:
"button"
,
"@click"
=>
"showNewIssueForm"
,
"v-if"
=>
'list.type !== "closed"'
,
...
...
@@ -20,7 +20,7 @@
"title"
=>
"New issue"
,
data:
{
placement:
"top"
,
container:
"body"
}
}
=
icon
(
"plus"
,
class:
"js-no-trigger-collapse"
)
-
if
can?
(
current_user
,
:admin_list
,
@projec
t
)
-
if
can?
(
current_user
,
:admin_list
,
current_board_paren
t
)
%board-delete
{
"inline-template"
=>
true
,
":list"
=>
"list"
,
"v-if"
=>
"!list.preset && list.id"
}
...
...
@@ -34,5 +34,5 @@
":issue-link-base"
=>
"issueLinkBase"
,
":root-path"
=>
"rootPath"
,
"ref"
=>
"board-list"
}
-
if
can?
(
current_user
,
:admin_list
,
@projec
t
)
-
if
can?
(
current_user
,
:admin_list
,
current_board_paren
t
)
%board-blank-state
{
"v-if"
=>
'list.id == "blank"'
}
app/views/shared/boards/components/sidebar/_due_date.html.haml
View file @
74d74f07
.block.due_date
.title
Due date
-
if
can?
(
current_user
,
:admin_issue
,
@projec
t
)
-
if
can?
(
current_user
,
:admin_issue
,
current_board_paren
t
)
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
.value
...
...
@@ -10,12 +10,12 @@
No due date
%span
.bold
{
"v-if"
=>
"issue.dueDate"
}
{{ issue.dueDate | due-date }}
-
if
can?
(
current_user
,
:admin_issue
,
@projec
t
)
-
if
can?
(
current_user
,
:admin_issue
,
current_board_paren
t
)
%span
.no-value.js-remove-due-date-holder
{
"v-if"
=>
"issue.dueDate"
}
\-
%a
.js-remove-due-date
{
href:
"#"
,
role:
"button"
}
remove due date
-
if
can?
(
current_user
,
:admin_issue
,
@projec
t
)
-
if
can?
(
current_user
,
:admin_issue
,
current_board_paren
t
)
.selectbox
%input
{
type:
"hidden"
,
name:
"issue[due_date]"
,
...
...
app/views/shared/issuable/_label_page_default.html.haml
View file @
74d74f07
...
...
@@ -12,16 +12,16 @@
label will automatically be added to the list.
=
dropdown_filter
(
filter_placeholder
)
=
dropdown_content
-
if
@projec
t
&&
show_footer
-
if
current_board_paren
t
&&
show_footer
=
dropdown_footer
do
%ul
.dropdown-footer-list
-
if
can?
(
current_user
,
:admin_label
,
@projec
t
)
-
if
can?
(
current_user
,
:admin_label
,
current_board_paren
t
)
%li
%a
.dropdown-toggle-page
{
href:
"#"
}
Create new label
%li
=
link_to
project_labels_path
(
@project
)
,
:"data-is-link"
=>
true
do
-
if
show_create
&&
@project
&&
can?
(
current_user
,
:admin_label
,
@projec
t
)
=
link_to
labels_filter_path
,
:"data-is-link"
=>
true
do
-
if
show_create
&&
can?
(
current_user
,
:admin_label
,
current_board_paren
t
)
Manage labels
-
else
View labels
...
...
app/views/shared/issuable/_search_bar.html.haml
View file @
74d74f07
...
...
@@ -116,16 +116,18 @@
=
icon
(
'times'
)
.filter-dropdown-container
-
if
type
==
:boards
-
if
can?
(
current_user
,
:admin_list
,
@projec
t
)
-
if
can?
(
current_user
,
:admin_list
,
board
.
paren
t
)
.dropdown.prepend-left-10
#js-add-list
%button
.btn.btn-create.btn-inverted.js-new-board-list
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
labels:
labels_filter_path
,
namespace_path:
@project
.
try
(
:namespace
).
try
(
:path
),
project_path:
@project
.
try
(
:path
)
}
}
%button
.btn.btn-create.btn-inverted.js-new-board-list
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
labels:
labels_filter_path
,
namespace_path:
board
.
parent
.
try
(
:namespace
).
try
(
:path
),
project_path:
@project
.
try
(
:path
),
}
}
Add list
.dropdown-menu.dropdown-menu-paging.dropdown-menu-align-right.dropdown-menu-issues-board-new.dropdown-menu-selectable
=
render
partial:
"shared/issuable/label_page_default"
,
locals:
{
show_footer:
true
,
show_create:
true
,
show_boards_content:
true
,
title:
"Add list"
}
-
if
can?
(
current_user
,
:admin_label
,
@projec
t
)
-
if
can?
(
current_user
,
:admin_label
,
board
.
paren
t
)
=
render
partial:
"shared/issuable/label_page_create"
=
dropdown_loading
#js-add-issues-btn
.prepend-left-10
-
if
@project
#js-add-issues-btn
.prepend-left-10
#js-toggle-focus-btn
.prepend-left-10
-
elsif
type
!=
:boards_modal
=
render
'shared/sort_dropdown'
...
...
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