hanna 0.1.12 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +113 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +63 -0
  5. data/lib/hanna/template_files/class_index.erb +4 -0
  6. data/lib/hanna/template_files/file_index.erb +9 -0
  7. data/lib/hanna/template_files/index.erb +15 -0
  8. data/lib/hanna/template_files/layout.erb +35 -0
  9. data/lib/hanna/template_files/method_index.erb +11 -0
  10. data/lib/hanna/template_files/method_list.erb +58 -0
  11. data/lib/hanna/template_files/method_search.js +41 -59
  12. data/lib/hanna/template_files/page.erb +48 -0
  13. data/lib/hanna/template_files/sections.erb +92 -0
  14. data/lib/hanna/template_files/styles.css +369 -0
  15. data/lib/hanna.rb +300 -1
  16. data/lib/rdoc/discover.rb +1 -0
  17. metadata +95 -90
  18. data/README.markdown +0 -102
  19. data/Rakefile +0 -4
  20. data/bin/hanna +0 -81
  21. data/lib/hanna/hanna.rb +0 -48
  22. data/lib/hanna/rdoctask.rb +0 -42
  23. data/lib/hanna/template_files/class_index.haml +0 -3
  24. data/lib/hanna/template_files/file_index.haml +0 -12
  25. data/lib/hanna/template_files/index.haml +0 -11
  26. data/lib/hanna/template_files/layout.haml +0 -34
  27. data/lib/hanna/template_files/method_index.haml +0 -13
  28. data/lib/hanna/template_files/method_list.haml +0 -37
  29. data/lib/hanna/template_files/page.haml +0 -50
  30. data/lib/hanna/template_files/prototype-1.6.0.3.js +0 -4320
  31. data/lib/hanna/template_files/sections.haml +0 -83
  32. data/lib/hanna/template_files/styles.sass +0 -364
  33. data/lib/hanna/template_helpers.rb +0 -119
  34. data/lib/hanna/template_page_patch.rb +0 -38
  35. data/lib/hanna/version.rb +0 -19
  36. data/lib/rubygems_plugin.rb +0 -28
metadata CHANGED
@@ -1,104 +1,109 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: hanna
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.12
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.0
5
5
  platform: ruby
6
- authors:
7
- - "Mislav Marohni\xC4\x87"
8
- autorequire:
6
+ authors:
7
+ - Jeremy Evans
8
+ - Erik Hollensbe
9
+ - James Tucker
10
+ - Mislav Marohnic
11
+ autorequire:
9
12
  bindir: bin
10
13
  cert_chain: []
11
-
12
- date: 2009-10-16 00:00:00 +02:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
14
+ date: 2023-08-10 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
16
17
  name: rdoc
18
+ requirement: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: '4'
17
23
  type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ~>
22
- - !ruby/object:Gem::Version
23
- version: 2.3.0
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: haml
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: 2.2.8
34
- version:
35
- - !ruby/object:Gem::Dependency
36
- name: rake
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ~>
42
- - !ruby/object:Gem::Version
43
- version: 0.8.2
44
- version:
45
- description: Hanna is an RDoc implemented in Haml, making its source clean and maintainable. It's built with simplicity, beauty and ease of browsing in mind.
46
- email: mislav.marohnic@gmail.com
47
- executables:
48
- - hanna
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '4'
30
+ - !ruby/object:Gem::Dependency
31
+ name: minitest-hooks
32
+ requirement: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ - !ruby/object:Gem::Dependency
45
+ name: minitest-global_expectations
46
+ requirement: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ description: RDoc generator designed with simplicity, beauty and ease of browsing
59
+ in mind
60
+ email: code@jeremyevans.net
61
+ executables: []
49
62
  extensions: []
