BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
_readme.html.haml
app/views/tree/_readme.html.haml
+11
-0
_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