You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

macros.ftl 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <#macro LogMacro title version date description log logTitle="">
  2. <#if log??>
  3. <h3 id="${version}" class="section"><a href="#${version}" class="sectionlink"><i class="icon-share-alt"> </i></a>${title} (${version}) <small>${description}</small></h3>
  4. <table class="table">
  5. <tbody>
  6. <tr>
  7. <td style="background-color:inherit;width:100px">${date}</td>
  8. <td style="background-color:inherit;"><@LogDescriptionMacro log=log title=logTitle /></td>
  9. </tr>
  10. </tbody>
  11. </table>
  12. </#if>
  13. </#macro>
  14. <#macro LogDescriptionMacro log title=log.title>
  15. <#if (title!?length > 0)>
  16. <p class="lead">${title}</p>
  17. </#if>
  18. <#if (log.html!?length > 0)>
  19. <p>${log.html}</p>
  20. </#if>
  21. <#if (log.text!?length > 0)>
  22. <blockquote><p>${log.text!?html?replace("\n", "<br />")}</p></blockquote>
  23. </#if>
  24. <#if (log.note!?length > 0)>
  25. <div class="alert alert-info">
  26. <h4>Note</h4>
  27. ${log.note?html?replace("\n", "<p />")}
  28. </div>
  29. </#if>
  30. <#if (log.security!?size > 0)>
  31. <@SecurityListMacro title="security" list=log.security/>
  32. </#if>
  33. <#if (log.fixes!?size > 0)>
  34. <@UnorderedListMacro title="fixes" list=log.fixes />
  35. </#if>
  36. <#if (log.changes!?size > 0)>
  37. <@UnorderedListMacro title="changes" list=log.changes />
  38. </#if>
  39. <#if (log.additions!?size > 0)>
  40. <@UnorderedListMacro title="additions" list=log.additions />
  41. </#if>
  42. <#if (log.settings!?size > 0)>
  43. <@SettingsTableMacro title="new settings" list=log.settings />
  44. </#if>
  45. <#if (log.dependencyChanges!?size > 0)>
  46. <@UnorderedListMacro title="dependency changes" list=log.dependencyChanges />
  47. </#if>
  48. <#if (log.contributors!?size > 0)>
  49. <@UnorderedListMacro title="contributors" list=log.contributors?sort />
  50. </#if>
  51. </#macro>
  52. <#macro SecurityListMacro list title>
  53. <h4 style="color:red;">${title}</h4>
  54. <ul>
  55. <#list list as item>
  56. <li>${item?html?replace("\n", "<br/>")}</li>
  57. </#list>
  58. </ul>
  59. </#macro>
  60. <#macro UnorderedListMacro list title>
  61. <h4>${title}</h4>
  62. <ul>
  63. <#list list as item>
  64. <li>${item?html?replace("\n", "<br/>")}</li>
  65. </#list>
  66. </ul>
  67. </#macro>
  68. <#macro SettingsTableMacro list title>
  69. <h4>${title}</h4>
  70. <table class="table">
  71. <#list list as item>
  72. <tr>
  73. <td><em>${item.name}</em></td><td>${item.defaultValue}</td>
  74. </tr>
  75. </#list>
  76. </table>
  77. </#macro>
  78. <#macro RssMacro posts posturl>
  79. <?xml version="1.0" standalone='yes'?>
  80. <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  81. <channel>
  82. <title><![CDATA[${project.name}]]></title>
  83. <link>${project.url}</link>
  84. <description><![CDATA[${project.description}]]></description>
  85. <generator>Moxie Toolkit</generator>
  86. <#list posts as post>
  87. <item>
  88. <title><![CDATA[${post.title}]]></title>
  89. <link><![CDATA[${posturl}${post.id}]]></link>
  90. <guid isPermaLink="true">${posturl}${post.id}</guid>
  91. <#if (post.text!?length > 0)>
  92. <description><![CDATA[${post.text}]]></description>
  93. </#if>
  94. <#if (post.keywords!?size > 0)>
  95. <#list post.keywords as keyword>
  96. <category><![CDATA[${keyword}]]></category>
  97. </#list>
  98. </#if>
  99. <#if (post.author!?length > 0)>
  100. <dc:creator><![CDATA[${post.author}]]></dc:creator>
  101. <#else>
  102. <dc:creator><![CDATA[${project.name}]]></dc:creator>
  103. </#if>
  104. <pubDate>${post.date?string("EEE, dd MMM yyyy HH:mm:ss Z")}</pubDate>
  105. </item>
  106. </#list>
  107. </channel>
  108. </rss>
  109. </#macro>
  110. <#macro AtomMacro posts posturl>
  111. <?xml version="1.0" standalone='yes'?>
  112. <feed xmlns="http://www.w3.org/2005/Atom">
  113. <generator uri="${project.url}" version="${project.version}">${project.name}</generator>
  114. <title><![CDATA[${project.name}]]></title>
  115. <updated>${project.releaseDate}</updated>
  116. <#list posts as post>
  117. <entry>
  118. <content type="text/plain" />
  119. <title type="text"><![CDATA[${post.title}]]></title>
  120. <#if (post.text!?length > 0)>
  121. <summary type="text"><![CDATA[${post.text}]]></summary>
  122. </#if>
  123. <link href="${posturl}${post.id}" rel="via" />
  124. <guid isPermaLink="true">${posturl}${post.id}</guid>
  125. <#if (post.text!?length > 0)>
  126. <content><![CDATA[${post.text}]]></content>
  127. </#if>
  128. <#if (post.keywords!?size > 0)>
  129. <#list post.keywords as keyword>
  130. <category label="<![CDATA[${keyword}]]>" />
  131. </#list>
  132. </#if>
  133. <published>${post.date?string("yyyy-MM-dd'T'HH:mm:ssZ")}</published>
  134. </entry>
  135. </#list>
  136. </feed>
  137. </#macro>