50
-
51
- extra_rdoc_files: []
52
-
53
- files:
54
- - Rakefile
55
- - bin/hanna
56
- - lib/hanna/hanna.rb
57
- - lib/hanna/rdoctask.rb
58
- - lib/hanna/template_files/class_index.haml
59
- - lib/hanna/template_files/file_index.haml
60
- - lib/hanna/template_files/index.haml
61
- - lib/hanna/template_files/layout.haml
62
- - lib/hanna/template_files/method_index.haml
63
- - lib/hanna/template_files/method_list.haml
64
- - lib/hanna/template_files/method_search.js
65
- - lib/hanna/template_files/page.haml
66
- - lib/hanna/template_files/prototype-1.6.0.3.js
67
- - lib/hanna/template_files/sections.haml
68
- - lib/hanna/template_files/styles.sass
69
- - lib/hanna/template_helpers.rb
70
- - lib/hanna/template_page_patch.rb
71
- - lib/hanna/version.rb
63
+ extra_rdoc_files:
64
+ - LICENSE
65
+ - README.rdoc
66
+ - CHANGELOG
67
+ files:
68
+ - CHANGELOG
69
+ - LICENSE
70
+ - README.rdoc
72
71
  - lib/hanna.rb
73
- - lib/rubygems_plugin.rb
74
- - README.markdown
75
- has_rdoc: true
76
- homepage: http://github.com/mislav/hanna
77
- licenses: []
78
-
79
- post_install_message:
72
+ - lib/hanna/template_files/class_index.erb
73
+ - lib/hanna/template_files/file_index.erb
74
+ - lib/hanna/template_files/index.erb
75
+ - lib/hanna/template_files/layout.erb
76
+ - lib/hanna/template_files/method_index.erb
77
+ - lib/hanna/template_files/method_list.erb
78
+ - lib/hanna/template_files/method_search.js
79
+ - lib/hanna/template_files/page.erb
80
+ - lib/hanna/template_files/sections.erb
81
+ - lib/hanna/template_files/styles.css
82
+ - lib/rdoc/discover.rb
83
+ homepage: https://github.com/jeremyevans/hanna
84
+ licenses:
85
+ - MIT
86
+ metadata:
87
+ bug_tracker_uri: https://github.com/jeremyevans/hanna/issues
88
+ mailing_list_uri: https://github.com/jeremyevans/hanna/discussions
89
+ source_code_uri: https://github.com/jeremyevans/hanna
90
+ post_install_message:
80
91
  rdoc_options: []
81
-
82
- require_paths:
92
+ require_paths:
83
93
  - lib
84
- required_ruby_version: !ruby/object:Gem::Requirement
85
- requirements:
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
86
96
  - - ">="
87
- - !ruby/object:Gem::Version
88
- version: "0"
89
- version:
90
- required_rubygems_version: !ruby/object:Gem::Requirement
91
- requirements:
97
+ - !ruby/object:Gem::Version
98
+ version: '2.2'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
92
101
  - - ">="
93
- - !ruby/object:Gem::Version
94
- version: "0"
95
- version:
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
96
104
  requirements: []
97
-
98
- rubyforge_project:
99
- rubygems_version: 1.3.5
100
- signing_key:
101
- specification_version: 3
102
- summary: An RDoc template that scales
105
+ rubygems_version: 3.4.10
106
+ signing_key:
107
+ specification_version: 4
108
+ summary: RDoc generator designed with simplicity, beauty and ease of browsing in mind
103
109
  test_files: []
