polyrex-calendar 0.5.10 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -1
- data.tar.gz.sig +0 -0
- data/lib/lmonth.xsl +86 -0
- data/lib/polyrex-calendar.rb +16 -7
- data/lib/polyrex-calendar.rb~ +1 -0
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 914a02dfd88dc61d7d20e0b58c6bedc0c2947530
|
|
4
|
+
data.tar.gz: b322060a46edea03a05b8ccf39e7e1f30bc70642
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7140294fb8e2dae011bc52538407bab68e9021fb1deddbce1a42fa953eda684767aa19b925f098c6fc783940004c26275957d47b959772ff186e625628bd9a86
|
|
7
|
+
data.tar.gz: c57eb643c34bcd5b3e7712950652e419f461b24efb6aa6830d6c149f61d96d530c7e7de453dd6092a622f902f6e62228027534db56f69bdd9ea4e0553daa749f
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
���g���Y��n�f��(
|
|
2
|
+
k��������BNq%�Ƞ�?�0̃�����s�����õ��f��1
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/lmonth.xsl
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
3
|
+
<xsl:output method="xhtml" indent="yes" />
|
|
4
|
+
|
|
5
|
+
<xsl:template match="month">
|
|
6
|
+
|
|
7
|
+
<html lang="en">
|
|
8
|
+
|
|
9
|
+
<head>
|
|
10
|
+
<title><xsl:value-of select="summary/title"/><xsl:text> </xsl:text><xsl:value-of select="summary/year"/> planner | generated by Polyrex-Calendar</title>
|
|
11
|
+
<link rel="stylesheet" href="month_layout.css"/>
|
|
12
|
+
<link rel="stylesheet" href="month.css"/>
|
|
13
|
+
</head>
|
|
14
|
+
|
|
15
|
+
<body>
|
|
16
|
+
<div id="wrap">
|
|
17
|
+
<header>
|
|
18
|
+
<nav>
|
|
19
|
+
<ul>
|
|
20
|
+
<li><a href='/'>home</a></li>
|
|
21
|
+
<li>calendar</li>
|
|
22
|
+
</ul>
|
|
23
|
+
</nav>
|
|
24
|
+
<nav>
|
|
25
|
+
<ul>
|
|
26
|
+
<li><a href="kplanner.html">kitchen monthly planner</a></li>
|
|
27
|
+
<li><a href="weekly_planner.html">weekly planner</a></li>
|
|
28
|
+
<li><a href="calendar.html">yearly planner</a></li>
|
|
29
|
+
</ul>
|
|
30
|
+
</nav>
|
|
31
|
+
</header>
|
|
32
|
+
<h1><xsl:value-of select="summary/title"/><xsl:text> </xsl:text><xsl:value-of select="summary/year"/></h1>
|
|
33
|
+
<table>
|
|
34
|
+
<tr><th>Sunday</th><th>Monday</th><th>Tuesday</th><th>Wednesday</th><th>Thursday</th><th>Friday</th><th>Saturday</th></tr>
|
|
35
|
+
<xsl:apply-templates select="records"/>
|
|
36
|
+
</table>
|
|
37
|
+
</div>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
40
|
+
|
|
41
|
+
</xsl:template>
|
|
42
|
+
|
|
43
|
+
<xsl:template match="month/summary">
|
|
44
|
+
<caption><xsl:value-of select="title"/></caption>
|
|
45
|
+
</xsl:template>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
<xsl:template match="records/week">
|
|
49
|
+
<tr>
|
|
50
|
+
<xsl:apply-templates select="summary"/>
|
|
51
|
+
<xsl:apply-templates select="records"/>
|
|
52
|
+
</tr>
|
|
53
|
+
</xsl:template>
|
|
54
|
+
|
|
55
|
+
<xsl:template match="week/summary">
|
|
56
|
+
|
|
57
|
+
</xsl:template>
|
|
58
|
+
|
|
59
|
+
<xsl:template match="records/day">
|
|
60
|
+
<xsl:element name='td'>
|
|
61
|
+
<xsl:if test="summary/css_style">
|
|
62
|
+
<xsl:attribute name="class"><xsl:value-of select="summary/css_style"/></xsl:attribute>
|
|
63
|
+
</xsl:if>
|
|
64
|
+
|
|
65
|
+
<div>
|
|
66
|
+
<div><xsl:value-of select="summary/xday"/></div>
|
|
67
|
+
<div><xsl:value-of select="summary/bankholiday"/></div>
|
|
68
|
+
<ul>
|
|
69
|
+
<xsl:if test="summary/event and not(summary/event='')">
|
|
70
|
+
<li><strong><xsl:value-of select="summary/event"/></strong></li>
|
|
71
|
+
</xsl:if>
|
|
72
|
+
<xsl:apply-templates select="records"/>
|
|
73
|
+
</ul>
|
|
74
|
+
</div>
|
|
75
|
+
</xsl:element>
|
|
76
|
+
</xsl:template>
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<xsl:template match="records/entry">
|
|
80
|
+
<xsl:if test="summary/title and not(summary/title='')">
|
|
81
|
+
<li><xsl:value-of select="summary/title"/></li>
|
|
82
|
+
</xsl:if>
|
|
83
|
+
</xsl:template>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
</xsl:stylesheet>
|
data/lib/polyrex-calendar.rb
CHANGED
|
@@ -27,16 +27,25 @@ class PolyrexObjects
|
|
|
27
27
|
month_xsl = fetch_file self.xslt
|
|
28
28
|
month_layout_css = fetch_file self.css_layout
|
|
29
29
|
month_css = fetch_file self.css_style
|
|
30
|
+
|
|
31
|
+
File.write 'month.xsl', month_xsl
|
|
32
|
+
doc = self.to_doc
|
|
33
|
+
|
|
34
|
+
xslt_filename = File.basename self.xslt
|
|
35
|
+
|
|
36
|
+
doc.instructions << [
|
|
37
|
+
'xml-stylesheet',
|
|
38
|
+
"title='XSL_formatting' type='text/xsl' href='month.xsl'"]
|
|
30
39
|
|
|
31
40
|
# add a css selector for the current day
|
|
32
41
|
date = Time.now.strftime("%Y-%b-%d")
|
|
33
|
-
e =
|
|
34
|
-
e.attributes[:
|
|
42
|
+
e = doc.root.element("records/week/records/day/summary[sdate='#{date}']")
|
|
43
|
+
e.attributes[:css_style] = 'today' if e
|
|
35
44
|
|
|
36
|
-
File.write 'self.xml', self.to_xml(pretty: true)
|
|
37
|
-
File.write 'month.xsl', month_xsl
|
|
38
45
|
|
|
39
|
-
|
|
46
|
+
File.write 'month.xml', doc.xml(pretty: true)
|
|
47
|
+
|
|
48
|
+
html = generate_webpage doc.xml, month_xsl
|
|
40
49
|
{self.title.downcase[0..2] + '_calendar.html' => html,
|
|
41
50
|
self.css_layout => month_layout_css, self.css_style => month_css}
|
|
42
51
|
end
|
|
@@ -176,7 +185,7 @@ class PolyrexCalendar < PolyrexCalendarBase
|
|
|
176
185
|
|
|
177
186
|
end
|
|
178
187
|
|
|
179
|
-
pxmonth.xslt = '
|
|
188
|
+
pxmonth.xslt = 'lmonth.xsl'
|
|
180
189
|
pxmonth.css_layout = 'month_layout.css'
|
|
181
190
|
pxmonth.css_style = 'month.css'
|
|
182
191
|
pxmonth
|
|
@@ -263,5 +272,5 @@ class PolyrexCalendar < PolyrexCalendarBase
|
|
|
263
272
|
(10...20).include?(val) ? \
|
|
264
273
|
'th' : %w{ th st nd rd th th th th th th }[val % 10]
|
|
265
274
|
end
|
|
266
|
-
|
|
275
|
+
|
|
267
276
|
end
|
data/lib/polyrex-calendar.rb~
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: polyrex-calendar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
lVRGh/hDZrM+tqTvjxqLAaxm3xsnPfVpEz8i35gI1fQPEYeOYkUFgZQ5gBv1nGDE
|
|
32
32
|
uikNAnes+rZNGg==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2015-05-
|
|
34
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: polyrex_calendarbase
|
|
@@ -64,6 +64,7 @@ files:
|
|
|
64
64
|
- lib/kplanner.xsl
|
|
65
65
|
- lib/kplanner_month.xsl
|
|
66
66
|
- lib/layout.css
|
|
67
|
+
- lib/lmonth.xsl
|
|
67
68
|
- lib/month.css
|
|
68
69
|
- lib/month_calendar.xsl
|
|
69
70
|
- lib/month_layout.css
|
metadata.gz.sig
CHANGED
|
Binary file
|