Browse Source

Bug 21066: Rename publicationdate with published_on

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Jonathan Druart 4 years ago
parent
commit
f1658744c6
  1. 10
      C4/NewsChannels.pm
  2. 2
      installer/data/mysql/de-DE/mandatory/sample_notices.sql
  3. 2
      installer/data/mysql/de-DE/optional/sample_news.sql
  4. 2
      installer/data/mysql/en/mandatory/sample_notices.yml
  5. 4
      installer/data/mysql/en/optional/sample_news.yml
  6. 2
      installer/data/mysql/fr-CA/facultatif/sample_news.sql
  7. 2
      installer/data/mysql/fr-CA/obligatoire/sample_notices.sql
  8. 2
      installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql
  9. 2
      installer/data/mysql/fr-FR/2-Optionel/sample_news.sql
  10. 2
      installer/data/mysql/it-IT/necessari/notices.sql
  11. 2
      installer/data/mysql/it-IT/optional/sample_news.sql
  12. 2
      installer/data/mysql/kohastructure.sql
  13. 2
      installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql
  14. 2
      installer/data/mysql/nb-NO/2-Valgfritt/sample_news.sql
  15. 2
      installer/data/mysql/pl-PL/mandatory/sample_notices.sql
  16. 2
      installer/data/mysql/pl-PL/optional/sample_news.sql
  17. 16
      installer/data/mysql/ru-RU/optional/sample_news.sql
  18. 2
      installer/data/mysql/uk-UA/mandatory/sample_notices.sql
  19. 18
      installer/data/mysql/uk-UA/optional/sample_news.sql
  20. 8
      installer/data/mysql/updatedatabase.pl
  21. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
  22. 2
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
  23. 2
      t/db_dependent/Letters/TemplateToolkit.t
  24. 16
      t/db_dependent/NewsChannels.t
  25. 6
      tools/koha-news.pl

10
C4/NewsChannels.pm

