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
Jérome Perrin
gitlab-ce
Commits
ed3f3a0d
Commit
ed3f3a0d
authored
Dec 15, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Download link for binary
parent
0712e785
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
4 deletions
+17
-4
app/assets/images/download.png
app/assets/images/download.png
+0
-0
app/decorators/tree_decorator.rb
app/decorators/tree_decorator.rb
+9
-0
app/views/projects/_form.html.haml
app/views/projects/_form.html.haml
+1
-1
app/views/refs/_tree_file.html.haml
app/views/refs/_tree_file.html.haml
+7
-3
No files found.
app/assets/images/download.png
0 → 100644
View file @
ed3f3a0d
3.55 KB
app/decorators/tree_decorator.rb
View file @
ed3f3a0d
...
@@ -32,4 +32,13 @@ class TreeDecorator < ApplicationDecorator
...
@@ -32,4 +32,13 @@ class TreeDecorator < ApplicationDecorator
def
history_path
def
history_path
h
.
project_commits_path
(
project
,
:path
=>
path
,
:ref
=>
ref
)
h
.
project_commits_path
(
project
,
:path
=>
path
,
:ref
=>
ref
)
end
end
def
mb_size
size
=
(
tree
.
size
/
1024
)
if
size
<
1024
"
#{
size
}
KB"
else
"
#{
size
/
1024
}
MB"
end
end
end
end
app/views/projects/_form.html.haml
View file @
ed3f3a0d
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
%td
=
f
.
label
:default_branch
,
"Default Branch"
%td
=
f
.
label
:default_branch
,
"Default Branch"
%td
=
f
.
select
(
:default_branch
,
@project
.
heads
.
map
(
&
:name
),
{},
:style
=>
"width:300px;"
)
%td
=
f
.
select
(
:default_branch
,
@project
.
heads
.
map
(
&
:name
),
{},
:style
=>
"width:300px;"
)
%tr
-#
%tr
%td= f.label :tag_list
%td= f.label :tag_list
%td= f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field
%td= f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field
%tr
%tr
...
...
app/views/refs/_tree_file.html.haml
View file @
ed3f3a0d
...
@@ -20,6 +20,10 @@
...
@@ -20,6 +20,10 @@
.view_file_content_image
.view_file_content_image
%img
{
:src
=>
"data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"
}
%img
{
:src
=>
"data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"
}
-
else
-
else
%p
%center
%center
No preview for this file type
=
link_to
blob_project_ref_path
(
@project
,
@ref
,
:path
=>
params
[
:path
]
)
do
%div
%br
=
image_tag
"download.png"
,
:width
=>
64
%h3
Download (
#{
file
.
mb_size
}
)
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