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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# File 'lib/adiwg/mdtranslator/writers/html/sections/html_usage.rb', line 24
def writeHtml(hUsage)
temporalClass = Html_TemporalExtent.new(@html)
citationClass = Html_Citation.new(@html)
responsibilityClass = Html_Responsibility.new(@html)
@html.em('Usage: ')
@html.section(:class => 'block') do
@html.text!(hUsage[:specificUsage])
end
unless hUsage[:temporalExtents].empty?
@html.details do
@html.summary('Times and Periods of Usage', 'class' => 'h5')
@html.section(:class => 'block') do
hUsage[:temporalExtents].each do |hTemporal|
temporalClass.writeHtml(hTemporal)
end
end
end
end
unless hUsage[:userLimitation].nil? && hUsage[:limitationResponses].empty?
@html.details do
@html.summary('User Defined Limitations', 'class' => 'h5')
@html.section(:class => 'block') do
unless hUsage[:userLimitation].nil?
@html.em('Description')
@html.section(:class => 'block') do
@html.text!(hUsage[:userLimitation])
end
end
hUsage[:limitationResponses].each do |response|
@html.em('Response')
@html.section(:class => 'block') do
@html.text!(response)
end
end
end
end
end
unless hUsage[:identifiedIssue].empty?
@html.details do
@html.summary('Cited Issue', 'class' => 'h5')
@html.section(:class => 'block') do
citationClass.writeHtml(hUsage[:identifiedIssue])
end
end
end
hUsage[:additionalDocumentation].each do |hCitation|
@html.details do
@html.summary('Additional Documentation', 'class' => 'h5')
@html.section(:class => 'block') do
citationClass.writeHtml(hCitation)
end
end
end
unless hUsage[:userContacts].empty?
@html.details do
@html.summary('Usage and Limitation Contacts', {'class' => 'h5'})
@html.section(:class => 'block') do
hUsage[:userContacts].each do |hContact|
@html.details do
@html.summary(hContact[:roleName], 'class' => 'h5')
@html.section(:class => 'block') do
responsibilityClass.writeHtml(hContact)
end
end
end
end
end
end
end
|