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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
1f4d8eac
Commit
1f4d8eac
authored
Oct 15, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract tree/readme partial
parent
5cff72ad
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
app/views/tree/_readme.html.haml
app/views/tree/_readme.html.haml
+10
-0
app/views/tree/_tree.html.haml
app/views/tree/_tree.html.haml
+3
-12
No files found.
app/views/tree/_readme.html.haml
0 → 100644
View file @
1f4d8eac
.file_holder
#README
.file_title
%i
.icon-file
=
readme
.
name
.file_content.wiki
-
if
gitlab_markdown?
(
readme
.
name
)
=
preserve
do
=
markdown
(
readme
.
data
)
-
else
=
raw
GitHub
::
Markup
.
render
(
readme
.
name
,
readme
.
data
)
\ No newline at end of file
app/views/tree/_tree.html.haml
View file @
1f4d8eac
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
%div
#tree-content-holder
.tree-content-holder
%div
#tree-content-holder
.tree-content-holder
-
if
tree
.
is_blob?
-
if
tree
.
is_blob?
=
render
partial:
"tree/blob"
,
object
:
tree
=
render
"tree/blob"
,
blob
:
tree
-
else
-
else
%table
#tree-slider
{
class:
"table_#{@hex_path} tree-table"
}
%table
#tree-slider
{
class:
"table_#{@hex_path} tree-table"
}
%thead
%thead
...
@@ -32,17 +32,8 @@
...
@@ -32,17 +32,8 @@
=
render_tree
(
tree
.
contents
)
=
render_tree
(
tree
.
contents
)
-
if
content
=
tree
.
contents
.
find
{
|
c
|
c
.
is_a?
(
Grit
::
Blob
)
and
c
.
name
=~
/^readme/i
}
-
if
readme
=
tree
.
contents
.
find
{
|
c
|
c
.
is_a?
(
Grit
::
Blob
)
and
c
.
name
=~
/^readme/i
}
.file_holder
#README
=
render
"tree/readme"
,
readme:
readme
.file_title
%i
.icon-file
=
content
.
name
.file_content.wiki
-
if
gitlab_markdown?
(
content
.
name
)
=
preserve
do
=
markdown
(
content
.
data
)
-
else
=
raw
GitHub
::
Markup
.
render
(
content
.
name
,
content
.
data
)
-
unless
tree
.
is_blob?
-
unless
tree
.
is_blob?
:javascript
:javascript
...
...
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