|
Lines 31-41
use C4::Koha; # XXX subfield_is_koha_internal_p
Link Here
|
| 31 |
use C4::Branch; # XXX subfield_is_koha_internal_p |
31 |
use C4::Branch; # XXX subfield_is_koha_internal_p |
| 32 |
use C4::BackgroundJob; |
32 |
use C4::BackgroundJob; |
| 33 |
use C4::ClassSource; |
33 |
use C4::ClassSource; |
| 34 |
use C4::Dates; |
|
|
| 35 |
use C4::Debug; |
34 |
use C4::Debug; |
| 36 |
use C4::Members; |
35 |
use C4::Members; |
| 37 |
use MARC::File::XML; |
36 |
use MARC::File::XML; |
| 38 |
use List::MoreUtils qw/uniq/; |
37 |
use List::MoreUtils qw/uniq/; |
|
|
38 |
use Koha::DateUtils; |
| 39 |
|
39 |
|
| 40 |
my $input = new CGI; |
40 |
my $input = new CGI; |
| 41 |
my $dbh = C4::Context->dbh; |
41 |
my $dbh = C4::Context->dbh; |
|
Lines 76-82
my $restrictededition = $uid ? haspermission($uid, {'tools' => 'items_batchmod_
Link Here
|
| 76 |
# In case user is a superlibrarian, edition is not restricted |
76 |
# In case user is a superlibrarian, edition is not restricted |
| 77 |
$restrictededition = 0 if ($restrictededition != 0 && C4::Context->IsSuperLibrarian()); |
77 |
$restrictededition = 0 if ($restrictededition != 0 && C4::Context->IsSuperLibrarian()); |
| 78 |
|
78 |
|
| 79 |
my $today_iso = C4::Dates->today('iso'); |
79 |
my $today_iso = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); |
| 80 |
$template->param(today_iso => $today_iso); |
80 |
$template->param(today_iso => $today_iso); |
| 81 |
$template->param(del => $del); |
81 |
$template->param(del => $del); |
| 82 |
|
82 |
|
|
Lines 334-343
foreach my $tag (sort keys %{$tagslib}) {
Link Here
|
| 334 |
if ( !$value && $use_default_values) { |
334 |
if ( !$value && $use_default_values) { |
| 335 |
$value = $tagslib->{$tag}->{$subfield}->{defaultvalue}; |
335 |
$value = $tagslib->{$tag}->{$subfield}->{defaultvalue}; |
| 336 |
# get today date & replace YYYY, MM, DD if provided in the default value |
336 |
# get today date & replace YYYY, MM, DD if provided in the default value |
| 337 |
my ( $year, $month, $day ) = split ',', $today_iso; # FIXME: iso dates don't have commas! |
337 |
my $today = dt_from_string; |
| 338 |
$value =~ s/YYYY/$year/g; |
338 |
my $year = $today->year; |
| 339 |
$value =~ s/MM/$month/g; |
339 |
my $month = $today->month; |
| 340 |
$value =~ s/DD/$day/g; |
340 |
my $day = $today->day; |
|
|
341 |
$value =~ s/YYYY/$year/g; |
| 342 |
$value =~ s/MM/$month/g; |
| 343 |
$value =~ s/DD/$day/g; |
| 341 |
} |
344 |
} |
| 342 |
$subfield_data{visibility} = "display:none;" if (($tagslib->{$tag}->{$subfield}->{hidden} > 4) || ($tagslib->{$tag}->{$subfield}->{hidden} < -4)); |
345 |
$subfield_data{visibility} = "display:none;" if (($tagslib->{$tag}->{$subfield}->{hidden} > 4) || ($tagslib->{$tag}->{$subfield}->{hidden} < -4)); |
| 343 |
# testing branch value if IndependentBranches. |
346 |
# testing branch value if IndependentBranches. |
| 344 |
- |
|
|