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

(-)a/Koha/AuthorisedValue.pm (-3 / +3 lines)
Lines 161-167 sub opac_translated_description { Link Here
161
    }
161
    }
162
    $lang ||= C4::Languages::getlanguage;
162
    $lang ||= C4::Languages::getlanguage;
163
    my $translated_description = Koha::Localizations->search({
163
    my $translated_description = Koha::Localizations->search({
164
        code => $self->authorised_value,
164
        code => sprintf "%s_%s", $self->category, $self->authorised_value,
165
        entity => 'authorised_values',
165
        entity => 'authorised_values',
166
        lang => $lang,
166
        lang => $lang,
167
        interface => 'opac',
167
        interface => 'opac',
Lines 187-193 sub translated_description { Link Here
187
    }
187
    }
188
    $lang ||= C4::Languages::getlanguage;
188
    $lang ||= C4::Languages::getlanguage;
189
    my $translated_description = Koha::Localizations->search({
189
    my $translated_description = Koha::Localizations->search({
190
        code => $self->authorised_value,
190
        code => sprintf "%s_%s", $self->category, $self->authorised_value,
191
        entity => 'authorised_values',
191
        entity => 'authorised_values',
192
        lang => $lang,
192
        lang => $lang,
193
    })->next;
193
    })->next;
Lines 204-210 sub translated_descriptions { Link Here
204
    my ( $self ) = @_;
204
    my ( $self ) = @_;
205
    my @translated_descriptions = Koha::Localizations->search(
205
    my @translated_descriptions = Koha::Localizations->search(
206
        {   entity => 'authorised_values',
206
        {   entity => 'authorised_values',
207
            code   => $self->authorised_value,
207
            code => sprintf "%s_%s", $self->category, $self->authorised_value,
208
        }
208
        }
209
    );
209
    );
210
    return [ map {
210
    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