Bug 24584: Rewrite optional/sample_news to YAML
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Wed, 5 Feb 2020 12:46:28 +0000 (09:46 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 9 Mar 2020 13:54:38 +0000 (13:54 +0000)
YAML version of optional sample_news

To test:
1) Same test plan of first patch, only check table
   opac_news

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

installer/data/mysql/en/optional/sample_news.sql [deleted file]
installer/data/mysql/en/optional/sample_news.txt [deleted file]
installer/data/mysql/en/optional/sample_news.yml [new file with mode: 0644]

diff --git a/installer/data/mysql/en/optional/sample_news.sql b/installer/data/mysql/en/optional/sample_news.sql
deleted file mode 100644 (file)
index a060b71..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-INSERT INTO `opac_news` (`title`, `content`, `lang`, `timestamp`, `expirationdate`, `number`) VALUES ('Welcome to Koha','Welcome to Koha. Koha is a full-featured open-source ILS. Developed initially in New Zealand by Katipo Communications Ltd and first deployed in January of 2000 for Horowhenua Library Trust, Koha is currently maintained by a team of software providers and library technology staff from around the globe.','koha','2007-10-29 05:25:58','2099-01-10',1),
-('What\'s Next?','Now that you\'ve installed Koha, what\'s next? Here are some suggestions:\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Read Koha Documentation</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Read/Write to the Koha Wiki</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Read and Contribute to Discussions</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Report Koha Bugs</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\">Submit Patches to Koha using Git (Version Control System)</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Chat with Koha users and developers</a></li>\r\n</ul>\r\n','koha','2007-10-29 05:34:45','2099-01-10',2);
diff --git a/installer/data/mysql/en/optional/sample_news.txt b/installer/data/mysql/en/optional/sample_news.txt
deleted file mode 100644 (file)
index 8848aa3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Sample news items
diff --git a/installer/data/mysql/en/optional/sample_news.yml b/installer/data/mysql/en/optional/sample_news.yml
new file mode 100644 (file)
index 0000000..25998d6
--- /dev/null
@@ -0,0 +1,52 @@
+---
+#
+#  Copyright 2020 Koha Development Team
+#
+#  This file is part of Koha.
+#
+#  Koha is free software; you can redistribute it and/or modify it under the
+#  terms of the GNU General Public License as published by the Free Software
+#  Foundation; either version 2 of the License, or (at your option) any later
+#  version.
+#
+#  Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+#  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License along
+#  with Koha; if not, write to the Free Software Foundation, Inc.,
+#  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+description:
+  - "Sample news items"
+
+tables:
+  - opac_news:
+      translatable: [ title, content ]
+      multiline: [ content ]
+      rows:
+        - title: "Welcome to Koha"
+          content:
+            - "Welcome to Koha. Koha is a full-featured open-source ILS. Developed initially in New Zealand by Katipo Communications Ltd and first deployed in January of 2000 for Horowhenua Library Trust, Koha is currently maintained by a team of software providers and library technology staff from around the globe."
+          lang: "koha"
+          timestamp: "2007-10-29 05:25:58"
+          expirationdate: "2099-01-10"
+          number: 1
+
+        - title: "What's Next?"
+          content:
+            - "Now that you've installed Koha, what's next? Here are some suggestions:"
+            - "<ul>"
+            - "<li><a href=\"http://koha-community.org/documentation/\">Read Koha Documentation</a></li>"
+            - "<li><a href=\"http://wiki.koha-community.org\">Read/Write to the Koha Wiki</a></li>"
+            - "<li><a href=\"http://koha-community.org/support/\">Read and Contribute to Discussions</a></li>"
+            - "<li><a href=\"http://bugs.koha-community.org\">Report Koha Bugs</a></li>"
+            - "<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\">Submit Patches to Koha using Git (Version Control System)</a></li>"
+            - "<li><a href=\"http://koha-community.org/support/\">Chat with Koha users and developers</a></li>"
+            - "</ul>"
+            - ""
+          lang: "koha"
+          timestamp: "2007-10-29 05:34:45"
+          expirationdate: "2099-01-10"
+          number: 2