This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
/
page.haml
50 lines (43 loc) · 1.38 KB
/
page.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
- file_page = !values["classmod"]
- title_in_description = values["description"] && values["description"] =~ /^\s*<h1>/m
.header
- title = capture_haml do
- if file_page
= values["short_name"]
- else
%span.type= values["classmod"]
= values["full_name"]
- if title_in_description
.name= title
- else
%h1.name= title
- if file_page
.paths
= values["full_path"]
- if values["cvsurl"]
== (#{link_to 'view online', values["cvsurl"]})
- else
%ol.paths
- values["infiles"].each_with_index do |file, index|
%li{ :class => index > 0 ? 'other' : nil }
= link_to file["full_path"], file["full_path_url"]
- if file["cvsurl"]
== (#{link_to 'view online', file["cvsurl"]})
- if values["infiles"].size > 1
%li
%a.show{ :href => '#', :onclick => 'this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false' } show all
- if values["parent"] then
.parent
Parent:
%strong= link_to values["parent"], values["par_url"]
- if values["dtm_modified"]
.last-update
Last Update:
%span.datetime= values["dtm_modified"]
#content
- if values["diagram"]
#diagram= values["diagram"]
#text
- if values["description"]
#description~ sanitize_code_blocks values["description"]
= yield