tree view readme support
This commit is contained in:
parent
f615c877bc
commit
7b7549bea6
2 changed files with 30 additions and 13 deletions
|
@ -477,6 +477,17 @@ body.project-page table.no-borders td{
|
||||||
|
|
||||||
#tree-content-holder { float:left; width:100%; }
|
#tree-content-holder { float:left; width:100%; }
|
||||||
|
|
||||||
|
#tree-readme-holder {
|
||||||
|
float:left;
|
||||||
|
width:100%;
|
||||||
|
|
||||||
|
.readme {
|
||||||
|
@include round-borders-all(4px);
|
||||||
|
padding: 4px 15px;
|
||||||
|
background:#F7F7F7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Commit Page */
|
/* Commit Page */
|
||||||
|
|
|
@ -36,6 +36,12 @@
|
||||||
- contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content|
|
- contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content|
|
||||||
= render :partial => "refs/tree_item", :locals => { :content => content }
|
= render :partial => "refs/tree_item", :locals => { :content => content }
|
||||||
|
|
||||||
|
- if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme\.(md|markdown)$/i }.first
|
||||||
|
#tree-readme-holder
|
||||||
|
%h3= content.name
|
||||||
|
.readme
|
||||||
|
= markdown(encode content.data)
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
$(function(){
|
$(function(){
|
||||||
$('select#branch').selectmenu({style:'popup', width:200});
|
$('select#branch').selectmenu({style:'popup', width:200});
|
||||||
|
|
Loading…
Reference in a new issue