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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
6d59795e
Commit
6d59795e
authored
Sep 15, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review changes
parent
e0e153d2
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
29 deletions
+26
-29
app/assets/javascripts/diff.js
app/assets/javascripts/diff.js
+1
-1
app/assets/javascripts/sidebar/components/lock/edit_form.vue
app/assets/javascripts/sidebar/components/lock/edit_form.vue
+17
-19
app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue
...javascripts/sidebar/components/lock/edit_form_buttons.vue
+2
-2
app/assets/stylesheets/pages/note_form.scss
app/assets/stylesheets/pages/note_form.scss
+2
-2
app/views/projects/merge_requests/show.html.haml
app/views/projects/merge_requests/show.html.haml
+1
-1
changelogs/unreleased/18608-lock-issues.yml
changelogs/unreleased/18608-lock-issues.yml
+1
-1
spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js
spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js
+1
-3
spec/javascripts/vue_shared/components/issue/issue_warning_spec.js
...scripts/vue_shared/components/issue/issue_warning_spec.js
+1
-0
No files found.
app/assets/javascripts/diff.js
View file @
6d59795e
...
@@ -18,7 +18,7 @@ class Diff {
...
@@ -18,7 +18,7 @@ class Diff {
});
});
const
tab
=
document
.
getElementById
(
'
diffs
'
);
const
tab
=
document
.
getElementById
(
'
diffs
'
);
if
(
tab
&&
tab
.
dataset
.
isLocked
===
'
false
'
)
FilesCommentButton
.
init
(
$diffFile
);
if
(
tab
&&
!
Object
.
hasOwnProperty
.
call
(
tab
.
dataset
,
'
isLocked
'
)
)
FilesCommentButton
.
init
(
$diffFile
);
$diffFile
.
each
((
index
,
file
)
=>
new
gl
.
ImageFile
(
file
));
$diffFile
.
each
((
index
,
file
)
=>
new
gl
.
ImageFile
(
file
));
...
...
app/assets/javascripts/sidebar/components/lock/edit_form.vue
View file @
6d59795e
...
@@ -38,14 +38,13 @@ export default {
...
@@ -38,14 +38,13 @@ export default {
<
template
>
<
template
>
<div
class=
"dropdown open"
>
<div
class=
"dropdown open"
>
<div
class=
"dropdown-menu sidebar-item-warning-message"
>
<div
class=
"dropdown-menu sidebar-item-warning-message"
>
<div>
<p
class=
"text"
v-if=
"isLocked"
>
<p
v-if=
"isLocked"
>
{{
__
(
`Unlock this ${issuableDisplayName(issuableType)
}
?`
)
}}
{{
__
(
`Unlock this ${issuableDisplayName(issuableType)
}
?`
)
}}
<
strong
>
{{
__
(
'
Everyone
'
)
}}
<
/strong
>
<
strong
>
{{
__
(
'
Everyone
'
)
}}
<
/strong
>
{{
__
(
'
will be able to comment.
'
)
}}
{{
__
(
'
will be able to comment.
'
)
}}
<
/p
>
<
/p
>
<
p
v
-
else
>
<
p
class
=
"
text
"
v
-
else
>
{{
__
(
`Lock this ${issuableDisplayName(issuableType)
}
? Only`
)
}}
{{
__
(
`Lock this ${issuableDisplayName(issuableType)
}
? Only`
)
}}
<
strong
>
{{
__
(
'
project members
'
)
}}
<
/strong
>
<
strong
>
{{
__
(
'
project members
'
)
}}
<
/strong
>
{{
__
(
'
will be able to comment.
'
)
}}
{{
__
(
'
will be able to comment.
'
)
}}
...
@@ -58,5 +57,4 @@ export default {
...
@@ -58,5 +57,4 @@ export default {
/>
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue
View file @
6d59795e
...
@@ -22,7 +22,7 @@ export default {
...
@@ -22,7 +22,7 @@ export default {
return
this
.
isLocked
?
this
.
__
(
'
Unlock
'
)
:
this
.
__
(
'
Lock
'
);
return
this
.
isLocked
?
this
.
__
(
'
Unlock
'
)
:
this
.
__
(
'
Lock
'
);
},
},
updateLockedBool
()
{
toggleLock
()
{
return
!
this
.
isLocked
;
return
!
this
.
isLocked
;
},
},
},
},
...
@@ -42,7 +42,7 @@ export default {
...
@@ -42,7 +42,7 @@ export default {
<button
<button
type=
"button"
type=
"button"
class=
"btn btn-close"
class=
"btn btn-close"
@
click.prevent=
"updateLockedAttribute(
updateLockedBool
)"
@
click.prevent=
"updateLockedAttribute(
toggleLock
)"
>
>
{{
buttonText
}}
{{
buttonText
}}
</button>
</button>
...
...
app/assets/stylesheets/pages/note_form.scss
View file @
6d59795e
...
@@ -122,14 +122,14 @@
...
@@ -122,14 +122,14 @@
line-height
:
1
.5
;
line-height
:
1
.5
;
padding
:
16px
;
padding
:
16px
;
p
{
.text
{
color
:
$text-color
;
color
:
$text-color
;
}
}
.sidebar-item-warning-message-actions
{
.sidebar-item-warning-message-actions
{
display
:
flex
;
display
:
flex
;
butto
n
{
.bt
n
{
flex-grow
:
1
;
flex-grow
:
1
;
}
}
}
}
...
...
app/views/projects/merge_requests/show.html.haml
View file @
6d59795e
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
#pipelines
.pipelines.tab-pane
#pipelines
.pipelines.tab-pane
-
if
@pipelines
.
any?
-
if
@pipelines
.
any?
=
render
'projects/commit/pipelines_list'
,
disable_initialization:
true
,
endpoint:
pipelines_project_merge_request_path
(
@project
,
@merge_request
)
=
render
'projects/commit/pipelines_list'
,
disable_initialization:
true
,
endpoint:
pipelines_project_merge_request_path
(
@project
,
@merge_request
)
#diffs
.diffs.tab-pane
{
data:
{
"is-locked"
=>
@merge_request
.
discussion_locked?
.
to_s
}
}
#diffs
.diffs.tab-pane
{
data:
{
"is-locked"
=>
@merge_request
.
discussion_locked?
}
}
-# This tab is always loaded via AJAX
-# This tab is always loaded via AJAX
.mr-loading-status
.mr-loading-status
...
...
changelogs/unreleased/18608-lock-issues.yml
View file @
6d59795e
---
---
title
:
Create system notes for MR too, improve doc + clean up code
title
:
Add lock feature to issue and merge request sidebar
merge_request
:
merge_request
:
author
:
author
:
type
:
added
type
:
added
spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js
View file @
6d59795e
...
@@ -10,9 +10,7 @@ describe('LockIssueSidebar', () => {
...
@@ -10,9 +10,7 @@ describe('LockIssueSidebar', () => {
const
mediator
=
{
const
mediator
=
{
service
:
{
service
:
{
update
:
()
=>
new
Promise
((
resolve
)
=>
{
update
:
Promise
.
resolve
(
true
),
resolve
(
true
);
}),
},
},
store
:
{
store
:
{
...
...
spec/javascripts/vue_shared/components/issue/issue_warning_spec.js
View file @
6d59795e
...
@@ -5,6 +5,7 @@ import mountComponent from '../../../helpers/vue_mount_component_helper';
...
@@ -5,6 +5,7 @@ import mountComponent from '../../../helpers/vue_mount_component_helper';
const
IssueWarning
=
Vue
.
extend
(
issueWarning
);
const
IssueWarning
=
Vue
.
extend
(
issueWarning
);
function
formatWarning
(
string
)
{
function
formatWarning
(
string
)
{
// Replace newlines with a space then replace multiple spaces with one space
return
string
.
trim
().
replace
(
/
\n
/g
,
'
'
).
replace
(
/
\s\s
+/g
,
'
'
);
return
string
.
trim
().
replace
(
/
\n
/g
,
'
'
).
replace
(
/
\s\s
+/g
,
'
'
);
}
}
...
...
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