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

(-)a/Koha/AuthorisedValue.pm (-3 / +3 lines)
Lines 68-74 sub opac_translated_description { Link Here
68
    }
68
    }
69
    $lang ||= C4::Languages::getlanguage;
69
    $lang ||= C4::Languages::getlanguage;
70
    my $translated_description = Koha::Localizations->search({
70
    my $translated_description = Koha::Localizations->search({
71
        code => $self->authorised_value,
71
        code => sprintf "%s_%s", $self->category, $self->authorised_value,
72
        entity => 'authorised_values',
72
        entity => 'authorised_values',
73
        lang => $lang,
73
        lang => $lang,
74
        interface => 'opac',
74
        interface => 'opac',
Lines 94-100 sub translated_description { Link Here
94
    }
94
    }
95
    $lang ||= C4::Languages::getlanguage;
95
    $lang ||= C4::Languages::getlanguage;
96
    my $translated_description = Koha::Localizations->search({
96
    my $translated_description = Koha::Localizations->search({
97
        code => $self->authorised_value,
97
        code => sprintf "%s_%s", $self->category, $self->authorised_value,
98
        entity => 'authorised_values',
98
        entity => 'authorised_values',
99
        lang => $lang,
99
        lang => $lang,
100
    })->next;
100
    })->next;
Lines 111-117 sub translated_descriptions { Link Here
111
    my ( $self ) = @_;
111
    my ( $self ) = @_;
112
    my @translated_descriptions = Koha::Localizations->search(
112
    my @translated_descriptions = Koha::Localizations->search(
113
        {   entity => 'authorised_values',
113
        {   entity => 'authorised_values',
114
            code   => $self->authorised_value,
114
            code => sprintf "%s_%s", $self->category, $self->authorised_value,
115
        }
115
        }
116
    );
116
    );
117
    return [ map {
117
    return [ map {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-3 / +2 lines)
Lines 77-83 Link Here
77
            <input type="text" name="lib" id="lib" value="[% lib | html %]" maxlength="200" />
77
            <input type="text" name="lib" id="lib" value="[% lib | html %]" maxlength="200" />
78
            [% IF can_be_translated %]
78
            [% IF can_be_translated %]
79
                [% IF action_modify %]
79
                [% IF action_modify %]
80
                    <a href="/cgi-bin/koha/admin/localization.pl?entity=authorised_values&code=[% authorised_value | uri %]&interface=intranet"" title="Translate description" rel="gb_page_center[600,500]"><i class="fa fa-pencil"></i> Translate into other languages</a>
80
                    <a href="/cgi-bin/koha/admin/localization.pl?entity=authorised_values&code=[% category | uri %]_[% authorised_value | uri %]&interface=intranet"" title="Translate description" rel="gb_page_center[600,500]"><i class="fa fa-pencil"></i> Translate into other languages</a>
81
                [% ELSE %]
81
                [% ELSE %]
82
                    <a href="#" class="disabled" title="The authorized value has to be saved to make it translatable"><i class="fa fa-pencil"></i> Translate into other languages</a>
82
                    <a href="#" class="disabled" title="The authorized value has to be saved to make it translatable"><i class="fa fa-pencil"></i> Translate into other languages</a>
83
                [% END %]
83
                [% END %]
Lines 88-94 Link Here
88
            <input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac | html %]" maxlength="200" />
88
            <input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac | html %]" maxlength="200" />
89
            [% IF can_be_translated %]
89
            [% IF can_be_translated %]
90
                [% IF action_modify %]
90
                [% IF action_modify %]
91
                    <a href="/cgi-bin/koha/admin/localization.pl?entity=authorised_values&code=[% authorised_value | uri %]&interface=opac" title="Translate OPAC description" rel="gb_page_center[600,500]"><i class="fa fa-pencil"></i> Translate into other languages</a>
91
                    <a href="/cgi-bin/koha/admin/localization.pl?entity=authorised_values&code=[% category | uri %]_[% authorised_value | uri %]&interface=opac" title="Translate OPAC description" rel="gb_page_center[600,500]"><i class="fa fa-pencil"></i> Translate into other languages</a>
92
                [% ELSE %]
92
                [% ELSE %]
93
                    <a href="#" class="disabled" title="The authorized value has to be saved to make it translatable"><i class="fa fa-pencil"></i> Translate into other languages</a>
93
                    <a href="#" class="disabled" title="The authorized value has to be saved to make it translatable"><i class="fa fa-pencil"></i> Translate into other languages</a>
94
                [% END %]
94
                [% END %]
95
- 

Return to bug 20307