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

(-)a/C4/Letters.pm (-6 / +7 lines)
Lines 203-214 sub getletter { Link Here
203
    my ( $module, $code, $branchcode, $message_transport_type ) = @_;
203
    my ( $module, $code, $branchcode, $message_transport_type ) = @_;
204
    $message_transport_type //= '%';
204
    $message_transport_type //= '%';
205
205
206
    if ( C4::Context->preference('IndependentBranches')
207
            and $branchcode
208
            and C4::Context->userenv ) {
209
210
        $branchcode = C4::Context->userenv->{'branch'};
211
    }
212
    $branchcode //= '';
206
    $branchcode //= '';
213
207
214
    my $dbh = C4::Context->dbh;
208
    my $dbh = C4::Context->dbh;
Lines 223-228 sub getletter { Link Here
223
    my $line = $sth->fetchrow_hashref
217
    my $line = $sth->fetchrow_hashref
224
      or return;
218
      or return;
225
    $line->{'content-type'} = 'text/html; charset="UTF-8"' if $line->{is_html};
219
    $line->{'content-type'} = 'text/html; charset="UTF-8"' if $line->{is_html};
220
221
    if ( C4::Context->preference('IndependentBranches')
222
            and ( (not $line->{'branchcode'}) or ( not ($line->{'branchcode'} eq C4::Context->userenv->{'branch'}) ) )
223
            and not C4::Context->IsSuperLibrarian() ){
224
        return;
225
    }
226
226
    return { %$line };
227
    return { %$line };
227
}
228
}
228
229
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (-2 / +5 lines)
Lines 453-459 $(document).ready(function() { Link Here
453
	</form>
453
	</form>
454
[% END %]
454
[% END %]
455
455
456
[% IF ( delete_confirm ) %]
456
[% IF ( delete_confirm and letter ) %]
457
    <div class="dialog alert">
457
    <div class="dialog alert">
458
        <h3>Delete notice?</h3>
458
        <h3>Delete notice?</h3>
459
        <table>
459
        <table>
Lines 484-489 $(document).ready(function() { Link Here
484
            <button type="submit" class="deny"><i class="fa fa-times"></i> No, do not delete</button>
484
            <button type="submit" class="deny"><i class="fa fa-times"></i> No, do not delete</button>
485
        </form>
485
        </form>
486
    </div>
486
    </div>
487
[% ELSIF delete_confirm %]
488
    <div class="dialog alert">
489
        <h3> You are not allowed to delete this letter </h3>
490
    </div>
487
[% END %]
491
[% END %]
488
492
489
[% IF ( delete_confirmed ) %]
493
[% IF ( delete_confirmed ) %]
490
- 

Return to bug 18613