Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
6f78be4d
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,发现更多精彩内容 >>
提交
6f78be4d
编写于
1月 15, 2015
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7951 from cirosantilli/uniform-blob-edit
Make blob new and edit file editors more uniform
上级
c5ba87a2
3a3b0da8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
22 deletion
+17
-22
app/views/projects/_blob_editor.html.haml
app/views/projects/_blob_editor.html.haml
+15
-0
app/views/projects/edit_tree/show.html.haml
app/views/projects/edit_tree/show.html.haml
+1
-16
app/views/projects/new_tree/show.html.haml
app/views/projects/new_tree/show.html.haml
+1
-6
未找到文件。
app/views/projects/_blob_editor.html.haml
0 → 100644
浏览文件 @
6f78be4d
.file-holder.file
.file-title
%i
.icon-file
%span
.file_name
%span
.monospace.light
#{
ref
}
-
if
local_assigns
[
:path
]
=
': '
+
local_assigns
[
:path
]
.file-content.code
%pre
.js-edit-mode-pane
#editor
=
params
[
:content
]
||
local_assigns
[
:blob_data
]
-
if
local_assigns
[
:path
]
.js-edit-mode-pane
#preview
.hide
.center
%h2
%i
.icon-spinner.icon-spin
app/views/projects/edit_tree/show.html.haml
浏览文件 @
6f78be4d
...
...
@@ -6,21 +6,7 @@
=
link_to
editing_preview_title
(
@blob
.
name
),
'#preview'
,
'data-preview-url'
=>
preview_project_edit_tree_path
(
@project
,
@id
)
=
form_tag
(
project_edit_tree_path
(
@project
,
@id
),
method: :put
,
class:
"form-horizontal"
)
do
.file-holder.file
.file-title
%i
.fa.fa-file
%span
.file_name
%span
.monospace.light
#{
@ref
}
:
=
@path
%span
.options
.btn-group.tree-btn-group
=
link_to
"Cancel"
,
@after_edit_path
,
class:
"btn btn-tiny btn-cancel"
,
data:
{
confirm:
leave_edit_message
}
.file-content.code
%pre
.js-edit-mode-pane
#editor
.js-edit-mode-pane
#preview
.hide
.center
%h2
%i
.fa.fa-spinner.fa-spin
=
render
'projects/blob_editor'
,
ref:
@ref
,
path:
@path
,
blob_data:
@blob
.
data
=
render
'shared/commit_message_container'
,
params:
params
,
placeholder:
"Update
#{
@blob
.
name
}
"
=
hidden_field_tag
'last_commit'
,
@last_commit
...
...
@@ -34,7 +20,6 @@
ace
.
config
.
loadModule
(
"
ace/ext/searchbox
"
);
var
ace_mode
=
"
#{
@blob
.
language
.
try
(
:ace_mode
)
}
"
;
var
editor
=
ace
.
edit
(
"
editor
"
);
editor
.
setValue
(
"
#{
escape_javascript
(
@blob
.
data
)
}
"
);
if
(
ace_mode
)
{
editor
.
getSession
().
setMode
(
'
ace/mode/
'
+
ace_mode
);
}
...
...
app/views/projects/new_tree/show.html.haml
浏览文件 @
6f78be4d
...
...
@@ -19,12 +19,7 @@
Encoding
.col-sm-10
=
select_tag
:encoding
,
options_for_select
([
"base64"
,
"text"
],
"text"
),
class:
'form-control'
.file-holder
.file-title
%i
.fa.fa-file
.file-content.code
%pre
#editor
=
params
[
:content
]
=
render
'projects/blob_editor'
,
ref:
@ref
=
render
'shared/commit_message_container'
,
params:
params
,
placeholder:
'Add new file'
=
hidden_field_tag
'content'
,
''
,
id:
'file-content'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录