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
Boxiang Sun
gitlab-ce
Commits
752cb506
Commit
752cb506
authored
Jan 26, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor blob views
parent
21297e78
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
6 deletions
+11
-6
app/views/projects/blob/edit.html.haml
app/views/projects/blob/edit.html.haml
+8
-3
app/views/projects/blob/new.html.haml
app/views/projects/blob/new.html.haml
+1
-1
app/views/projects/blob/preview.html.haml
app/views/projects/blob/preview.html.haml
+0
-0
app/views/projects/empty.html.haml
app/views/projects/empty.html.haml
+1
-1
app/views/projects/tree/_tree.html.haml
app/views/projects/tree/_tree.html.haml
+1
-1
No files found.
app/views/projects/
edit_tree/show
.html.haml
→
app/views/projects/
blob/edit
.html.haml
View file @
752cb506
.file-editor
.file-editor
%ul
.nav.nav-tabs.js-edit-mode
%ul
.nav.nav-tabs.js-edit-mode
%li
.active
%li
.active
=
link_to
'Edit'
,
'#editor'
=
link_to
'#editor'
do
%i
.fa.fa-edit
Edit file
%li
%li
=
link_to
editing_preview_title
(
@blob
.
name
),
'#preview'
,
'data-preview-url'
=>
preview_project_edit_tree_path
(
@project
,
@id
)
=
link_to
'#preview'
,
'data-preview-url'
=>
project_preview_blob_path
(
@project
,
@id
)
do
%i
.fa.fa-eye
=
editing_preview_title
(
@blob
.
name
)
=
form_tag
(
project_
edit_tree
_path
(
@project
,
@id
),
method: :put
,
class:
"form-horizontal"
)
do
=
form_tag
(
project_
update_blob
_path
(
@project
,
@id
),
method: :put
,
class:
"form-horizontal"
)
do
=
render
'projects/blob_editor'
,
ref:
@ref
,
path:
@path
,
blob_data:
@blob
.
data
=
render
'projects/blob_editor'
,
ref:
@ref
,
path:
@path
,
blob_data:
@blob
.
data
=
render
'shared/commit_message_container'
,
params:
params
,
=
render
'shared/commit_message_container'
,
params:
params
,
placeholder:
"Update
#{
@blob
.
name
}
"
placeholder:
"Update
#{
@blob
.
name
}
"
...
...
app/views/projects/
new_tree/sho
w.html.haml
→
app/views/projects/
blob/ne
w.html.haml
View file @
752cb506
%h3
.page-title
New file
%h3
.page-title
New file
%hr
%hr
.file-editor
.file-editor
=
form_tag
(
project_
new_tree_path
(
@project
,
@id
),
method: :pu
t
,
class:
'form-horizontal form-new-file'
)
do
=
form_tag
(
project_
create_blob_path
(
@project
,
@id
),
method: :pos
t
,
class:
'form-horizontal form-new-file'
)
do
.form-group.commit_message-group
.form-group.commit_message-group
=
label_tag
'file_name'
,
class:
'control-label'
do
=
label_tag
'file_name'
,
class:
'control-label'
do
File name
File name
...
...
app/views/projects/
edit_tree
/preview.html.haml
→
app/views/projects/
blob
/preview.html.haml
View file @
752cb506
File moved
app/views/projects/empty.html.haml
View file @
752cb506
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
The repository for this project is empty
The repository for this project is empty
%p
.lead
%p
.lead
You can
You can
=
link_to
'#'
,
class:
'btn btn-new btn-lg'
do
=
link_to
project_new_blob_path
(
@project
,
'master'
)
,
class:
'btn btn-new btn-lg'
do
add a file
add a file
or push it via command line.
or push it via command line.
...
...
app/views/projects/tree/_tree.html.haml
View file @
752cb506
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
=
link_to
title
,
'#'
=
link_to
title
,
'#'
-
if
current_user
&&
can_push_branch?
(
@project
,
@ref
)
-
if
current_user
&&
can_push_branch?
(
@project
,
@ref
)
%li
%li
=
link_to
project_new_
tree
_path
(
@project
,
@id
),
title:
'New file'
,
id:
'new-file-link'
do
=
link_to
project_new_
blob
_path
(
@project
,
@id
),
title:
'New file'
,
id:
'new-file-link'
do
%small
%small
%i
.fa.fa-plus
%i
.fa.fa-plus
...
...
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