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

(-)a/C4/Auth.pm (+2 lines)
Lines 369-374 sub get_template_and_user { Link Here
369
            AmazonSimilarItems          => C4::Context->preference("AmazonSimilarItems"),
369
            AmazonSimilarItems          => C4::Context->preference("AmazonSimilarItems"),
370
            AutoLocation                => C4::Context->preference("AutoLocation"),
370
            AutoLocation                => C4::Context->preference("AutoLocation"),
371
            "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1,
371
            "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1,
372
            CalendarFirstDayOfWeek      => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday")?0:1,
372
            CircAutocompl               => C4::Context->preference("CircAutocompl"),
373
            CircAutocompl               => C4::Context->preference("CircAutocompl"),
373
            FRBRizeEditions             => C4::Context->preference("FRBRizeEditions"),
374
            FRBRizeEditions             => C4::Context->preference("FRBRizeEditions"),
374
            IndependantBranches         => C4::Context->preference("IndependantBranches"),
375
            IndependantBranches         => C4::Context->preference("IndependantBranches"),
Lines 429-434 sub get_template_and_user { Link Here
429
            AnonSuggestions           => "" . C4::Context->preference("AnonSuggestions"),
430
            AnonSuggestions           => "" . C4::Context->preference("AnonSuggestions"),
430
            AuthorisedValueImages     => C4::Context->preference("AuthorisedValueImages"),
431
            AuthorisedValueImages     => C4::Context->preference("AuthorisedValueImages"),
431
            BranchesLoop              => GetBranchesLoop($opac_name),
432
            BranchesLoop              => GetBranchesLoop($opac_name),
433
            CalendarFirstDayOfWeek    => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Monday")?1:0,
432
            LibraryName               => "" . C4::Context->preference("LibraryName"),
434
            LibraryName               => "" . C4::Context->preference("LibraryName"),
433
            LibraryNameTitle          => "" . $LibraryNameTitle,
435
            LibraryNameTitle          => "" . $LibraryNameTitle,
434
            LoginBranchname           => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"",
436
            LoginBranchname           => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"",
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 334-336 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
334
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('LocalCoverImages','0','Display local cover images on intranet details pages.','1','YesNo');
334
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 ('AllowMultipleCovers','0','Allow multiple cover images to be attached to each bibliographic record.','1','YesNo');
335
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('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice');
336
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('CalendarFirstDayOfWeek','Sunday','Select the first day of week to use in the calendar.','Sunday|Monday','Choice');
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 4663-4668 ENDOFRENEWAL Link Here
4663
    print "Upgrade to $DBversion done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
4663
    print "Upgrade to $DBversion done (Added a system preference to allow renewal of Patron account either from todays date or from existing expiry date in the patrons account.)\n";
4664
    SetVersion($DBversion);
4664
    SetVersion($DBversion);
4665
}
4665
}
4666
4667
$DBversion = "3.07.00.XXX";
4668
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4669
    $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');");
4670
    print "Upgrade to $DBversion done (Add syspref CalendarFirstDayOfWeek used to select the first day of week to use in the calendar. )\n";
4671
    SetVersion($DBversion);
4672
}
4673
4666
=head1 FUNCTIONS
4674
=head1 FUNCTIONS
4667
4675
4668
=head2 DropAllForeignKeys($table)
4676
=head2 DropAllForeignKeys($table)
(-)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 338-344 Link Here
338
                ifFormat : "[% DHTMLcalendar_dateformat %]",
338
                ifFormat : "[% DHTMLcalendar_dateformat %]",
339
                button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
339
                button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
340
                disableFunc : validate[% bibitemloo.biblionumber %],
340
                disableFunc : validate[% bibitemloo.biblionumber %],
341
                dateStatusFunc : validate[% bibitemloo.biblionumber %]
341
                dateStatusFunc : validate[% bibitemloo.biblionumber %],
342
                firstDay : [% CalendarFirstDayOfWeek %]
342
              }
343
              }
343
              );
344
              );
344
              //]]>
345
              //]]>
Lines 370-376 Link Here
370
          ifFormat : "[% DHTMLcalendar_dateformat %]",
371
          ifFormat : "[% DHTMLcalendar_dateformat %]",
371
          button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
372
          button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
372
          disableFunc : validate1,
373
          disableFunc : validate1,
373
          dateStatusFunc : validate1
374
          dateStatusFunc : validate1,
375
          firstDay : [% CalendarFirstDayOfWeek %]
374
        }
376
        }
375
      );
377
      );
376
      //]]>
378
      //]]>
377
- 

Return to bug 7261