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

(-)a/authorities/merge.pl (+13 lines)
Lines 156-161 else { Link Here
156
                ($recordObj1, $recordObj2) = ($recordObj2, $recordObj1);
156
                ($recordObj1, $recordObj2) = ($recordObj2, $recordObj1);
157
            }
157
            }
158
158
159
            # Getting frameworktext
160
            my $frameworktext1 = Koha::Authority::Types->find( $recordObj1->authtypecode );
161
            my $frameworktext2 = Koha::Authority::Types->find( $recordObj2->authtypecode );
162
            my $frameworktextdestination = Koha::Authority::Types->find( $framework );
163
159
            # Creating a loop for display
164
            # Creating a loop for display
160
165
161
            my @records = (
166
            my @records = (
Lines 163-168 else { Link Here
163
                    recordid => $mergereference,
168
                    recordid => $mergereference,
164
                    record => $recordObj1->record,
169
                    record => $recordObj1->record,
165
                    frameworkcode => $recordObj1->authtypecode,
170
                    frameworkcode => $recordObj1->authtypecode,
171
                    frameworktext => $frameworktext1->authtypetext,
166
                    display => $recordObj1->createMergeHash($tagslib),
172
                    display => $recordObj1->createMergeHash($tagslib),
167
                    reference => 1,
173
                    reference => 1,
168
                },
174
                },
Lines 170-175 else { Link Here
170
                    recordid => $notreference,
176
                    recordid => $notreference,
171
                    record => $recordObj2->record,
177
                    record => $recordObj2->record,
172
                    frameworkcode => $recordObj2->authtypecode,
178
                    frameworkcode => $recordObj2->authtypecode,
179
                    frameworktext => $frameworktext2->authtypetext,
173
                    display => $recordObj2->createMergeHash($tagslib),
180
                    display => $recordObj2->createMergeHash($tagslib),
174
                },
181
                },
175
            );
182
            );
Lines 180-185 else { Link Here
180
                recordid2        => $notreference,
187
                recordid2        => $notreference,
181
                records        => \@records,
188
                records        => \@records,
182
                framework      => $framework,
189
                framework      => $framework,
190
                frameworktext => $frameworktextdestination->authtypetext,
191
                multipleauthtypes => ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) ? 1 : 0,
183
            );
192
            );
184
        }
193
        }
185
        else {
194
        else {
Lines 194-203 else { Link Here
194
            );
203
            );
195
            if ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) {
204
            if ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) {
196
                my $authority_types = Koha::Authority::Types->search( { authtypecode => { '!=' => '' } }, { order_by => ['authtypetext'] } );
205
                my $authority_types = Koha::Authority::Types->search( { authtypecode => { '!=' => '' } }, { order_by => ['authtypetext'] } );
206
                my $frameworktext1 = Koha::Authority::Types->find( $recordObj1->authtypecode );
207
                my $frameworktext2 = Koha::Authority::Types->find( $recordObj2->authtypecode );
197
                $template->param(
208
                $template->param(
198
                    frameworkselect => $authority_types->unblessed,
209
                    frameworkselect => $authority_types->unblessed,
199
                    frameworkcode1  => $recordObj1->authtypecode,
210
                    frameworkcode1  => $recordObj1->authtypecode,
200
                    frameworkcode2  => $recordObj2->authtypecode,
211
                    frameworkcode2  => $recordObj2->authtypecode,
212
                    frameworklabel1 => $frameworktext1->authtypetext,
213
                    frameworklabel2 => $frameworktext2->authtypetext,
201
                );
214
                );
202
            }
215
            }
203
        }
216
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc (-1 / +2 lines)
Lines 51-56 Link Here
51
                [% WRAPPER tab_item tabname= "tabrecord${record.recordid}" %]
51
                [% WRAPPER tab_item tabname= "tabrecord${record.recordid}" %]
52
                    [% record.recordid | html %]
52
                    [% record.recordid | html %]
53
                    [% IF record.reference %]<span>(ref)</span>[% END %]
53
                    [% IF record.reference %]<span>(ref)</span>[% END %]
54
                    <span>([% record.frameworktext | html %])</span>
54
                [% END %]
55
                [% END %]
55
            [% END %]
56
            [% END %]
56
        [% END # /WRAPPER tabs_nav %]
57
        [% END # /WRAPPER tabs_nav %]
Lines 69-75 Link Here
69
[% END %]
70
[% END %]
70
71
71
[% BLOCK mergetarget %]
72
[% BLOCK mergetarget %]
72
    <h2>Destination record</h2>
73
    <h2>Destination record ([% authtypetext | html %])</h2>
73
    <div id="result" class="page-section">
74
    <div id="result" class="page-section">
74
        <ul id="resultul"></ul>
75
        <ul id="resultul"></ul>
75
    </div> <!-- // #result -->
76
    </div> <!-- // #result -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt (-2 / +5 lines)
Lines 109-115 div#result { margin-top: 1em; } Link Here
109
[% PROCESS mergesource sourcerecords=records %]
109
[% PROCESS mergesource sourcerecords=records %]
110
</div>
110
</div>
111
        <div class="col-sm-6">
111
        <div class="col-sm-6">
112
[% PROCESS mergetarget %]
112
[% PROCESS mergetarget authtypetext=frameworktext %]
113
</div>
113
</div>
114
</div>
114
</div>
115
115
Lines 118-123 div#result { margin-top: 1em; } Link Here
118
<input type="hidden" name="mergereference" value="[% mergereference | html %]" />
118
<input type="hidden" name="mergereference" value="[% mergereference | html %]" />
119
<input type="hidden" name="frameworkcode" value="[% framework | html %]" />
119
<input type="hidden" name="frameworkcode" value="[% framework | html %]" />
120
120
121
[% IF multipleauthtypes %]
122
    <div class="dialog alert multiple-auth-types">Multiple authority types are used. There may be a data loss while merging.</div>
123
[% END %]
124
121
<fieldset class="action">
125
<fieldset class="action">
122
    <input type="hidden" name="op" value="cud-merge" />
126
    <input type="hidden" name="op" value="cud-merge" />
123
    <input type="submit" class="btn btn-primary" value="Merge" />
127
    <input type="submit" class="btn btn-primary" value="Merge" />
124
- 

Return to bug 25387