Browse Source

Include newsletter into news feeds just like other news

master
Reinhard Müller 3 months ago
parent
commit
b2bfeda55f
8 changed files with 15 additions and 56 deletions
  1. 2
    0
      activities/ftf/avm-gpl-violation.sources
  2. 4
    0
      index.sources
  3. 0
    15
      index.xsl
  4. 2
    3
      news/news.xsl
  5. 4
    0
      press/press.sources
  6. 2
    2
      press/press.xsl
  7. 0
    12
      tools/xsltsl/feeds.xsl
  8. 1
    24
      tools/xsltsl/tagging.xsl

+ 2
- 0
activities/ftf/avm-gpl-violation.sources View File

@@ -1,2 +1,4 @@
1 1
 news/*/news-*:[avm]
2 2
 news/*/.news-*:[avm]
3
+news/nl/nl-*:[avm]
4
+news/nl/.nl-*:[avm]

+ 4
- 0
index.sources View File

@@ -2,6 +2,10 @@ news/$thisyear/news-*:[front-page]
2 2
 news/$lastyear/news-*:[front-page]
3 3
 news/$thisyear/.news-*:[front-page]
4 4
 news/$lastyear/.news-*:[front-page]
5
+news/nl/nl-$thisyear*:[front-page]
6
+news/nl/nl-$lastyear*:[front-page]
7
+news/nl/.nl-$thisyear*:[front-page]
8
+news/nl/.nl-$lastyear*:[front-page]
5 9
 events/$thisyear/event-*:[front-page]
6 10
 tools/frontpage/*:[]
7 11
 tools/static-elements/element-*:[]

+ 0
- 15
index.xsl View File

@@ -36,21 +36,6 @@
36 36
     
37 37
   </xsl:template>
38 38
   
39
-  <!--display dynamic list of newsletters items-->
40
-  <xsl:template match="all-newsletters">
41
-    <xsl:call-template name="fetch-newsletters">
42
-      <xsl:with-param name="nb-items" select="0" />
43
-    </xsl:call-template>
44
-
45
-    <!--xsl:element name="p">
46
-      <xsl:element name="a">
47
-        <xsl:attribute name="href">/news/news.html</xsl:attribute>
48
-        <xsl:attribute name="class">learn-more</xsl:attribute>
49
-        <xsl:call-template name="more-news" /><xsl:text></xsl:text>
50
-      </xsl:element>
51
-    </xsl:element-->
52
-  </xsl:template>
53
-  
54 39
   <!--display dynamic list of event items-->
55 40
   <xsl:template match="all-events">
56 41
     <!-- Current events -->

+ 2
- 3
news/news.xsl View File

@@ -20,10 +20,9 @@
20 20
       <xsl:value-of select="/buildinfo/@date" />
21 21
     </xsl:variable>
22 22
 
23
-    <!-- show news except those in the future, but no newsletters -->
23
+    <!-- show news except those in the future -->
24 24
     <xsl:for-each select="/buildinfo/document/set/news
25
-                          [translate (@date, '-', '') &lt;= translate ($today, '-', '')
26
-                          and not (@type = 'newsletter')]">
25
+                          [translate (@date, '-', '') &lt;= translate ($today, '-', '')]">
27 26
       <xsl:sort select="@date" order="descending" />
28 27
 
29 28
       <!-- begin: news entry -->

+ 4
- 0
press/press.sources View File

@@ -2,3 +2,7 @@ news/$thisyear/news-*:[]
2 2
 news/$lastyear/news-*:[]
3 3
 news/$thisyear/.news-*:[]
4 4
 news/$lastyear/.news-*:[]
5
+news/nl/nl-$thisyear*:[]
6
+news/nl/nl-$lastyear*:[]
7
+news/nl/.nl-$thisyear*:[]
8
+news/nl/.nl-$lastyear*:[]

+ 2
- 2
press/press.xsl View File

@@ -14,8 +14,8 @@
14 14
     <xsl:element name="dl">
15 15
       <xsl:attribute name="id">press-releases</xsl:attribute>
16 16
 
17
-      <!-- Show news except those in the future, but no newsletters -->
18
-      <xsl:for-each select="/buildinfo/document/set/news[translate(@date,'-','')&lt;=translate($today,'-','') and not(@type='newsletter')]">
17
+      <!-- Show news except those in the future -->
18
+      <xsl:for-each select="/buildinfo/document/set/news[translate(@date,'-','')&lt;=translate($today,'-','')]">
19 19
         <xsl:sort select="@date" order="descending" />
20 20
 
21 21
         <!-- A news entry -->

+ 0
- 12
tools/xsltsl/feeds.xsl View File

@@ -79,18 +79,6 @@
79 79
     </xsl:choose>
80 80
   </xsl:template>
81 81
   
82
-  <!-- Show a single newsletter item -->
83
-  <xsl:template name="newsletter">
84
-    <xsl:variable name="link">
85
-      <xsl:value-of select="link" />
86
-    </xsl:variable>
87
-    <li>
88
-      <a href="{link}">
89
-        <xsl:value-of select="title" />
90
-      </a>
91
-    </li>
92
-  </xsl:template>
93
-  
94 82
   <!-- Show a single event -->
95 83
   <xsl:template name="event">
96 84
     <xsl:param name="header" select="''" />

+ 1
- 24
tools/xsltsl/tagging.xsl View File

@@ -19,9 +19,7 @@
19 19
 
20 20
     <xsl:for-each select="/buildinfo/document/set/news[
21 21
       translate(@date, '-', '') &lt;= translate($today, '-', '')
22
-      and ($tag = '' or tags/tag[@key] = $tag or tags/tag = $tag)
23
-      and not(tags/tag = 'newsletter' or tags/tag[@key] = 'newsletter')
24
-      and not( @type = 'newsletter' ) ]"> <!-- Legacy -->
22
+      and ($tag = '' or tags/tag[@key] = $tag or tags/tag = $tag)]">
25 23
       <xsl:sort select="@date" order="descending" />
26 24
 
27 25
       <xsl:if test="$nb-items = '' or position() &lt;= $nb-items">
@@ -33,29 +31,8 @@
33 31
         </xsl:call-template>
34 32
       </xsl:if>
35 33
     </xsl:for-each>
36
-
37
-  </xsl:template>
38
-
39
-  <!--display dynamic list of (not yet tagged) newsletters items-->
40
-
41
-  <xsl:template name="fetch-newsletters">
42
-    <xsl:param name="today" select="/buildinfo/@date" />
43
-    <xsl:param name="nb-items" select="''" />
44
-
45
-    <xsl:for-each select="/buildinfo/document/set/news[
46
-      translate(@date, '-', '') &lt;= translate($today, '-', '')
47
-      and (tags/tag[@key] = 'newsletter' or tags/tag = 'newsletter'
48
-      or @type = 'newsletter' ) ]">
49
-      <xsl:sort select="@date" order="descending" />
50
-
51
-      <xsl:if test="$nb-items = '' or position() &lt;= $nb-items">
52
-        <xsl:call-template name="newsletter" />
53
-      </xsl:if>
54
-    </xsl:for-each>
55
-
56 34
   </xsl:template>
57 35
 
58
-
59 36
   <!--display dynamic list of tagged event items-->
60 37
 
61 38
   <xsl:template name="fetch-events">

Loading…
Cancel
Save