@ -136,7 +136,7 @@ sub get_opac_new {
$sth->execute($idnew);
my $data = $sth->fetchrow_hashref;
$data->{expirationdate} = output_pref({ dt => dt_from_string( $data->{expirationdate} ), dateonly => 1 }) if ( $data->{expirationdate} );
$data->{publicationdate} = output_pref({ dt => dt_from_string( $data->{publicationdate} ), dateonly => 1 });
$data->{published_on} = output_pref({ dt => dt_from_string( $data->{published_on} ), dateonly => 1 });
return $data;
}
@ -146,7 +146,7 @@ sub get_opac_news {
my $dbh = C4::Context->dbh;
my $query = q{
SELECT opac_news.*, branches.branchname,
publicationdate AS newdate,
published_on AS newdate,
borrowers.title AS author_title,
borrowers.firstname AS author_firstname,
borrowers.surname AS author_surname
@ -163,7 +163,7 @@ sub get_opac_news {
$query .= ' AND (opac_news.branchcode IS NULL OR opac_news.branchcode=?)';
push @values,$branchcode;
}
$query.= ' ORDER BY publicationdate DESC ';
$query.= ' ORDER BY published_on DESC ';
#if ($limit) {
# $query.= 'LIMIT 0, ' . $limit;
#}
@ -193,7 +193,7 @@ sub GetNewsToDisplay {
my ($lang,$branch) = @_;
my $dbh = C4::Context->dbh;
my $query = q{
SELECT opac_news.*,publicationdate AS newdate,
SELECT opac_news.*,published_on AS newdate,
borrowers.title AS author_title,
borrowers.firstname AS author_firstname,
borrowers.surname AS author_surname
@ -203,7 +203,7 @@ sub GetNewsToDisplay {
expirationdate >= CURRENT_DATE()
OR expirationdate IS NULL
)
AND publicationdate <= CURDATE()
AND published_on <= CURDATE()
AND (opac_news.lang = '' OR opac_news.lang = ?)
AND (opac_news.branchcode IS NULL OR opac_news.branchcode = ?)
ORDER BY number

2
installer/data/mysql/de-DE/mandatory/sample_notices.sql

@ -87,7 +87,7 @@ Fällig am: <<issues.date_due>><br />
<div class="newsitem">
<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5>
<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.content>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px"><<opac_news.publicationdate>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px"><<opac_news.published_on>></p>
<hr />
</div>
</news>', 1),

2
installer/data/mysql/de-DE/optional/sample_news.sql

@ -1,2 +1,2 @@
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Willkommen bei Koha','Willkommen bei Koha. Koha ist ein vollständiges integriertes Bibliothekssystem. Es wurde ursprünglich in Neuseeland von Katipo Communications Ltd entwickelt und ging im Januar 2000 für den Horowhenua Library Trust zum ersten mal in Produktion. Koha wird heute von einem internationalen Team aus Support-Dienstleistern und Anwendern weiterentwickelt.','koha','2007-10-29 05:25:58','2099-01-10',1),
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Willkommen bei Koha','Willkommen bei Koha. Koha ist ein vollständiges integriertes Bibliothekssystem. Es wurde ursprünglich in Neuseeland von Katipo Communications Ltd entwickelt und ging im Januar 2000 für den Horowhenua Library Trust zum ersten mal in Produktion. Koha wird heute von einem internationalen Team aus Support-Dienstleistern und Anwendern weiterentwickelt.','koha','2007-10-29 05:25:58','2099-01-10',1),
('Was kommt jetzt?','Wie geht es weiter, nachdem Sie Koha installiert haben? Hier einige Vorschläge:\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Lesen Sie die Koha-Dokumentation</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Lesen oder Schreiben Sie im Koha-Wiki</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Verfolgen oder beteiligen Sie sich an Diskussionen</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Melden Sie Bugs</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\">Erstellen Sie Fehlerkorrekturen mit GIT (Versionskontrollsystem)</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Chatten Sie mit Koha-Anwendern und -Entwicklern</a></li>\r\n</ul>\r\n','koha','2007-10-29 05:34:45','2099-01-10',2);

2
installer/data/mysql/en/mandatory/sample_notices.yml

@ -505,7 +505,7 @@ tables:
- "<div class=\"newsitem\">"
- "<h5 style=\"margin-bottom: 1px; margin-top: 1px\"><b><<opac_news.title>></b></h5>"
- "<p style=\"margin-bottom: 1px; margin-top: 1px\"><<opac_news.content>></p>"
- "<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Posted on <<opac_news.publicationdate>></p>"
- "<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Posted on <<opac_news.published_on>></p>"
- "<hr />"
- "</div>"
- "</news>"

4
installer/data/mysql/en/optional/sample_news.yml

@ -29,7 +29,7 @@ tables:
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"
publicationdate: "2007-10-29 05:25:58"
published_on: "2007-10-29 05:25:58"
expirationdate: "2099-01-10"
number: 1
@ -46,6 +46,6 @@ tables:
- "</ul>"
- ""
lang: "koha"
publicationdate: "2007-10-29 05:34:45"
published_on: "2007-10-29 05:34:45"
expirationdate: "2099-01-10"
number: 2

2
installer/data/mysql/fr-CA/facultatif/sample_news.sql

@ -1 +1 @@
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Bienvenue dans Koha !','Bienvenue dans Koha 3, la toute nouvelle version du système intégré de gestion de bibliothèque (SIGB) open source de référence. Développé initialement en Nouvelle Zélande et déployé pour la première fois en janvier 2000, Koha est un projet international soutenu par des sociétés de services en logiciels libres et par des bibliothécaires du monde entier.','koha','2008-01-14 03:25:58','2099-01-10',1),('Et maintenant ?','Félicitations ! vous avez désormais une version opérationnelle de Koha. Et maintenant, que faire ?\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">lisez la documentation de Koha ;</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">lisez et participez au Wiki de Koha ;</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">abonnez-vous aux listes de discussion ;</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">signalez des bugs ;</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/doku.php?id=en:development:git_usage\">proposez des correctifs et des améliorations ;</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">discutez avec les utilisateurs et les développeurs de Koha.</a></li>\r\n</ul>\r\n','koha','2008-01-14 03:34:45','2099-01-10',2);
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Bienvenue dans Koha !','Bienvenue dans Koha 3, la toute nouvelle version du système intégré de gestion de bibliothèque (SIGB) open source de référence. Développé initialement en Nouvelle Zélande et déployé pour la première fois en janvier 2000, Koha est un projet international soutenu par des sociétés de services en logiciels libres et par des bibliothécaires du monde entier.','koha','2008-01-14 03:25:58','2099-01-10',1),('Et maintenant ?','Félicitations ! vous avez désormais une version opérationnelle de Koha. Et maintenant, que faire ?\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">lisez la documentation de Koha ;</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">lisez et participez au Wiki de Koha ;</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">abonnez-vous aux listes de discussion ;</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">signalez des bugs ;</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/doku.php?id=en:development:git_usage\">proposez des correctifs et des améliorations ;</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">discutez avec les utilisateurs et les développeurs de Koha.</a></li>\r\n</ul>\r\n','koha','2008-01-14 03:34:45','2099-01-10',2);

2
installer/data/mysql/fr-CA/obligatoire/sample_notices.sql

@ -4,7 +4,7 @@ INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, m
('circulation','DUE','','Document à rendre aujourd\'hui',0,'Document à rendre aujourd\'hui','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nLe prêt de ce document arrive à expiration aujourd\'hui.\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nMerci de nous le retourner.\r\n\r\n<<branches.branchname>>','email'),
('circulation','DUEDGST','','Document à rendre aujourd\'hui (Résumé)',0,'Document à rendre aujourd\'hui','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous avez <<count>> document(s) dont le prêt arrive à expiration.\r\n\r\nMerci de nous le(s) retourner rapidement.\r\n\r\n<<branches.branchname>>','email'),
('circulation','ISSUEQSLIP','','Ticket rapide de prêts',1,'Ticket rapide de prêts','<h3><<branches.branchname>></h3>\r\nEmprunté par <<borrowers.firstname>> <<borrowers.surname>> <br />\r\n(<<borrowers.cardnumber>>) <br />\r\n\r\n<<today>><br />\r\n\r\n<h4>Emprunté(s) aujourd\'hui</h4>\r\n<checkedout>\r\n<p>\r\n<<biblio.title>><br />\r\nCode-barres : <<items.barcode>><br />\r\nDate de retour : <<issues.date_due>><br />\r\n</p>\r\n</checkedout>','email'),
('circulation','ISSUESLIP','','Ticket de prêts',1,'Ticket de prêts','<h3><<branches.branchname>></h3>\r\nEmprunté par <<borrowers.firstname>> <<borrowers.surname>> <br />\r\n(<<borrowers.cardnumber>>) <br />\r\n\r\n<<today>><br />\r\n\r\n<h4>Emprunté(s) aujourd\'hui</h4>\r\n<checkedout>\r\n<p>\r\n<<biblio.title>> <br />\r\nCode-barres : <<items.barcode>><br />\r\nDate de retour : <<issues.date_due>><br />\r\n</p>\r\n</checkedout>\r\n\r\n<h4>Retards</h4>\r\n<overdue>\r\n<p>\r\n<<biblio.title>> <br />\r\nCode-barres : <<items.barcode>><br />\r\nDate de retour : <<issues.date_due>><br />\r\n</p>\r\n</overdue>\r\n\r\n<hr>\r\n\r\n<h4 style=\"text-align: center; font-style:italic;\">Nouvelles</h4>\r\n<news>\r\n<div class=\"newsitem\">\r\n<h5 style=\"margin-bottom: 1px; margin-top: 1px\"><b><<opac_news.title>></b></h5>\r\n<p style=\"margin-bottom: 1px; margin-top: 1px\"><<opac_news.content>></p>\r\n<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Publiée le <<opac_news.publicationdate>></p>\r\n<hr />\r\n</div>\r\n</news>','email'),
('circulation','ISSUESLIP','','Ticket de prêts',1,'Ticket de prêts','<h3><<branches.branchname>></h3>\r\nEmprunté par <<borrowers.firstname>> <<borrowers.surname>> <br />\r\n(<<borrowers.cardnumber>>) <br />\r\n\r\n<<today>><br />\r\n\r\n<h4>Emprunté(s) aujourd\'hui</h4>\r\n<checkedout>\r\n<p>\r\n<<biblio.title>> <br />\r\nCode-barres : <<items.barcode>><br />\r\nDate de retour : <<issues.date_due>><br />\r\n</p>\r\n</checkedout>\r\n\r\n<h4>Retards</h4>\r\n<overdue>\r\n<p>\r\n<<biblio.title>> <br />\r\nCode-barres : <<items.barcode>><br />\r\nDate de retour : <<issues.date_due>><br />\r\n</p>\r\n</overdue>\r\n\r\n<hr>\r\n\r\n<h4 style=\"text-align: center; font-style:italic;\">Nouvelles</h4>\r\n<news>\r\n<div class=\"newsitem\">\r\n<h5 style=\"margin-bottom: 1px; margin-top: 1px\"><b><<opac_news.title>></b></h5>\r\n<p style=\"margin-bottom: 1px; margin-top: 1px\"><<opac_news.content>></p>\r\n<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Publiée le <<opac_news.published_on>></p>\r\n<hr />\r\n</div>\r\n</news>','email'),
('circulation','ODUE','','Document(s) en retard',0,'Document(s) en retard','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nSelon nos informations, vous avez au moins un document en retard. Merci de retourner ou renouveller ce ou ces documents dans votre bibliothèque le plus rapidement possible.\r\n\r\n<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>> <<branches.branchaddress3>>\r\nTél : <<branches.branchphone>>\r\nFax : <<branches.branchfax>>\r\nCourriel : <<branches.branchemail>>\r\n\r\nSi vous avez le mot de passe de votre compte lecteur, vous pouvez renouveler directement en ligne. Sinon, merci de nous contacter.\r\n\r\nLe ou les documents suivants sont en retard :\r\n\r\n<item>\"<<biblio.title>>\" par <<biblio.author>>, <<items.itemcallnumber>>, code-barres : <<items.barcode>> Amende : <<items.fine>></item>\r\n\r\nMerci de votre attention.\r\n\r\n<<branches.branchname>>','email'),
('circulation','PREDUE','','Document à rendre bientôt',0,'Document à rendre bientôt','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nNous souhaitons vous informer que le prêt de ce document arrive bientôt à expiration :\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
('circulation','PREDUEDGST','','Document à rendre bientôt (Résumé)',0,'Document(s) à rendre bientôt','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous avez <<count>> document(s) dont le prêt arrive bientôt à expiration.\r\n\r\n<<branches.branchname>>','email'),

2
installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql

@ -83,7 +83,7 @@ Retour le : <<issues.date_due>><br />
<div class="newsitem">
<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5>
<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.content>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.publicationdate>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.published_on>></p>
<hr />
</div>
</news>', 1),

2
installer/data/mysql/fr-FR/2-Optionel/sample_news.sql

@ -1 +1 @@
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Bienvenue dans Koha !','Bienvenue dans Koha 3, la toute nouvelle version du système intégré de gestion de bibliothèque (SIGB) open source de référence. Développé initialement en Nouvelle Zélande et déployé pour la première fois en janvier 2000, Koha est un projet international soutenu par des sociétés de services en logiciels libres et par des bibliothécaires du monde entier.','koha','2008-01-14 03:25:58','2099-01-10',1),('Et maintenant ?','Félicitations ! vous avez désormais une version opérationnelle de Koha. Et maintenant, que faire ?\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">lisez la documentation de Koha ;</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">lisez et participez au Wiki de Koha ;</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">abonnez-vous aux listes de discussion ;</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">signalez des bugs ;</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/doku.php?id=en:development:git_usage\">proposez des correctifs et des améliorations ;</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">discutez avec les utilisateurs et les développeurs de Koha.</a></li>\r\n</ul>\r\n','koha','2008-01-14 03:34:45','2099-01-10',2);
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Bienvenue dans Koha !','Bienvenue dans Koha 3, la toute nouvelle version du système intégré de gestion de bibliothèque (SIGB) open source de référence. Développé initialement en Nouvelle Zélande et déployé pour la première fois en janvier 2000, Koha est un projet international soutenu par des sociétés de services en logiciels libres et par des bibliothécaires du monde entier.','koha','2008-01-14 03:25:58','2099-01-10',1),('Et maintenant ?','Félicitations ! vous avez désormais une version opérationnelle de Koha. Et maintenant, que faire ?\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">lisez la documentation de Koha ;</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">lisez et participez au Wiki de Koha ;</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">abonnez-vous aux listes de discussion ;</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">signalez des bugs ;</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/doku.php?id=en:development:git_usage\">proposez des correctifs et des améliorations ;</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">discutez avec les utilisateurs et les développeurs de Koha.</a></li>\r\n</ul>\r\n','koha','2008-01-14 03:34:45','2099-01-10',2);

2
installer/data/mysql/it-IT/necessari/notices.sql

@ -88,7 +88,7 @@ Data di scadenza: <<issues.date_due>><br />
<div class="newsitem">
<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5>
<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.content>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Inserite il <<opac_news.publicationdate>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Inserite il <<opac_news.published_on>></p>
<hr />
</div>
</news>', 1),

2
installer/data/mysql/it-IT/optional/sample_news.sql

@ -13,6 +13,6 @@
--
-- Dump dei dati per la tabella 'opac_news'
--
INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES
INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES
('Benvenuto in Koha', '<p>Koha è un gestionale di biblioteca (ILS) completo e Open Source. Sviluppato inzialmente in New Zealand da Katipo Communications Ltd e messo in linea per la prima volta nel gennaio 2000 per il Horowhenua Library Trust, Koha è ora mantenuto da un gruppo di aziende di servizi e dipendenti di biblioteca distribuiti in tutto il mondo.</p>', 'koha', '2007-10-29 00:00:00', '2099-01-10', 1),
('Cosa c''è di nuovo ?', '<p>Ora che hai installato cosa, qual''è il passo successivo ? Qui alcuni suggerimenti:</p>\r\n<ul>\r\n<li><a href="http://koha-community.org/documentation/">Leggi la documentazione di Koha</a></li>\r\n<li><a href="http://wiki.koha-community.org">Leggi/aggiorna il Wiki di Koha Wiki</a></li>\r\n<li><a href="http://koha-commaunity.org/support/koha-mailing-lists/">Leggi e contribusci alle liste di discussione</a></li>\r\n<li><a href="http://bugs.koha-community.org">Descrivi e segnala i bug di Koha</a></li>\r\n<li>Chatta con gli utenti e gli sviluppatori di Koha sul server irc.katipo.co.nz, porta 6667 canale #koha</li>\r\n<li><a href="http://stats.workbuffer.org/irclog/koha/today">Leggi il log della chat di Koha di oggi</a></li>\r\n</ul>\r\n', 'koha', '2007-10-29 00:00:00', '2099-01-10', 2);

2
installer/data/mysql/kohastructure.sql

@ -1726,7 +1726,7 @@ CREATE TABLE `opac_news` ( -- data from the news tool
`title` varchar(250) NOT NULL default '', -- title of the news article
`content` MEDIUMTEXT NOT NULL, -- the body of your news article
`lang` varchar(50) NOT NULL default '', -- location for the article (koha is the staff interface, slip is the circulation receipt and language codes are for the opac)
`publicationdate` date DEFAULT NULL, -- publication date
`published_on` date DEFAULT NULL, -- publication date
`updated_on` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification
`expirationdate` date default NULL, -- date the article is set to expire or no longer be visible
`number` int(11) default NULL, -- the order in which this article appears in that specific location

2
installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql

@ -103,7 +103,7 @@ Innleveringsfrist: <<issues.date_due>><br />
<div class="newsitem">
<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5>
<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.content>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Publisert <<opac_news.publicationdate>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Publisert <<opac_news.published_on>></p>
<hr />
</div>
</news>', 1),

2
installer/data/mysql/nb-NO/2-Valgfritt/sample_news.sql

@ -1,2 +1,2 @@
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Velkommen til Koha!','Velkommen til Koha. Koha er et biblioteksystem rikt på funksjoner. Koha ble opprinnelig utviklet i New Zealand av Katipo Communications Ltd og først tatt i bruk i januar 2000 av Horowhenua Library Trust. I dag vedlikeholdes Koha av et verdensomspennende fellesskap av bibliotek og leverandører.','koha',DATE_SUB(NOW(), INTERVAL 1 DAY),'2099-01-10',1),
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Velkommen til Koha!','Velkommen til Koha. Koha er et biblioteksystem rikt på funksjoner. Koha ble opprinnelig utviklet i New Zealand av Katipo Communications Ltd og først tatt i bruk i januar 2000 av Horowhenua Library Trust. I dag vedlikeholdes Koha av et verdensomspennende fellesskap av bibliotek og leverandører.','koha',DATE_SUB(NOW(), INTERVAL 1 DAY),'2099-01-10',1),
('Hva nå?','Hva kan du gjøre nå som du har installert Koha? Her er noen forslag:\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Les dokumentasjon</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Les eller bidra til Koha sin wiki</a></li>\r\n<li><a href=\"http://koha-community.org/get-involved/\">Les og delta i diskusjoner</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Meld fra om feil og mangler</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\">Send inn feilrettinger med Git (versjonskontrollsystem)</a></li>\r\n<li><a href=\"http://koha-community.org/get-involved/irc/\">Chat med Koha-brukere og -utviklere</a></li>\r\n</ul>\r\n','koha',DATE_SUB(NOW(), INTERVAL 1 DAY),'2099-01-10',2);

2
installer/data/mysql/pl-PL/mandatory/sample_notices.sql

@ -82,7 +82,7 @@ Date due: <<issues.date_due>><br />
<div class="newsitem">
<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5>
<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.content>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.publicationdate>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.published_on>></p>
<hr />
</div>
</news>', 1),

2
installer/data/mysql/pl-PL/optional/sample_news.sql

@ -1,3 +1,3 @@
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES ('Witaj w Koha.','Koha to profesjonalny system biblioteczny o otwartym kodzie. Stworzony w Nowej Zelandii przez Katipo Communications Ltd (wdrożony po raz pierwszy w styczniu 2000 r. Horowhenua Library Trust) jest obecnie rozwijany przez grupe programistów i bibliotekarzy z całego świata..','koha','2007-10-29 05:25:58','2099-01-10',1),
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES ('Witaj w Koha.','Koha to profesjonalny system biblioteczny o otwartym kodzie. Stworzony w Nowej Zelandii przez Katipo Communications Ltd (wdrożony po raz pierwszy w styczniu 2000 r. Horowhenua Library Trust) jest obecnie rozwijany przez grupe programistów i bibliotekarzy z całego świata..','koha','2007-10-29 05:25:58','2099-01-10',1),
('Co dalej?','Zainstalowałeś Koha - i co dalej? Poniżej znajdziesz kilka wskazówek:
\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Zapoznaj się z dokumentacją</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Czytaj/Edytuj Koha Wiki</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Weź udział w dyskusji</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Zgłość błąd</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\">Wyślij patch przy uzyciu Git (Version Control System)</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Porozmawiaj z twórcami i użytkownikami Koha</a></li>\r\n</ul>\r\n','koha','2007-10-29 05:34:45','2099-01-10',2);

16
installer/data/mysql/ru-RU/optional/sample_news.sql

@ -1,25 +1,25 @@
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `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.','en','2008-05-28 22:45:42','2099-01-10',1);
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES
('Ласкаво просимо до Коха','Ласкаво просимо до Коха. Коха є повнофункціональною АБІС з відкритими джерельними кодам. Розроблена спочатку в Новій Зеландії компанією Katipo Communications Ltd і вперше випущена в січні 2000 року для бібліотечного консорціуму Хороунеа. Коха в даний час підтримується групою постачальників програмного забезпечення і фахівцями з бібліотечних технологій зі всієї земної кулі. ','uk-UA','2008-05-28 22:48:29','2099-01-10',1);
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES
('Добро пожаловать в Коха','Добро пожаловать в Коха. Коха является полнофункциональной АБИС с открытыми исходниками. Разработана первоначально в Новой Зеландии компанией Katipo Communications Ltd и впервые выпущена в январе 2000 года для библиотечного консорциума Хороунеа, Коха в настоящее время поддерживается группой поставщиков программного обеспечения и специалистами по библиотечным технологиям со всего земного шара. ','ru-RU','2007-10-29 05:25:58','2099-01-10',1);
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES
('Добро пожаловать в Коха','Добро пожаловать в Коха. Коха является полнофункциональной АБИС с открытыми исходниками. Разработана первоначально в Новой Зеландии компанией Katipo Communications Ltd и впервые выпущена в январе 2000 года для библиотечного консорциума Хороунеа, Коха в настоящее время поддерживается группой поставщиков программного обеспечения и специалистами по библиотечным технологиям со всего земного шара. ','koha','2007-10-29 05:25:58','2099-01-10',1);
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES
('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','en','2007-10-29 05:34:45','2099-01-10',2);
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES
('Що далі?','Тепер, коли Ви встановили Коха, що ж далі? Ось деякі пропозиції:\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Читайте документацію про Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Читайте/пишіть на Коха Wiki</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Читайте і беріть участь в обговореннях</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Рапортуйте про недоліки Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\"> Подавайте патчі для Коха, використовуючи Git (система контролю версій)</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Чат користувачів та розробників Коха</a></li>\r\n</ul>','uk-UA','2008-05-28 23:07:23','2099-01-10',2);
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES
('Что дальше?','Теперь, когда Вы установили Коха, что же дальше? Вот некоторые предложения:\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Читайте документацию про Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Читайте/пишите на Коха Wiki</a></li>\r\n<li><a href=\"http://koha-community.org/support/\"> Читайте и принимайте участие в обсуждениях</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Отитывайтесь про недочеты Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\"> Подавайте патчи для Коха, используя Git (система контроля версий)</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Чат пользователей и разработчиков Коха</a></li>\r\n</ul>','ru-RU','2008-05-28 23:02:25','2099-01-10',2);
INSERT INTO `opac_news` (`title`, `content`, `lang`, `publicationdate`, `expirationdate`, `number`) VALUES
INSERT INTO `opac_news` (`title`, `content`, `lang`, `published_on`, `expirationdate`, `number`) VALUES
('Что дальше?','Теперь, когда Вы установили Коха, что же дальше? Вот некоторые предложения:\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Читайте документацию про Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Читайте/пишите на Коха Wiki</a></li>\r\n<li><a href=\"http://koha-community.org/support/\"> Читайте и принимайте участие в обсуждениях</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Отитывайтесь про недочеты Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\"> Подавайте патчи для Коха, используя Git (система контроля версий)</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Чат пользователей и разработчиков Коха</a></li>\r\n</ul>','koha','2008-05-28 23:02:25','2099-01-10',2);

2
installer/data/mysql/uk-UA/mandatory/sample_notices.sql

@ -154,7 +154,7 @@ INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES
<div class="newsitem">
<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5>
<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.content>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Вивішено <<opac_news.publicationdate>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Вивішено <<opac_news.published_on>></p>
<hr />
</div>
</news>',

18
installer/data/mysql/uk-UA/optional/sample_news.sql

@ -5,45 +5,45 @@
-- title -- title of the news article
-- new -- the body of your news article
-- lang -- location for the article (koha is the staff client, slip is the circulation receipt and language codes are for the opac)
-- publicationdate -- publication date
-- published_on -- publication date
-- expirationdate -- date the article is set to expire or no longer be visible
-- number -- the order in which this article appears in that specific location
-- borrowernumber -- The user who created the news article
-- Бібліотечний інтерфейс
INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES
INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES
('Ласкаво просимо до Коха','Ласкаво просимо до Коха. Коха є повнофункціональною АБІС з відкритими джерельними текстами. Розроблена спочатку в Новій Зеландії компанією Katipo Communications Ltd і вперше випущена у січні 2000 року для бібліотечного консорціуму Хороунеа. Коха на даний час підтримується групою постачальників програмного забезпечення та фахівцями з бібліотечних технологій зі всієї земної кулі.',
'koha',NOW(),'2099-01-10',1);
-- DATE_SUB(NOW(), INTERVAL 1 DAY)
INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES
INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES
('Що далі?','Тепер, коли Ви встановили Коха, що ж далі? Ось деякі пропозиції:\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Читайте документацію про Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Читайте/пишіть на Коха Wiki</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Читайте і беріть участь в обговореннях</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Рапортуйте про недоліки Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\"> Подавайте латки для Коха, використовуючи Git (система контролю версій)</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Чат користувачів та розробників Коха</a></li>\r\n</ul>',
'koha',NOW(),'2099-01-10',2);
-- Електронний каталог / укр
INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES
INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES
('Ласкаво просимо до Коха','Ласкаво просимо до Коха. Коха є повнофункціональною АБІС з відкритими джерельними текстами. Розроблена спочатку в Новій Зеландії компанією Katipo Communications Ltd і вперше випущена у січні 2000 року для бібліотечного консорціуму Хороунеа. Коха на даний час підтримується групою постачальників програмного забезпечення та фахівцями з бібліотечних технологій зі всієї земної кулі.',
'uk-UA',NOW(),'2099-01-10',1);
INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES
INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES
('Що далі?','Тепер, коли Ви встановили Коха, що ж далі? Ось деякі пропозиції:\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Читайте документацію про Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Читайте/пишіть на Коха Wiki</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Читайте і беріть участь в обговореннях</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Рапортуйте про недоліки Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\"> Подавайте латки для Коха, використовуючи Git (система контролю версій)</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Чат користувачів та розробників Коха</a></li>\r\n</ul>',
'uk-UA',NOW(),'2099-01-10',2);
-- Електронний каталог / рос
INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES
INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES
('Добро пожаловать в Коха','Добро пожаловать в Коха. Коха является полнофункциональной АБИС с открытыми исходниками. Разработана первоначально в Новой Зеландии компанией Katipo Communications Ltd и впервые выпущена в январе 2000 года для библиотечного консорциума Хороунеа. Коха в настоящее время поддерживается группой поставщиков программного обеспечения и специалистами по библиотечным технологиям со всего земного шара.',
'ru-RU',NOW(),'2099-01-10',1);
INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES
INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES
('Что дальше?','Теперь, когда Вы установили Коха, что же дальше? Вот некоторые предложения:\r\n<ul>\r\n<li><a href=\"http://koha-community.org/documentation/\">Читайте документацию про Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org\">Читайте/пишите на Коха Wiki</a></li>\r\n<li><a href=\"http://koha-community.org/support/\"> Читайте и принимайте участие в обсуждениях</a></li>\r\n<li><a href=\"http://bugs.koha-community.org\">Отчитывайтесь про недочеты Коха</a></li>\r\n<li><a href=\"http://wiki.koha-community.org/wiki/Version_Control_Using_Git\"> Подавайте патчи для Коха, используя Git (система контроля версий)</a></li>\r\n<li><a href=\"http://koha-community.org/support/\">Чат пользователей и разработчиков Коха</a></li>\r\n</ul>',
'ru-RU',NOW(),'2099-01-10',2);
-- Електронний каталог / англ
INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES
INSERT INTO opac_news (title, content, lang, published_on, 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.',
'en',NOW(),'2099-01-10',1);
INSERT INTO opac_news (title, content, lang, publicationdate, expirationdate, number) VALUES
INSERT INTO opac_news (title, content, lang, published_on, expirationdate, number) VALUES
('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',
'en',NOW(),'2099-01-10',2);

8
installer/data/mysql/updatedatabase.pl

@ -22730,13 +22730,13 @@ if( CheckVersion( $DBversion ) ) {
if( column_exists( 'opac_news', 'timestamp' ) ) {
$dbh->do(q|
ALTER TABLE opac_news
CHANGE COLUMN timestamp publicationdate date DEFAULT NULL
CHANGE COLUMN timestamp published_on date DEFAULT NULL
|);
}
if( !column_exists( 'opac_news', 'updated_on' ) ) {
$dbh->do(q|
ALTER TABLE opac_news
ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER publicationdate
ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER published_on
|);
}
@ -22744,9 +22744,9 @@ if( CheckVersion( $DBversion ) ) {
UPDATE letter
SET content = REPLACE(content,?,?)
WHERE content LIKE ?
|, undef, 'opac_news.timestamp', 'opac_news.publicationdate', '%opac_news.timestamp%' );
|, undef, 'opac_news.timestamp', 'opac_news.published_on', '%opac_news.timestamp%' );
NewVersion( $DBversion, 21066, ["Update table opac_news", "Replace timestamp references in letters table"] );
NewVersion( $DBversion, 21066, ["Rename column opac_news.timestamp with published_on", "Add new column opac_news.updated_on", "Replace timestamp references in letters table"] );
}
# SEE bug 13068

2
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt

@ -83,7 +83,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
</li>
<li>
<label for="from">Publication date: </label>
<input id="from" type="text" name="publicationdate" size="15" value="[% new_detail.publicationdate | html %]" class="datepickerfrom" />
<input id="from" type="text" name="published_on" size="15" value="[% new_detail.published_on | html %]" class="datepickerfrom" />
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</li>
<li>

2
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt

@ -94,7 +94,7 @@
</h4>
<div class="newsbody">[% koha_new.content | $raw %]</div>
<div class="newsfooter">
Published on [% koha_new.publicationdate | $KohaDates %]
Published on [% koha_new.published_on | $KohaDates %]
[% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %]
by <span class="newsauthor_title">[% koha_new.author_title | html %] </span>[% koha_new.author_firstname | html %] [% koha_new.author_surname | html %]
[% END %]

2
t/db_dependent/Letters/TemplateToolkit.t

@ -658,7 +658,7 @@ Date due: <<issues.date_due | dateonly>><br />
<div class="newsitem">
<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5>
<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.content>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.publicationdate>></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.published_on>></p>
<hr />
</div>
</news>

16
t/db_dependent/NewsChannels.t

@ -74,7 +74,7 @@ my $href_entry1 = {
content => $new1,
lang => $lang1,
expirationdate => $expirationdate1,
publicationdate=> $timestamp1,
published_on=> $timestamp1,
number => $number1,
branchcode => 'LIB1',
};
@ -89,7 +89,7 @@ my $href_entry2 = {
content => $new2,
lang => $lang2,
expirationdate => $expirationdate2,
publicationdate=> $timestamp2,
published_on=> $timestamp2,
number => $number2,
borrowernumber => $brwrnmbr,
branchcode => 'LIB1',
@ -103,7 +103,7 @@ my $href_entry3 = {
title => $title3,
content => $new3,
lang => $lang3,
publicationdate=> $timestamp3,
published_on=> $timestamp3,
number => $number3,
borrowernumber => $brwrnmbr,
branchcode => 'LIB1',
@ -114,14 +114,14 @@ is( $rv, 1, 'Successfully added the third dummy news item without expiration dat
# We need to determine the idnew in a non-MySQLism way.
# This should be good enough.
my $query =
q{ SELECT idnew from opac_news WHERE publicationdate='2000-01-01' AND expirationdate='2999-12-30'; };
q{ SELECT idnew from opac_news WHERE published_on='2000-01-01' AND expirationdate='2999-12-30'; };
my ( $idnew1 ) = $dbh->selectrow_array( $query );
$query =
q{ SELECT idnew from opac_news WHERE publicationdate='2000-01-01' AND expirationdate='2999-12-31'; };
q{ SELECT idnew from opac_news WHERE published_on='2000-01-01' AND expirationdate='2999-12-31'; };
my ( $idnew2 ) = $dbh->selectrow_array( $query );
$query =
q{ SELECT idnew from opac_news WHERE publicationdate='2000-01-02'; };
q{ SELECT idnew from opac_news WHERE published_on='2000-01-02'; };
my ( $idnew3 ) = $dbh->selectrow_array( $query );
# Test upd_opac_new
@ -148,7 +148,7 @@ is_deeply(
content => $new1,
lang => $lang1,
expirationdate => $expirationdate1,
publicationdate=> $timestamp1,
published_on=> $timestamp1,
number => $number1,
borrowernumber => undef,
idnew => $idnew1,
@ -168,7 +168,7 @@ is_deeply(
content => $new2,
lang => $lang2,
expirationdate => $expirationdate2,
publicationdate=> $timestamp2,
published_on=> $timestamp2,
number => $number2,
borrowernumber => $brwrnmbr,
idnew => $idnew2,

6
tools/koha-news.pl

@ -42,7 +42,7 @@ my $expirationdate;
if ( $cgi->param('expirationdate') ) {
$expirationdate = output_pref({ dt => dt_from_string( scalar $cgi->param('expirationdate') ), dateformat => 'iso', dateonly => 1 });
}
my $publicationdate= output_pref({ dt => dt_from_string( scalar $cgi->param('publicationdate') ), dateformat => 'iso', dateonly => 1 });
my $published_on= output_pref({ dt => dt_from_string( scalar $cgi->param('published_on') ), dateformat => 'iso', dateonly => 1 });
my $number = $cgi->param('number');
my $lang = $cgi->param('lang');
my $branchcode = $cgi->param('branch');
@ -109,7 +109,7 @@ elsif ( $op eq 'add' ) {
content => $content,
lang => $lang,
expirationdate => $expirationdate,
publicationdate=> $publicationdate,
published_on=> $published_on,
number => $number,
branchcode => $branchcode,
borrowernumber => $borrowernumber,
@ -129,7 +129,7 @@ elsif ( $op eq 'edit' ) {
content => $content,
lang => $lang,
expirationdate => $expirationdate,
publicationdate=> $publicationdate,
published_on=> $published_on,
number => $number,
branchcode => $branchcode,
}

Loading…
Cancel
Save