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
Tatuya Kamada
gitlab-ce
Commits
f6a8e694
Commit
f6a8e694
authored
Oct 08, 2012
by
Valeriy Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WebEditor: base form
parent
83797265
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
1 deletion
+20
-1
app/controllers/tree_controller.rb
app/controllers/tree_controller.rb
+8
-0
app/views/tree/_tree_file.html.haml
app/views/tree/_tree_file.html.haml
+1
-0
app/views/tree/edit.html.haml
app/views/tree/edit.html.haml
+10
-0
config/routes.rb
config/routes.rb
+1
-1
No files found.
app/controllers/tree_controller.rb
View file @
f6a8e694
...
...
@@ -19,4 +19,12 @@ class TreeController < ProjectResourceController
format
.
js
{
no_cache_headers
}
end
end
def
edit
@last_commit
=
@project
.
commits
(
@ref
,
@path
,
1
).
first
.
sha
end
def
update
last_commit
=
@project
.
commits
(
@ref
,
@path
,
1
).
first
.
sha
end
end
app/views/tree/_tree_file.html.haml
View file @
f6a8e694
...
...
@@ -8,6 +8,7 @@
=
link_to
"raw"
,
project_blob_path
(
@project
,
@id
),
class:
"btn very_small"
,
target:
"_blank"
=
link_to
"history"
,
project_commits_path
(
@project
,
@id
),
class:
"btn very_small"
=
link_to
"blame"
,
project_blame_path
(
@project
,
@id
),
class:
"btn very_small"
=
link_to
"Edit"
,
edit_project_tree_path
(
@project
,
@id
),
class:
"btn very_small"
-
if
tree_file
.
text?
-
if
gitlab_markdown?
(
tree_file
.
name
)
.file_content.wiki
...
...
app/views/tree/edit.html.haml
0 → 100644
View file @
f6a8e694
.file_holder
Edit file:
%span
.file_name
=
@tree
.
path
.
force_encoding
(
'utf-8'
)
%br
=
form_tag
(
project_tree_path
(
@project
,
@id
),
:method
=>
:put
)
do
%textarea
=
@tree
.
data
=
hidden_field_tag
'last_commit'
,
@last_commit
=
submit_tag
"Save"
config/routes.rb
View file @
f6a8e694
...
...
@@ -183,7 +183,7 @@ Gitlab::Application.routes.draw do
resources
:compare
,
only:
[
:index
,
:create
]
resources
:blame
,
only:
[
:show
],
constraints:
{
id:
/.+/
}
resources
:blob
,
only:
[
:show
],
constraints:
{
id:
/.+/
}
resources
:tree
,
only:
[
:show
],
constraints:
{
id:
/.+/
}
resources
:tree
,
only:
[
:show
,
:edit
,
:update
],
constraints:
{
id:
/.+/
}
match
"/compare/:from...:to"
=>
"compare#show"
,
as:
"compare"
,
:via
=>
[
:get
,
:post
],
constraints:
{
from:
/.+/
,
to:
/.+/
}
...
...
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