Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
5ad4be29
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,发现更多精彩内容 >>
提交
5ad4be29
编写于
3月 28, 2013
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove notify checkboxes from note forms
上级
70947fed
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
30 deletion
+12
-30
app/assets/stylesheets/sections/notes.scss
app/assets/stylesheets/sections/notes.scss
+11
-2
app/contexts/notes/create_context.rb
app/contexts/notes/create_context.rb
+0
-2
app/models/note.rb
app/models/note.rb
+0
-11
app/views/notes/_form.html.haml
app/views/notes/_form.html.haml
+1
-10
app/views/walls/show.html.haml
app/views/walls/show.html.haml
+0
-5
未找到文件。
app/assets/stylesheets/sections/notes.scss
浏览文件 @
5ad4be29
...
...
@@ -274,6 +274,15 @@ ul.notes {
}
.common-note-form
{
margin
:
0
;
height
:
140px
;
background
:
#F9F9F9
;
padding
:
3px
;
padding-bottom
:
25px
;
border
:
1px
solid
#DDD
;
}
.note-form-actions
{
background
:
#F9F9F9
;
...
...
@@ -281,8 +290,8 @@ ul.notes {
padding
:
0
5px
;
.note-form-option
{
margin-top
:
8
px
;
margin-left
:
15
px
;
margin-top
:
10
px
;
margin-left
:
30
px
;
@extend
.pull-left
;
}
...
...
app/contexts/notes/create_context.rb
浏览文件 @
5ad4be29
...
...
@@ -3,8 +3,6 @@ module Notes
def
execute
note
=
project
.
notes
.
new
(
params
[
:note
])
note
.
author
=
current_user
note
.
notify
=
params
[
:notify
].
present?
note
.
notify_author
=
params
[
:notify_author
].
present?
note
.
save
note
end
...
...
app/models/note.rb
浏览文件 @
5ad4be29
...
...
@@ -22,9 +22,6 @@ class Note < ActiveRecord::Base
attr_accessible
:note
,
:noteable
,
:noteable_id
,
:noteable_type
,
:project_id
,
:attachment
,
:line_code
,
:commit_id
attr_accessor
:notify
attr_accessor
:notify_author
belongs_to
:project
belongs_to
:noteable
,
polymorphic:
true
belongs_to
:author
,
class_name:
"User"
...
...
@@ -143,14 +140,6 @@ class Note < ActiveRecord::Base
nil
end
def
notify
@notify
||=
false
end
def
notify_author
@notify_author
||=
false
end
# Returns true if this is an upvote note,
# otherwise false is returned
def
upvote?
...
...
app/views/notes/_form.html.haml
浏览文件 @
5ad4be29
=
form_for
[
@project
,
@note
],
remote:
true
,
html:
{
multipart:
true
,
id:
nil
,
class:
"new_note js-new-note-form"
}
do
|
f
|
=
form_for
[
@project
,
@note
],
remote:
true
,
html:
{
multipart:
true
,
id:
nil
,
class:
"new_note js-new-note-form
common-note-form
"
}
do
|
f
|
=
note_target_fields
=
f
.
hidden_field
:commit_id
...
...
@@ -26,15 +26,6 @@
%a
.btn.grouped.js-close-discussion-note-form
Cancel
.note-form-option
=
label_tag
:notify
do
=
check_box_tag
:notify
,
1
,
false
%span
.light
Notify team via email
.js-notify-commit-author
=
label_tag
:notify_author
do
=
check_box_tag
:notify_author
,
1
,
false
%span
.light
Notify commit author
.note-form-option
%a
.choose-btn.btn.btn-small.js-choose-note-attachment-button
%i
.icon-paper-clip
...
...
app/views/walls/show.html.haml
浏览文件 @
5ad4be29
...
...
@@ -11,11 +11,6 @@
.buttons
=
f
.
submit
'Add Comment'
,
class:
"btn comment-btn grouped js-comment-button"
.note-form-option
=
label_tag
:notify
do
=
check_box_tag
:notify
,
1
,
false
%span
.light
Notify team via email
.note-form-option
%a
.choose-btn.btn.btn-small.js-choose-note-attachment-button
%i
.icon-paper-clip
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录