104
-
data/README.markdown DELETED
@@ -1,102 +0,0 @@
1
- # Hanna — a better RDoc template
2
-
3
- Hanna is an RDoc template that scales. It's implemented in Haml, making the sources clean
4
- and readable. It's built with simplicity, beauty and ease of browsing in mind. (See more
5
- in [the wiki][wiki].)
6
-
7
- Hanna gem is available from [Gemcutter][]:
8
-
9
- gem install hanna
10
-
11
- The template was created by [Mislav][] and since then has seen contributions from:
12
-
13
- 1. [Tony Strauss](http://github.com/DesigningPatterns), who participated from the early
14
- start and made tons of fixes and enhancements to the template;
15
- 2. [Hongli Lai](http://blog.phusion.nl/) with the search filter for methods.
16
-
17
-
18
- ## Usage
19
-
20
- There is a command-line tool installed with the Hanna gem:
21
-
22
- hanna -h
23
-
24
- This is a wrapper over `rdoc` and it forwards all the parameters to it. Manual usage
25
- would require specifying Hanna as a template when invoking RDoc on the command-line:
26
-
27
- rdoc -o doc --inline-source --format=html -T hanna lib/*.rb
28
-
29
- Hanna requires the `--inline-source` (or `-S`) flag.
30
-
31
- An alternative is to set the `RDOCOPT` environment variable:
32
-
33
- RDOCOPT="-S -f html -T hanna"
34
-
35
- This will make RDoc always use Hanna unless it is explicitly overridden.
36
-
37
- Another neat trick is to put the following line in your .gemrc:
38
-
39
- rdoc: --inline-source --line-numbers --format=html --template=hanna
40
-
41
- This will make RubyGems use Hanna when generating documentation for installed gems.
42
-
43
- ### Rake task
44
-
45
- For repeated generation of API docs, it's better to set up a Rake task. If you already
46
- have an `RDocTask` set up in your Rakefile, the only thing you need to change is this:
47
-
48
- # replace this:
49
- require 'rake/rdoctask'
50
- # with this:
51
- require 'hanna/rdoctask'
52
-
53
- Tip: you can do this in the Rakefile of your Rails project before running `rake doc:rails`.
54
-
55
- Here is an example of a task for the [will_paginate library][wp]:
56
-
57
- # instead of 'rake/rdoctask':
58
- require 'hanna/rdoctask'
59
-
60
- desc 'Generate RDoc documentation for the will_paginate plugin.'
61
- Rake::RDocTask.new(:rdoc) do |rdoc|
62
- rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG').
63
- include('lib/**/*.rb').
64
- exclude('lib/will_paginate/named_scope*').
65
- exclude('lib/will_paginate/array.rb').
66
- exclude('lib/will_paginate/version.rb')
67
-
68
- rdoc.main = "README.rdoc" # page to start on
69
- rdoc.title = "will_paginate documentation"
70
-
71
- rdoc.rdoc_dir = 'doc' # rdoc output folder
72
- rdoc.options << '--webcvs=http://github.com/mislav/will_paginate/tree/master/'
73
- end
74
-
75
- ### Generating documentation for installed gems
76
-
77
- You can generate documentation for installed gems, which might be more convenient than the
78
- `gem rdoc` command with the +RDOCOPT+ environment variable set as described. For instance,
79
- to generate docs for "actionpack" and "activerecord" type:
80
-
81
- [sudo] hanna --gems actionpack activerecord
82
-
83
-
84
- ## You can help
85
-
86
- Don't like something? Think you can design better? (You probably can.)
87
-
88
- I think of Hanna as the first RDoc template that's actually _maintainable_. First thing I
89
- have done is converted the original HTML template to Haml and Sass, cleaning up and
90
- removing the (ridiculous amount of) duplication. Also, the template fragments are now in
91
- _separate files_.
92
-
93
- Ultimately, I'd like to lose the frameset. Currently that is far from possible because the
94
- whole RDoc HTML Generator is built for frames. Still, that is my goal.
95
-
96
- This is git. Fork it, hack away, tell me about it!
97
-
98
-
99
- [wiki]: http://github.com/mislav/hanna/wikis/home "Hanna wiki"
100
- [gemcutter]: http://gemcutter.org/ "Gemcutter gem server"
101
- [wp]: http://github.com/mislav/will_paginate/tree/master/Rakefile
102
- [Mislav]: http://mislav.caboo.se/ "Mislav Marohnić"
data/Rakefile DELETED
@@ -1,4 +0,0 @@
1
- desc "builds the gem"
2
- task :gem do
3
- system %(gem build hanna.gemspec)
4
- end
data/bin/hanna DELETED
@@ -1,81 +0,0 @@
1
- #!/usr/bin/ruby
2
- if ARGV.size == 1 and ARGV.first == '-h'
3
- puts <<-HELP
4
- Hanna -- a better RDoc template
5
- Synopsis:
6
- hanna [options] [file names...]
7
- [sudo] hanna --gems [gem names...]
8
-
9
- Example usage:
10
-
11
- hanna lib/**/*.rb
12
-
13
- Hanna passes all arguments to RDoc. To find more about RDoc options, see
14
- "rdoc -h". Default options are:
15
-
16
- -o doc --inline-source --charset=UTF-8
17
-
18
- The second form, with the "--gems" argument, serves the same purpose as
19
- the "gem rdoc" command: it generates documentation for installed gems.
20
- When no gem names are given, "hanna --gems" will install docs for EACH of
21
- the gems, which can, uh, take a little while.
22
-
23
- HELP
24
- exit 0
25
- end
26
-
27
- unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
28
- require 'pathname'
29
- hanna_dir = Pathname.new(__FILE__).realpath.dirname + '../lib'
30
- else
31
- # windows
32
- hanna_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
33
- end
34
-
35
- $:.unshift(hanna_dir) unless $:.include?(hanna_dir)
36
-
37
- require 'rubygems'
38
- require 'hanna/version'
39
- Hanna::require_rdoc
40
- require 'rdoc/rdoc'
41
-
42
- options = []
43
-
44
- options << '-f' << 'html' << '-T' << 'hanna'
45
- options << '--inline-source' << '--charset=UTF-8'
46
-
47
- if ARGV.first == '--gems'
48
- require 'rubygems/doc_manager'
49
- Gem::DocManager.configured_args = options
50
-
51
- gem_names = ARGV.dup
52
- gem_names.shift
53
-
54
- unless gem_names.empty?
55
- specs = gem_names.inject([]) do |arr, name|
56
- found = Gem::SourceIndex.from_installed_gems.find_name(name)
57
- spec = found.sort_by {|s| s.version }.last
58
- arr << spec if spec
59
- arr
60
- end
61
- else
62
- specs = Gem::SourceIndex.from_installed_gems.inject({}) do |all, pair|
63
- full_name, spec = pair
64
- if spec.has_rdoc? and (!all[spec.name] or spec.version > all[spec.name].version)
65
- all[spec.name] = spec
66
- end
67
- all
68
- end
69
- specs = specs.values
70
- puts "Hanna is installing documentation for #{specs.size} gem#{specs.size > 1 ? 's' : ''} ..."
71
- end
72
-
73
- specs.each do |spec|
74
- Gem::DocManager.new(spec).generate_rdoc
75
- end
76
- else
77
- options << '-o' << 'doc' unless ARGV.include?('-o') or ARGV.include?('--op')
78
- options.concat ARGV
79
-
80
- RDoc::RDoc.new.document(options)
81
- end
data/lib/hanna/hanna.rb DELETED
@@ -1,48 +0,0 @@
1
- # = A better RDoc HTML template
2
- #
3
- # Authors: Mislav Marohnić <mislav.marohnic@gmail.com>
4
- # Tony Strauss (http://github.com/DesigningPatterns)
5
- # Michael Granger <ged@FaerieMUD.org>, who had maintained the original RDoc template
6
-
7
- require 'haml'
8
- require 'sass'
9
- require 'rdoc/generator/html'
10
- require 'hanna/template_page_patch'
11
-
12
- module RDoc::Generator::HTML::HANNA
13
- class << self
14
- def dir
15
- @dir ||= File.join File.dirname(__FILE__), 'template_files'
16
- end
17
-
18
- def read(*names)
19
- content = names.inject('') { |all, name| all << File.read(File.join(dir, name)) }
20
- extension = names.first =~ /\.(\w+)$/ && $1
21
-
22
- Hanna::TemplateHelpers.silence_warnings do
23
- case extension
24
- when 'sass'
25
- Sass::Engine.new(content)
26
- when 'haml'
27
- Haml::Engine.new(content, :format => :html4, :filename => names.join(','))
28
- else
29
- content
30
- end
31
- end
32
- end
33
- end
34
-
35
- STYLE = read('styles.sass')
36
-
37
- CLASS_PAGE = read('page.haml')
38
- FILE_PAGE = CLASS_PAGE
39
- METHOD_LIST = read('method_list.haml', 'sections.haml')
40
-
41
- FR_INDEX_BODY = BODY = read('layout.haml')
42
-
43
- FILE_INDEX = read('file_index.haml')
44
- CLASS_INDEX = read('class_index.haml')
45
- METHOD_INDEX = read('method_index.haml')
46
-
47
- INDEX = read('index.haml')
48
- end
@@ -1,42 +0,0 @@
1
- require 'hanna/version'
2
- require 'rake'
3
- require 'rake/rdoctask'
4
-
5
- Rake::RDocTask.class_eval do
6
- # don't allow it
7
- undef :external=, :template=
8
-
9
- # Create the tasks defined by this task lib.
10
- def define
11
- @template = 'hanna'
12
- options << '--format=html'
13
-
14
- # inline source and UTF-8 are defaults:
15
- options << '--inline-source' unless options.include? '--inline-source' or options.include? '-S'
16
- options << '--charset=UTF-8' if options.grep(/^(--charset\b|-c\b)/).empty?
17
-
18
- desc "Build the HTML documentation"
19
- task name
20
-
21
- desc "Force a rebuild of the RDOC files"
22
- task paste("re", name) => [paste("clobber_", name), name]
23
-
24
- desc "Remove rdoc products"
25
- task paste("clobber_", name) do
26
- rm_r rdoc_dir rescue nil
27
- end
28
-
29
- task :clobber => [paste("clobber_", name)]
30
-
31
- directory @rdoc_dir
32
- task name => [rdoc_target]
33
- file rdoc_target => @rdoc_files + [Rake.application.rakefile] do
34
- rm_r @rdoc_dir rescue nil
35
- Hanna::require_rdoc
36
- require 'rdoc/rdoc'
37
-
38
- RDoc::RDoc.new.document(option_list + @rdoc_files)
39
- end
40
- return self
41
- end
42
- end
@@ -1,3 +0,0 @@
1
- %h1= values[:list_title]
2
- %ol#index-entries.classes
3
- = render_class_tree make_class_tree(values[:entries])
@@ -1,12 +0,0 @@
1
- %h1= values[:list_title]
2
- - any_hidden = false
3
-
4
- %ol#index-entries{ :class => 'files' }
5
- - for entry in values[:entries]
6
- - hide = entry[:name] =~ /\.rb$/
7
- - any_hidden = true if hide
8
- %li{ :class => hide ? 'other' : nil }= link_to entry[:name], entry[:href]
9
-
10
- - if any_hidden
11
- %li
12
- %a.show{ :href => '#', :onclick => 'this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false' } show all
@@ -1,11 +0,0 @@
1
- !!! Frameset
2
- %html{ "xml:lang" => "en", :lang => "en", :xmlns => "http://www.w3.org/1999/xhtml" }
3
- %head
4
- %title= values[:title]
5
- %meta{ :content => "text/html; charset=#{values[:charset]}", "http-equiv" => "Content-Type" }
6
- %frameset{ :cols => "20%, *", :border => "1", :frameborder => "1", :bordercolor => "gray" }
7
- %frameset{ :rows => "15%, 35%, 50%" }
8
- %frame{ :name => "Files", :title => "Files", :src => "fr_file_index.html" }
9
- %frame{ :name => "Classes", :src => "fr_class_index.html" }
10
- %frame{ :name => "Methods", :src => "fr_method_index.html" }
11
- %frame{ :name => "docwin", :src => values[:initial_page] }=""
@@ -1,34 +0,0 @@
1
- !!! strict
2
- - index = values[:list_title]
3
- %html{ :lang => "en" }
4
- %head
5
- %title= values[:title]
6
- %meta{ 'http-equiv' => "Content-Type", :content => "text/html; charset=#{values[:charset]}" }
7
- %link{ :rel => "stylesheet", :href => values[:style_url], :type => "text/css", :media => "screen" }
8
- - unless index
9
- :javascript
10
- function popupCode(url) {
11
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
12
- }
13
-
14
- function toggleCode(id) {
15
- var code = document.getElementById(id)
16
-
17
- code.style.display = code.style.display != 'block' ? 'block' : 'none'
18
- return true
19
- }
20
-
21
- // Make codeblocks hidden by default
22
- document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
23
- - else
24
- %base{ :target => 'docwin' }/
25
-
26
- %body{ :class => index ? 'list' : 'page' }
27
- - if index
28
- #index= yield
29
- - else
30
- #wrapper{ :class => values[:classmod] ? 'class' : 'file' }
31
- = yield
32
- #footer-push
33
- #footer
34
- = link_to '<strong>Hanna</strong> RDoc template', 'http://github.com/mislav/hanna/tree/master'
@@ -1,13 +0,0 @@
1
- %h1= values[:list_title]
2
-
3
- %script{:type => 'text/javascript'}
4
- = read("prototype-1.6.0.3.js")
5
- = build_javascript_search_index(values[:entries])
6
- = read("method_search.js")
7
- %form{:onsubmit => 'return performSearch()'}
8
- %input{:type => 'text', :id => 'search', :class => 'untouched', :value => 'Enter search terms...'}
9
- %ol#search-results{ :class => 'methods', :style => 'display: none' }
10
-
11
- %ol#index-entries{ :class => 'methods' }
12
- - for entry in values[:entries]
13
- %li= link_to_method entry[:name], entry[:href]
@@ -1,37 +0,0 @@
1
- - methods = methods_from_sections values[:sections]
2
- - unless methods.empty?
3
- #method-list
4
- %h2 Methods
5
- - for type in ['public class', 'protected class', 'public instance', 'protected instance']
6
- - unless (list = methods[type]).empty?
7
- %h3= type
8
- %ol
9
- - for method in list
10
- - if method[:name].to_s.empty? && method[:callseq]
11
- %li= link_to method[:callseq].gsub(/<br\s*\/?>/, "").split(/[\r\n]+/).map{ |s| s.split(/([({]+|\[\{|\s+(#?=>|&rarr;)\s+)/).first.sub(/^[A-Za-z0-9_:]+\./, "").sub(/\s+=\s+.*/, "=").strip }.uniq.join("<br />\n"), '#' + method[:aref]
12
- - else
13
- %li= link_to method[:name], '#' + method[:aref]
14
-
15
- - if values[:requires] or values[:toc] or values[:includes]
16
- #context
17
- - if values[:requires]
18
- #requires
19
- %h2 Required files
20
- %ol
21
- - for req in values[:requires]
22
- %li= link_to req[:name], req[:aref]
23
-
24
- - if values[:toc]
25
- #contents
26
- %h2 Contents
27
- %ol
28
- - for item in values[:toc]
29
- %li= link_to values[:secname], values[:href]
30
-
31
- - if values[:includes]
32
- #includes
33
- %h2 Included modules
34
- %ol
35
- - for inc in values[:includes]
36
- %li= link_to inc[:name], inc[:aref]
37
-
@@ -1,50 +0,0 @@
1
- - file_page = !values[:classmod]
2
- - title_in_description = values[:description] && values[:description] =~ /^\s*<h1>/m
3
-
4
- .header
5
- - title = capture_haml do
6
- - if file_page
7
- = values[:short_name]
8
- - else
9
- %span.type= values[:classmod]
10
- = values[:full_name]
11
- - if title_in_description
12
- .name= title
13
- - else
14
- %h1.name= title
15
-
16
- - if file_page
17
- .paths
18
- = values[:full_path]
19
- - if values[:cvsurl]
20
- == (#{link_to 'view online', values[:cvsurl]})
21
- - else
22
- %ol.paths
23
- - values[:infiles].each_with_index do |file, index|
24
- %li{ :class => index > 0 ? 'other' : nil }
25
- = link_to file[:full_path], file[:full_path_url]
26
- - if file[:cvsurl]
27
- == (#{link_to 'view online', file[:cvsurl]})
28
- - if values[:infiles].size > 1
29
- %li
30
- %a.show{ :href => '#', :onclick => 'this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false' } show all
31
-
32
- - if values[:parent] then
33
- .parent
34
- Parent:
35
- %strong= link_to values[:parent], values[:par_url]
36
-
37
- - if values[:dtm_modified]
38
- .last-update
39
- Last Update:
40
- %span.datetime= values[:dtm_modified]
41
-
42
- #content
43
- - if values[:diagram]
44
- #diagram= values[:diagram]
45
-
46
- #text
47
- - if values[:description]
48
- #description~ sanitize_code_blocks values[:description]
49
-
50
- = yield