polyrex-calendar 0.5.10 → 0.5.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4e51a0084d20ac00ff469a26dd8f2aad0bcb494
4
- data.tar.gz: 08dd1c3125aa58d42aa050289aeb12f6aa29d281
3
+ metadata.gz: 914a02dfd88dc61d7d20e0b58c6bedc0c2947530
4
+ data.tar.gz: b322060a46edea03a05b8ccf39e7e1f30bc70642
5
5
  SHA512:
6
- metadata.gz: 58a074ae8ae27f28f1c14106a2b0a19a628b56da739536b662b875d92f503e16f42956e35ea15a0c887b0cc01fed98e5e75fdd1fd95dffd526b04c330e1b1b9e
7
- data.tar.gz: b89ccccb4b4a9e7e73a12e6731c6227ce7cf265096acc54e991e0bcd15d8bd1a6374524a0404adefc6aa9f2f5168583eb3eea2157bc1546cd0f31e0195437517
6
+ metadata.gz: 7140294fb8e2dae011bc52538407bab68e9021fb1deddbce1a42fa953eda684767aa19b925f098c6fc783940004c26275957d47b959772ff186e625628bd9a86
7
+ data.tar.gz: c57eb643c34bcd5b3e7712950652e419f461b24efb6aa6830d6c149f61d96d530c7e7de453dd6092a622f902f6e62228027534db56f69bdd9ea4e0553daa749f
@@ -1 +1,2 @@
1
- 0�����8T�+1��$�>�S��BN2إ\��F�z�S��I�D�����p������/��� �r�i����s�Mt]����������Ԧ&n>��C��Ѷr��w�����r +�r=�ǚ�8�7'�4Q-WkD���2"u{�fg4MY�� 6T���F��V^��v�<5����6�PX�O�B^�F��G���u{��7�Q��:��tv�e��?:���^^=@�����ś�u�� ���j��pBʻ
1
+ ���g���Y��n�f��(
2
+ k��������BNq%�Ƞ�?�0̃�����s�����õ��f��1
data.tar.gz.sig CHANGED
Binary file
@@ -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>
@@ -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 = self.element("records/week/records/day/summary[sdate='#{date}']")
34
- e.attributes[:class] = 'selected' if e
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
- html = generate_webpage self.to_xml, month_xsl
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 = 'month_calendar.xsl'
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
@@ -263,4 +263,5 @@ class PolyrexCalendar < PolyrexCalendarBase
263
263
  (10...20).include?(val) ? \
264
264
  'th' : %w{ th st nd rd th th th th th th }[val % 10]
265
265
  end
266
+
266
267
  end
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.10
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-12 00:00:00.000000000 Z
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