[Koha-patches] [PATCH] Bug 5889: Messages name in english for notifications on public interface.
Chris Nighswonger
cnighswonger at foundations.edu
Tue Mar 22 22:27:56 CET 2011
This patch does not apply to 3.2.x. If it should apply, please fixup
and resubmit with [3.2.x] in the subject line.
Kind Regards,
Chris
cnighs at li24-93:~/koha.3.2.test (3.2.x *+)$ git status
# On branch 3.2.x
# Your branch is ahead of 'origin/3.2.x' by 6 commits.
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: C4/Form/MessagingPreferences.pm
# modified: koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
#
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# both modified: admin/categorie.pl
# both modified:
koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
# both modified:
koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
#
On Thu, Mar 17, 2011 at 5:45 AM, Julian Maurice
<julian.maurice at biblibre.com> wrote:
> From: Sophie Meynieux <sophie.meynieux at biblibre.com>
>
> Modification of template to allow multilanguage support. Alsa fixing columns overflow.
>
> BibLibre bug #5939
> ---
> C4/Form/MessagingPreferences.pm | 1 +
> admin/categorie.pl | 8 +++++---
> .../prog/en/includes/messaging-preference-form.inc | 12 +++++++++---
> .../prog/en/modules/admin/categorie.tmpl | 8 +++++++-
> .../opac-tmpl/prog/en/modules/opac-messaging.tmpl | 12 +++++++++---
> 5 files changed, 31 insertions(+), 10 deletions(-)
>
> diff --git a/C4/Form/MessagingPreferences.pm b/C4/Form/MessagingPreferences.pm
> index bd1c22f..808719f 100644
> --- a/C4/Form/MessagingPreferences.pm
> +++ b/C4/Form/MessagingPreferences.pm
> @@ -122,6 +122,7 @@ sub set_form_values {
> my $messaging_options = C4::Members::Messaging::GetMessagingOptions();
> PREF: foreach my $option ( @$messaging_options ) {
> my $pref = C4::Members::Messaging::GetMessagingPreferences( { %{ $target_params }, message_name => $option->{'message_name'} } );
> + $option->{ $option->{'message_name'} } = 1;
> # make a hashref of the days, selecting one.
> if ( $option->{'takes_days'} ) {
> my $days_in_advance = $pref->{'days_in_advance'} ? $pref->{'days_in_advance'} : 0;
> diff --git a/admin/categorie.pl b/admin/categorie.pl
> index bda7674..4a5d683 100755
> --- a/admin/categorie.pl
> +++ b/admin/categorie.pl
> @@ -240,9 +240,11 @@ sub _get_brief_messaging_prefs {
> my $pref = C4::Members::Messaging::GetMessagingPreferences( { categorycode => $categorycode,
> message_name => $option->{'message_name'} } );
> next unless $pref->{'transports'};
> - my $brief_pref = { message_attribute_id => $option->{'message_attribute_id'},
> - message_name => $option->{'message_name'},
> - };
> + my $brief_pref = {
> + message_attribute_id => $option->{'message_attribute_id'},
> + message_name => $option->{'message_name'},
> + $option->{'message_name'} => 1
> + };
> foreach my $transport ( @{$pref->{'transports'}} ) {
> push @{ $brief_pref->{'transports'} }, { transport => $transport };
> }
> diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
> index 28dc633..f9af076 100644
> --- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
> +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc
> @@ -27,7 +27,13 @@
> </tr>
> <!-- TMPL_LOOP name="messaging_preferences" -->
> <tr>
> - <td><!-- TMPL_VAR NAME="message_name" --></td>
> + <td><!-- TMPL_IF NAME="Item DUE" -->Item DUE
> + <!-- TMPL_ELSIF NAME="Advance Notice" -->Advance Notice
> + <!-- TMPL_ELSIF NAME="Upcoming Events" -->Upcoming Events
> + <!-- TMPL_ELSIF NAME="Hold Filled" -->Hold Filled
> + <!-- TMPL_ELSIF NAME="Item Check-in" -->Item Check-in
> + <!-- TMPL_ELSIF NAME="Item Checkout" -->Item Checkout
> + <!-- TMPL_ELSE -->Unknown <!-- /TMPL_IF --></td>
> <!-- TMPL_IF NAME="takes_days" -->
> <td>
> <!-- TMPL_IF NAME="messaging_form_inactive" -->
> @@ -45,7 +51,7 @@
> <!-- TMPL_ELSE -->
> <td>-</td>
> <!-- /TMPL_IF -->
> - <!-- TMPL_IF NAME="transport_sms" -->
> +<!-- <!-- TMPL_IF NAME="transport_sms" -->
> <!-- TMPL_IF NAME="SMSSendDriver" --><td>
> <!-- TMPL_IF NAME="messaging_form_inactive" -->
> <input type="checkbox"
> @@ -61,7 +67,7 @@
> </td><!-- /TMPL_IF -->
> <!-- TMPL_ELSE -->
> <td>-</td>
> - <!-- /TMPL_IF -->
> + <!-- /TMPL_IF --> -->
>
> <!-- TMPL_IF NAME="transport_email" -->
> <td>
> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
> index 736f3bb..ba9e468 100644
> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
> @@ -323,7 +323,13 @@ Confirm Deletion of Category <!-- TMPL_VAR NAME="categorycode" escape="html" -->
> <td>
> <!-- TMPL_IF NAME="messaging_prefs" -->
> <!-- TMPL_LOOP NAME="messaging_prefs" -->
> - <!-- TMPL_VAR NAME="message_name" --> :
> + <!-- TMPL_IF NAME="Item DUE" -->Item DUE
> + <!-- TMPL_ELSIF NAME="Advance Notice" -->Advance Notice
> + <!-- TMPL_ELSIF NAME="Upcoming Events" -->Upcoming Events
> + <!-- TMPL_ELSIF NAME="Hold Filled" -->Hold Filled
> + <!-- TMPL_ELSIF NAME="Item Check-in" -->Item Check-in
> + <!-- TMPL_ELSIF NAME="Item Checkout" -->Item Checkout
> + <!-- TMPL_ELSE -->Unknown <!-- /TMPL_IF --> :
> <!-- TMPL_LOOP NAME="transports" -->
> <!-- TMPL_VAR NAME="transport" -->
> <!-- /TMPL_LOOP -->
> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
> index 1793a86..c585936 100644
> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
> @@ -39,7 +39,13 @@
> <tr><th> </th><th>Days in advance</th><!-- TMPL_IF NAME="SMSSendDriver" --><th>SMS</th><!-- /TMPL_IF --><th>Email</th><th>Digests only?</th><!-- <th>RSS</th> --><th>Do not notify</th></tr>
> <!-- TMPL_LOOP name="messaging_preferences" -->
> <tr>
> - <td><!-- TMPL_VAR NAME="message_name" --></td>
> + <td><!-- TMPL_IF NAME="Item DUE" -->Item DUE
> + <!-- TMPL_ELSIF NAME="Advance Notice" -->Advance Notice
> + <!-- TMPL_ELSIF NAME="Upcoming Events" -->Upcoming Events
> + <!-- TMPL_ELSIF NAME="Hold Filled" -->Hold Filled
> + <!-- TMPL_ELSIF NAME="Item Check-in" -->Item Check-in
> + <!-- TMPL_ELSIF NAME="Item Checkout" -->Item Checkout
> + <!-- TMPL_ELSE -->Unknown <!-- /TMPL_IF --></td>
> <!-- TMPL_IF NAME="takes_days" -->
> <td><select name="<!-- TMPL_VAR NAME="message_attribute_id" -->-DAYS">
> <!-- TMPL_LOOP name="select_days" -->
> @@ -52,14 +58,14 @@
> <!-- TMPL_ELSE -->
> <td>-</td>
> <!-- /TMPL_IF -->
> - <!-- TMPL_IF NAME="transport_sms" -->
> +<!-- <!-- TMPL_IF NAME="transport_sms" -->
> <!-- TMPL_IF NAME="SMSSendDriver" --><td><input type="checkbox"
> id="sms<!-- TMPL_VAR NAME="message_attribute_id" -->"
> name="<!-- TMPL_VAR NAME="message_attribute_id" -->"
> value="sms" <!-- TMPL_VAR NAME="transport_sms" --> onclick = "document.opacmessaging.none<!-- TMPL_VAR NAME="message_attribute_id" -->.checked=false;" /></td><!-- /TMPL_IF -->
> <!-- TMPL_ELSE -->
> <td>-</td>
> - <!-- /TMPL_IF -->
> + <!-- /TMPL_IF --> -->
>
> <!-- TMPL_IF NAME="transport_email" -->
> <td><input type="checkbox"
> --
> 1.7.4.1
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>
More information about the Koha-patches
mailing list