38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/polyrex-calendar.rb', line 38
def to_webpage()
week_xsl = fetch_file 'week_calendar.xsl'
week_layout_css = fetch_file 'week_layout.css'
week_css = fetch_file 'week.css'
File.write 'self.xml', self.to_xml(pretty: true)
File.write 'week.xsl', week_xsl
date = Time.now.strftime("%Y-%b-%d")
e = self.element("records/day/summary[sdate='#{date}']")
e.attributes[:class] = 'selected' if e
html = generate_webpage self.to_xml, week_xsl
{'week' + self.no + '_planner.html' => html, 'week_layout.css' => week_layout_css, \
'week.css' => week_css}
end
|