View | Details | Raw Unified | Return to bug 7261
Collapse All | Expand All

(-)a/C4/Auth.pm (+2 lines)
Lines 358-363 sub get_template_and_user { Link Here
358
            AmazonSimilarItems          => C4::Context->preference("AmazonSimilarItems"),
358
            AmazonSimilarItems          => C4::Context->preference("AmazonSimilarItems"),
359
            AutoLocation                => C4::Context->preference("AutoLocation"),
359
            AutoLocation                => C4::Context->preference("AutoLocation"),
360
            "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1,
360
            "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1,
361
            CalendarFirstDayOfWeek      => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday")?0:1,
361
            CircAutocompl               => C4::Context->preference("CircAutocompl"),
362
            CircAutocompl               => C4::Context->preference("CircAutocompl"),
362
            FRBRizeEditions             => C4::Context->preference("FRBRizeEditions"),
363
            FRBRizeEditions             => C4::Context->preference("FRBRizeEditions"),
363
            IndependantBranches         => C4::Context->preference("IndependantBranches"),
364
            IndependantBranches         => C4::Context->preference("IndependantBranches"),
Lines 418-423 sub get_template_and_user { Link Here
418
            AnonSuggestions           => "" . C4::Context->preference("AnonSuggestions"),
419
            AnonSuggestions           => "" . C4::Context->preference("AnonSuggestions"),
419
            AuthorisedValueImages     => C4::Context->preference("AuthorisedValueImages"),
420
            AuthorisedValueImages     => C4::Context->preference("AuthorisedValueImages"),
420
            BranchesLoop              => GetBranchesLoop($opac_name),
421
            BranchesLoop              => GetBranchesLoop($opac_name),
422
            CalendarFirstDayOfWeek    => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Monday")?1:0,
421
            LibraryName               => "" . C4::Context->preference("LibraryName"),
423
            LibraryName               => "" . C4::Context->preference("LibraryName"),
422
            LibraryNameTitle          => "" . $LibraryNameTitle,
424
            LibraryNameTitle          => "" . $LibraryNameTitle,
423
            LoginBranchname           => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"",
425
            LoginBranchname           => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"",
(-)a/installer/data/mysql/sysprefs.sql (-1 / +3 lines)
Lines 335-339 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
335
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('LocalCoverImages','0','Display local cover images on intranet details pages.','1','YesNo');
335
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('LocalCoverImages','0','Display local cover images on intranet details pages.','1','YesNo');
336
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowMultipleCovers','0','Allow multiple cover images to be attached to each bibliographic record.','1','YesNo');
336
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowMultipleCovers','0','Allow multiple cover images to be attached to each bibliographic record.','1','YesNo');
337
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
337
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
338
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo');
338
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo');
339
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacExportOptions','bibtex|dc|marcxml|marc8|utf8|marcstd|mods|ris','Define export options available on OPAC detail page.','','free');
339
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacExportOptions','bibtex|dc|marcxml|marc8|utf8|marcstd|mods|ris','Define export options available on OPAC detail page.','','free');
340
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CalendarFirstDayOfWeek','Sunday','Select the first day of week to use in the calendar.','Sunday|Monday','Choice');
341
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 4733-4738 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4733
    print "Upgrade to $DBversion done ( Adding additional options for the display of commenter's identity in the OPAC: Full name, first name, last name, first name and last name first initial, username, or no information)\n";
4733
    print "Upgrade to $DBversion done ( Adding additional options for the display of commenter's identity in the OPAC: Full name, first name, last name, first name and last name first initial, username, or no information)\n";
4734
    SetVersion($DBversion);
4734
    SetVersion($DBversion);
4735
}
4735
}
4736
    
4737
$DBversion = "3.07.00.XXX";
4738
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4739
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CalendarFirstDayOfWeek','Sunday','Select the first day of week to use in the calendar.','Sunday|Monday','Choice');");
4740
    print "Upgrade to $DBversion done (Add syspref CalendarFirstDayOfWeek used to select the first day of week to use in the calendar. )\n";
4741
    SetVersion($DBversion);
4742
}
4736
4743
4737
=head1 FUNCTIONS
4744
=head1 FUNCTIONS
4738
4745
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-1 / +1 lines)
Lines 7-13 Calendar._DN = new Array(_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_(" Link Here
7
Calendar._SDN = new Array(_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat"),_("Sun"));
7
Calendar._SDN = new Array(_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat"),_("Sun"));
8
// First day of the week. "0" means display Sunday first, "1" means display
8
// First day of the week. "0" means display Sunday first, "1" means display
9
// Monday first, etc.
9
// Monday first, etc.
10
Calendar._FD = 1;
10
Calendar._FD = [% CalendarFirstDayOfWeek %];
11
// full month names
11
// full month names
12
Calendar._MN = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
12
Calendar._MN = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
13
// short month names
13
// short month names
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/calendar/calendar-setup.js (-1 / +4 lines)
Lines 69-75 Calendar.setup = function (params) { Link Here
69
	param_default("singleClick",    true);
69
	param_default("singleClick",    true);
70
	param_default("disableFunc",    'dateStatusHandler');
70
	param_default("disableFunc",    'dateStatusHandler');
71
	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
71
	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
72
	param_default("firstDay",       0); // defaults to "Sunday" first
72
	if (Calendar._FD)
73
			param_default("firstDay",       Calendar._FD);
74
		else
75
			param_default("firstDay",       0); // defaults to "Sunday" first
73
	param_default("align",          "Br");
76
	param_default("align",          "Br");
74
	param_default("range",          [1900, 2999]);
77
	param_default("range",          [1900, 2999]);
75
	param_default("weekNumbers",    true);
78
	param_default("weekNumbers",    true);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref (+8 lines)
Lines 9-14 I18N/L10N: Link Here
9
              iso: yyyy-mm-dd
9
              iso: yyyy-mm-dd
10
        - .
10
        - .
11
    -
11
    -
12
        - Use
13
        - pref: CalendarFirstDayOfWeek
14
          default: Sunday
15
          choices:
16
              Sunday: Sunday
17
              Monday: Monday
18
        - as the first day of week in the calendar.
19
    -
12
        - "Enable the following languages on the staff interface:"
20
        - "Enable the following languages on the staff interface:"
13
        - pref: language
21
        - pref: language
14
          type: staff-languages
22
          type: staff-languages
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt (-3 / +4 lines)
Lines 340-346 Link Here
340
                ifFormat : "[% DHTMLcalendar_dateformat %]",
340
                ifFormat : "[% DHTMLcalendar_dateformat %]",
341
                button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
341
                button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
342
                disableFunc : validate[% bibitemloo.biblionumber %],
342
                disableFunc : validate[% bibitemloo.biblionumber %],
343
                dateStatusFunc : validate[% bibitemloo.biblionumber %]
343
                dateStatusFunc : validate[% bibitemloo.biblionumber %],
344
                firstDay : [% CalendarFirstDayOfWeek %]
344
              }
345
              }
345
              );
346
              );
346
              //]]>
347
              //]]>
Lines 372-378 Link Here
372
          ifFormat : "[% DHTMLcalendar_dateformat %]",
373
          ifFormat : "[% DHTMLcalendar_dateformat %]",
373
          button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
374
          button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
374
          disableFunc : validate1,
375
          disableFunc : validate1,
375
          dateStatusFunc : validate1
376
          dateStatusFunc : validate1,
377
          firstDay : [% CalendarFirstDayOfWeek %]
376
        }
378
        }
377
      );
379
      );
378
      //]]>
380
      //]]>
379
- 

Return to bug 7261