Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
28840d3f
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
28840d3f
编写于
11月 07, 2018
作者:
J
Jeremy Watson
提交者:
Phil Hughes
11月 07, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Copy changes for abuse clarity
上级
4a5d04fb
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
39 addition
and
16 deletion
+39
-16
app/assets/javascripts/notes/components/note_actions.vue
app/assets/javascripts/notes/components/note_actions.vue
+3
-3
app/views/abuse_reports/new.html.haml
app/views/abuse_reports/new.html.haml
+8
-4
app/views/projects/notes/_more_actions_dropdown.html.haml
app/views/projects/notes/_more_actions_dropdown.html.haml
+3
-2
locale/gitlab.pot
locale/gitlab.pot
+18
-0
spec/javascripts/notes/components/note_actions_spec.js
spec/javascripts/notes/components/note_actions_spec.js
+1
-1
spec/support/features/reportable_note_shared_examples.rb
spec/support/features/reportable_note_shared_examples.rb
+2
-2
spec/views/projects/notes/_more_actions_dropdown.html.haml_spec.rb
...s/projects/notes/_more_actions_dropdown.html.haml_spec.rb
+4
-4
未找到文件。
app/assets/javascripts/notes/components/note_actions.vue
浏览文件 @
28840d3f
...
...
@@ -248,7 +248,7 @@ export default {
<ul
class=
"dropdown-menu more-actions-dropdown dropdown-open-left"
>
<li
v-if=
"canReportAsAbuse"
>
<a
:href=
"reportAbusePath"
>
Report as abuse
{{ __('Report abuse to GitLab') }}
</a>
</li>
<li
v-if=
"noteUrl"
>
...
...
@@ -257,7 +257,7 @@ export default {
type=
"button"
class=
"btn-default btn-transparent js-btn-copy-note-link"
>
Copy link
{{ __('Copy link') }}
</button>
</li>
<li
v-if=
"canEdit"
>
...
...
@@ -266,7 +266,7 @@ export default {
type=
"button"
@
click.prevent=
"onDelete"
>
<span
class=
"text-danger"
>
Delete comment
{{ __('Delete comment') }}
</span>
</button>
</li>
...
...
app/views/abuse_reports/new.html.haml
浏览文件 @
28840d3f
-
page_title
"Report abuse"
%h3
.page-title
Report abuse
%p
Please use this form to report users who create spam issues, comments or behave inappropriately.
-
page_title
_
(
"Report abuse to GitLab"
)
%h3
.page-title
=
_
(
'Report abuse to GitLab'
)
%p
=
_
(
'Please use this form to report users to GitLab who create spam issues, comments or behave inappropriately.'
)
%p
=
_
(
"A member of GitLab's abuse team will review your report as soon as possible."
)
%hr
=
form_for
@abuse_report
,
html:
{
class:
'js-quick-submit js-requires-input'
}
do
|
f
|
=
form_errors
(
@abuse_report
)
...
...
@@ -16,7 +20,7 @@
.col-sm-10
=
f
.
text_area
:message
,
class:
"form-control"
,
rows:
2
,
required:
true
,
value:
sanitize
(
@ref_url
)
.form-text.text-muted
Explain the problem with this user. If appropriate, provide a link to the relevant issue or comment.
=
_
(
'Explain the problem. If appropriate, provide a link to the relevant issue or comment.'
)
.form-actions
=
f
.
submit
"Send report"
,
class:
"btn btn-success"
app/views/projects/notes/_more_actions_dropdown.html.haml
浏览文件 @
28840d3f
...
...
@@ -11,8 +11,9 @@
-
unless
is_current_user
%li
=
link_to
new_abuse_report_path
(
user_id:
note
.
author
.
id
,
ref_url:
noteable_note_url
(
note
))
do
Report as abuse
=
_
(
'Report abuse to GitLab'
)
-
if
note_editable
%li
=
link_to
note_url
(
note
),
method: :delete
,
data:
{
confirm:
'Are you sure you want to delete this comment?'
},
remote:
true
,
class:
'js-note-delete'
do
%span
.text-danger
Delete comment
%span
.text-danger
=
_
(
'Delete comment'
)
locale/gitlab.pot
浏览文件 @
28840d3f
...
...
@@ -264,6 +264,9 @@ msgstr ""
msgid "A deleted user"
msgstr ""
msgid "A member of GitLab's abuse team will review your report as soon as possible."
msgstr ""
msgid "A new branch will be created in your fork and a new merge request will be started."
msgstr ""
...
...
@@ -1980,6 +1983,9 @@ msgstr ""
msgid "Copy file path to clipboard"
msgstr ""
msgid "Copy link"
msgstr ""
msgid "Copy reference to clipboard"
msgstr ""
...
...
@@ -2199,6 +2205,9 @@ msgstr ""
msgid "Delete Snippet"
msgstr ""
msgid "Delete comment"
msgstr ""
msgid "Delete list"
msgstr ""
...
...
@@ -2735,6 +2744,9 @@ msgstr ""
msgid "Expiration date"
msgstr ""
msgid "Explain the problem. If appropriate, provide a link to the relevant issue or comment."
msgstr ""
msgid "Explore"
msgstr ""
...
...
@@ -4599,6 +4611,9 @@ msgstr ""
msgid "Please try again"
msgstr ""
msgid "Please use this form to report users to GitLab who create spam issues, comments or behave inappropriately."
msgstr ""
msgid "Please wait while we import the repository for you. Refresh at will."
msgstr ""
...
...
@@ -5168,6 +5183,9 @@ msgstr ""
msgid "Reply to this email directly or %{view_it_on_gitlab}."
msgstr ""
msgid "Report abuse to GitLab"
msgstr ""
msgid "Reporting"
msgstr ""
...
...
spec/javascripts/notes/components/note_actions_spec.js
浏览文件 @
28840d3f
...
...
@@ -55,7 +55,7 @@ describe('issue_note_actions component', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-note-edit
'
)).
toBeDefined
();
});
it
(
'
should be possible to report a
s abuse
'
,
()
=>
{
it
(
'
should be possible to report a
buse to GitLab
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
`a[href="
${
props
.
reportAbusePath
}
"]`
)).
toBeDefined
();
});
...
...
spec/support/features/reportable_note_shared_examples.rb
浏览文件 @
28840d3f
...
...
@@ -20,7 +20,7 @@ shared_examples 'reportable note' do |type|
dropdown
=
comment
.
find
(
more_actions_selector
)
open_dropdown
(
dropdown
)
expect
(
dropdown
).
to
have_link
(
'Report a
s abuse
'
,
href:
abuse_report_path
)
expect
(
dropdown
).
to
have_link
(
'Report a
buse to GitLab
'
,
href:
abuse_report_path
)
if
type
==
'issue'
||
type
==
'merge_request'
expect
(
dropdown
).
to
have_button
(
'Delete comment'
)
...
...
@@ -33,7 +33,7 @@ shared_examples 'reportable note' do |type|
dropdown
=
comment
.
find
(
more_actions_selector
)
open_dropdown
(
dropdown
)
dropdown
.
click_link
(
'Report a
s abuse
'
)
dropdown
.
click_link
(
'Report a
buse to GitLab
'
)
expect
(
find
(
'#user_name'
)[
'value'
]).
to
match
(
note
.
author
.
username
)
expect
(
find
(
'#abuse_report_message'
)[
'value'
]).
to
match
(
noteable_note_url
(
note
))
...
...
spec/views/projects/notes/_more_actions_dropdown.html.haml_spec.rb
浏览文件 @
28840d3f
...
...
@@ -12,10 +12,10 @@ describe 'projects/notes/_more_actions_dropdown' do
assign
(
:project
,
project
)
end
it
'shows Report a
s abuse
button if not editable and not current users comment'
do
it
'shows Report a
buse to GitLab
button if not editable and not current users comment'
do
render
'projects/notes/more_actions_dropdown'
,
current_user:
not_author_user
,
note_editable:
false
,
note:
note
expect
(
rendered
).
to
have_link
(
'Report a
s abuse
'
)
expect
(
rendered
).
to
have_link
(
'Report a
buse to GitLab
'
)
end
it
'does not show the More actions button if not editable and current users comment'
do
...
...
@@ -24,10 +24,10 @@ describe 'projects/notes/_more_actions_dropdown' do
expect
(
rendered
).
not_to
have_selector
(
'.dropdown.more-actions'
)
end
it
'shows Report a
s abuse
and Delete buttons if editable and not current users comment'
do
it
'shows Report a
buse to GitLab
and Delete buttons if editable and not current users comment'
do
render
'projects/notes/more_actions_dropdown'
,
current_user:
not_author_user
,
note_editable:
true
,
note:
note
expect
(
rendered
).
to
have_link
(
'Report a
s abuse
'
)
expect
(
rendered
).
to
have_link
(
'Report a
buse to GitLab
'
)
expect
(
rendered
).
to
have_link
(
'Delete comment'
)
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录