Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
eb784568
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,发现更多精彩内容 >>
未验证
提交
eb784568
编写于
6月 13, 2014
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve files/snippets action buttons
Signed-off-by:
N
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
上级
2af8ace1
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
29 addition
and
29 deletion
+29
-29
app/assets/stylesheets/generic/files.scss
app/assets/stylesheets/generic/files.scss
+1
-1
app/assets/stylesheets/sections/tree.scss
app/assets/stylesheets/sections/tree.scss
+0
-9
app/models/ability.rb
app/models/ability.rb
+5
-1
app/views/projects/blob/_actions.html.haml
app/views/projects/blob/_actions.html.haml
+3
-3
app/views/projects/snippets/_blob.html.haml
app/views/projects/snippets/_blob.html.haml
+9
-6
app/views/snippets/_blob.html.haml
app/views/snippets/_blob.html.haml
+9
-7
app/views/snippets/show.html.haml
app/views/snippets/show.html.haml
+2
-2
未找到文件。
app/assets/stylesheets/generic/files.scss
浏览文件 @
eb784568
...
...
@@ -20,7 +20,7 @@
.options
{
float
:
right
;
margin-top
:
-
5
px
;
margin-top
:
-
3
px
;
}
.left-options
{
...
...
app/assets/stylesheets/sections/tree.scss
浏览文件 @
eb784568
...
...
@@ -117,15 +117,6 @@
}
}
.tree-btn-group
{
top
:
2px
;
.btn
{
margin-right
:
0px
;
padding
:
2px
10px
;
}
}
.tree-download-holder
.btn
{
padding
:
4px
12px
;
}
...
...
app/models/ability.rb
浏览文件 @
eb784568
...
...
@@ -236,7 +236,11 @@ class Ability
:"modify_
#{
name
}
"
,
]
else
subject
.
respond_to?
(
:project
)
?
project_abilities
(
user
,
subject
.
project
)
:
[]
if
subject
.
respond_to?
(
:project
)
project_abilities
(
user
,
subject
.
project
)
else
[]
end
end
end
end
...
...
app/views/projects/blob/_actions.html.haml
浏览文件 @
eb784568
...
...
@@ -14,6 +14,6 @@
=
link_to
"blame"
,
project_blame_path
(
@project
,
@id
),
class:
"btn btn-small"
unless
@blob
.
empty?
=
link_to
"history"
,
project_commits_path
(
@project
,
@id
),
class:
"btn btn-small"
-
if
allowed_tree_edit?
-
if
allowed_tree_edit?
=
link_to
'#modal-remove-blob'
,
class:
"remove-blob btn btn-small btn-remove"
,
"data-toggle"
=>
"modal"
do
remove
app/views/projects/snippets/_blob.html.haml
浏览文件 @
eb784568
.file-holder
.file-title
%i
.icon-file
%strong
=
@snippet
.
file_name
%span
.options
.btn-group.tree-btn-group.pull-right
-
if
can?
(
current_user
,
:admin_project_snippet
,
@project
)
||
@snippet
.
author
==
current_user
=
link_to
"Edit"
,
edit_project_snippet_path
(
@project
,
@snippet
),
class:
"btn btn-tiny"
,
title:
'Edit Snippet'
=
link_to
"Raw"
,
raw_project_snippet_path
(
@project
,
@snippet
),
class:
"btn btn-tiny"
,
target:
"_blank"
%span
.file_name
=
@snippet
.
file_name
.options
.btn-group
-
if
can?
(
current_user
,
:modify_project_snippet
,
@snippet
)
=
link_to
"edit"
,
edit_project_snippet_path
(
@project
,
@snippet
),
class:
"btn btn-small"
,
title:
'Edit Snippet'
=
link_to
"raw"
,
raw_project_snippet_path
(
@project
,
@snippet
),
class:
"btn btn-small"
,
target:
"_blank"
-
if
can?
(
current_user
,
:admin_project_snippet
,
@snippet
)
=
link_to
"remove"
,
project_snippet_path
(
@project
,
@snippet
),
method: :delete
,
data:
{
confirm:
"Are you sure?"
},
class:
"btn btn-small btn-remove"
,
title:
'Delete Snippet'
=
render
'snippets/blob_content'
app/views/snippets/_blob.html.haml
浏览文件 @
eb784568
.file-holder
.file-title
%i
.icon-file
%strong
=
@snippet
.
file_name
%span
.options
.btn-group.tree-btn-group.pull-right
-
if
@snippet
.
author
==
current_user
=
link_to
"Edit"
,
edit_snippet_path
(
@snippet
),
class:
"btn btn-tiny"
,
title:
'Edit Snippet'
=
link_to
"Delete"
,
snippet_path
(
@snippet
),
method: :delete
,
data:
{
confirm:
"Are you sure?"
},
class:
"btn btn-tiny"
,
title:
'Delete Snippet'
=
link_to
"Raw"
,
raw_snippet_path
(
@snippet
),
class:
"btn btn-tiny"
,
target:
"_blank"
%span
.file_name
=
@snippet
.
file_name
.options
.btn-group
-
if
can?
(
current_user
,
:modify_personal_snippet
,
@snippet
)
=
link_to
"edit"
,
edit_snippet_path
(
@snippet
),
class:
"btn btn-small"
,
title:
'Edit Snippet'
=
link_to
"raw"
,
raw_snippet_path
(
@snippet
),
class:
"btn btn-small"
,
target:
"_blank"
-
if
can?
(
current_user
,
:admin_personal_snippet
,
@snippet
)
=
link_to
"remove"
,
snippet_path
(
@snippet
),
method: :delete
,
data:
{
confirm:
"Are you sure?"
},
class:
"btn btn-small btn-remove"
,
title:
'Delete Snippet'
=
render
'snippets/blob_content'
app/views/snippets/show.html.haml
浏览文件 @
eb784568
...
...
@@ -7,9 +7,9 @@
private
.pull-right
=
link_to
new_snippet_path
,
class:
"btn btn-new
btn-small
"
,
title:
"New Snippet"
do
=
link_to
new_snippet_path
,
class:
"btn btn-new"
,
title:
"New Snippet"
do
Add new snippet
%hr
.append-bottom-20
.pull-right
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录