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

(-)a/authorities/merge.pl (+12 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,
183
            );
191
            );
184
        }
192
        }
185
        else {
193
        else {
Lines 194-203 else { Link Here
194
            );
202
            );
195
            if ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) {
203
            if ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) {
196
                my $authority_types = Koha::Authority::Types->search( { authtypecode => { '!=' => '' } }, { order_by => ['authtypetext'] } );
204
                my $authority_types = Koha::Authority::Types->search( { authtypecode => { '!=' => '' } }, { order_by => ['authtypetext'] } );
205
                my $frameworktext1 = Koha::Authority::Types->find( $recordObj1->authtypecode );
206
                my $frameworktext2 = Koha::Authority::Types->find( $recordObj2->authtypecode );
197
                $template->param(
207
                $template->param(
198
                    frameworkselect => $authority_types->unblessed,
208
                    frameworkselect => $authority_types->unblessed,
199
                    frameworkcode1  => $recordObj1->authtypecode,
209
                    frameworkcode1  => $recordObj1->authtypecode,
200
                    frameworkcode2  => $recordObj2->authtypecode,
210
                    frameworkcode2  => $recordObj2->authtypecode,
211
                    frameworklabel1 => $frameworktext1->authtypetext,
212
                    frameworklabel2 => $frameworktext2->authtypetext,
201
                );
213
                );
202
            }
214
            }
203
        }
215
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc (-1 / +2 lines)
Lines 53-58 Link Here
53
                <a href="#tabrecord[% record.recordid | uri %]">
53
                <a href="#tabrecord[% record.recordid | uri %]">
54
                    [% record.recordid | html %]
54
                    [% record.recordid | html %]
55
                    [% IF record.reference %](ref)[% END %]
55
                    [% IF record.reference %](ref)[% END %]
56
                    ([% record.frameworktext | html %])
56
                </a>
57
                </a>
57
            </li>
58
            </li>
58
        [% END %]
59
        [% END %]
Lines 67-73 Link Here
67
68
68
[% BLOCK mergetarget %]
69
[% BLOCK mergetarget %]
69
<div id="result">
70
<div id="result">
70
    <h2>Destination record</h2>
71
    <h2>Destination record ([% authtypetext %])</h2>
71
    <div style="border:1px solid #E8E8E8;padding:1em;margin-top:2em;">
72
    <div style="border:1px solid #E8E8E8;padding:1em;margin-top:2em;">
72
        <ul id="resultul"></ul>
73
        <ul id="resultul"></ul>
73
    </div>
74
    </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt (-2 / +11 lines)
Lines 104-110 div#result { margin-top: 1em; } Link Here
104
[% PROCESS mergesource sourcerecords=records %]
104
[% PROCESS mergesource sourcerecords=records %]
105
</div>
105
</div>
106
        <div class="col-sm-6">
106
        <div class="col-sm-6">
107
[% PROCESS mergetarget %]
107
[% PROCESS mergetarget authtypetext=frameworktext %]
108
</div>
108
</div>
109
</div>
109
</div>
110
110
Lines 113-118 div#result { margin-top: 1em; } Link Here
113
<input type="hidden" name="mergereference" value="[% mergereference | html %]" />
113
<input type="hidden" name="mergereference" value="[% mergereference | html %]" />
114
<input type="hidden" name="frameworkcode" value="[% framework | html %]" />
114
<input type="hidden" name="frameworkcode" value="[% framework | html %]" />
115
115
116
[% warning = 'FALSE' %]
117
[% FOREACH record IN records %]
118
    [% IF (record.frameworkcode != framework) %]
119
        [% IF (warning != 'TRUE') %]
120
            [% warning = 'TRUE' %]
121
            <div class="dialog alert">Multiple authority types are used. There may be a data loss while merging.</div>
122
        [% END %]
123
    [% END %]
124
[% END %]
125
116
<fieldset class="action"><input type="submit" name="merge" value="Merge" /></fieldset>
126
<fieldset class="action"><input type="submit" name="merge" value="Merge" /></fieldset>
117
</form>
127
</form>
118
128
119
- 

Return to bug 25387