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

(-)a/authorities/auth_finder.pl (+4 lines)
Lines 35-40 my $authtypecode = $query->param('authtypecode'); Link Here
35
my $index        = $query->param('index');
35
my $index        = $query->param('index');
36
my $tagid        = $query->param('tagid');
36
my $tagid        = $query->param('tagid');
37
my $resultstring = $query->param('result');
37
my $resultstring = $query->param('result');
38
my $relationship = $query->param('relationship');
38
my $dbh          = C4::Context->dbh;
39
my $dbh          = C4::Context->dbh;
39
40
40
my $startfrom = $query->param('startfrom');
41
my $startfrom = $query->param('startfrom');
Lines 192-197 $template->param( Link Here
192
    authtypecode  => $authtypecode,
193
    authtypecode  => $authtypecode,
193
);
194
);
194
195
196
$template->{VARS}->{source} = $query->param('source') || '';
197
$template->{VARS}->{relationship} = $query->param('relationship') || '';
198
195
# Print the page
199
# Print the page
196
output_html_with_http_headers $query, $cookie, $template->output;
200
output_html_with_http_headers $query, $cookie, $template->output;
197
201
(-)a/authorities/blinddetail-biblio-search.pl (+3 lines)
Lines 54-59 my $dbh = C4::Context->dbh; Link Here
54
my $authid       = $query->param('authid');
54
my $authid       = $query->param('authid');
55
my $index        = $query->param('index');
55
my $index        = $query->param('index');
56
my $tagid        = $query->param('tagid');
56
my $tagid        = $query->param('tagid');
57
my $relationship = $query->param('relationship');
57
my $authtypecode = &GetAuthTypeCode($authid);
58
my $authtypecode = &GetAuthTypeCode($authid);
58
my $tagslib      = &GetTagsLabels( 1, $authtypecode );
59
my $tagslib      = &GetTagsLabels( 1, $authtypecode );
59
60
Lines 95-100 if ($authid) { Link Here
95
        my $letter = $_ || '@';
96
        my $letter = $_ || '@';
96
        push( @subfield_loop, {marc_subfield => $letter, marc_values => $subfields{$_}} );
97
        push( @subfield_loop, {marc_subfield => $letter, marc_values => $subfields{$_}} );
97
    }
98
    }
99
100
    push( @subfield_loop, { marc_subfield => 'w', marc_values => $relationship } ) if ( $relationship );
98
}
101
}
99
else {
102
else {
100
    # authid is empty => the user want to empty the entry.
103
    # authid is empty => the user want to empty the entry.
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc (-7 / +33 lines)
Lines 1-3 Link Here
1
[% PROCESS 'form-blocks.inc' %]
1
<script type="text/javascript">
2
<script type="text/javascript">
2
//<![CDATA[
3
//<![CDATA[
3
4
Lines 100-109 function finderjumpfull(page) Link Here
100
101
101
102
102
<form name="f" method="get" action="auth_finder.pl">
103
<form name="f" method="get" action="auth_finder.pl">
104
            <input type="hidden" name="source" value="[% source %]" />
103
            <input type="hidden" name="op" value="do_search" />
105
            <input type="hidden" name="op" value="do_search" />
104
            <input type="hidden" name="type" value="intranet" />
106
            <input type="hidden" name="type" value="intranet" />
105
            <input type="hidden" name="index" value="[% index %]" />
107
            <input type="hidden" name="index" value="[% index %]" />
106
                <fieldset class="rows"><ol><li>
108
                <fieldset class="rows"><legend>Search options</legend>
109
                <ol><li>
107
                    <span class="label">Authority type</span>
110
                    <span class="label">Authority type</span>
108
                    [% authtypecode %]
111
                    [% authtypecode %]
109
                    <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
112
                    <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
Lines 169-178 function finderjumpfull(page) Link Here
169
            <option value="HeadingDsc">Heading descendant</option>
172
            <option value="HeadingDsc">Heading descendant</option>
170
        </select>
173
        </select>
171
        </li></ol></fieldset>
174
        </li></ol></fieldset>
172
            <fieldset class="action"> <input type="submit" value="Start search" class="submit" id="search" /> <a id="cancel" class="cancel close" href="#">Cancel</a>
175
        [% IF source == 'auth' %]
173
            <span id="authfinderops">
176
        <fieldset class="rows"><legend>Relationship information</legend>
174
            <a href="javascript:finderjumpfull('blinddetail-biblio-search.pl?authid=0&amp;index=[% index %]')" id="clear" class="button">Clear field</a>
177
            <ol>
175
            <a href="javascript:finderjumpfull('authorities.pl?index=[% index %]&authtypecode=[% authtypecode %]')" id="createnew" class="button">Create new</a>
178
            <li>
176
            </span>
179
                <label for="relationship">Special relationship: </label>
177
            </fieldset>
180
                <select name="relationship" id="relationship">
181
                    [% selected=relationship %]
182
                    [% PROCESS selectoption value='' text='None specified' %]
183
                    [% PROCESS selectoption value='a' text='a - Earlier heading' %]
184
                    [% PROCESS selectoption value='b' text='b - Later heading' %]
185
                    [% PROCESS selectoption value='d' text='d - Acronym' %]
186
                    [% PROCESS selectoption value='f' text='f - Musical composition' %]
187
                    [% PROCESS selectoption value='g' text='g - Broader term' %]
188
                    [% PROCESS selectoption value='h' text='h - Narrower term' %]
189
                    [% PROCESS selectoption value='i' text='i - Reference instruction phrase in subfield $i' %]
190
                    [% PROCESS selectoption value='n' text='n - Not applicable' %]
191
                    [% PROCESS selectoption value='r' text='r - Relationship designation in $i or $4' %]
192
                    [% PROCESS selectoption value='t' text='t - Immediate parent body' %]
193
                </select>
194
            </li>
195
            </ol>
196
        </fieldset>
197
        [% END %]
198
        <fieldset class="action"> <input type="submit" value="Start search" class="submit" id="search" /> <a id="cancel" class="cancel close" href="#">Cancel</a>
199
        <span id="authfinderops">
200
        <a href="javascript:finderjumpfull('blinddetail-biblio-search.pl?authid=0&amp;index=[% index %]')" id="clear" class="button">Clear field</a>
201
        <a href="javascript:finderjumpfull('authorities.pl?index=[% index %]&authtypecode=[% authtypecode %]')" id="createnew" class="button">Create new</a>
202
        </span>
203
        </fieldset>
178
</form>
204
</form>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc (-1 / +1 lines)
Lines 30-36 Link Here
30
    [% IF ( summary.summary ) %][% summary.summary %]:[% END %]
30
    [% IF ( summary.summary ) %][% summary.summary %]:[% END %]
31
    [% UNLESS ( summary.summaryonly ) %]
31
    [% UNLESS ( summary.summaryonly ) %]
32
        [% FOREACH authorize IN summary.authorized %]
32
        [% FOREACH authorize IN summary.authorized %]
33
            <span class="authorizedheading">[% authorize %]</span>
33
            <span class="authorizedheading">[% authorize.heading %]</span>
34
        [% END %]
34
        [% END %]
35
        [% IF ( marcflavour == 'UNIMARC' ) %]
35
        [% IF ( marcflavour == 'UNIMARC' ) %]
36
            [% FOREACH note IN summary.notes %]
36
            [% FOREACH note IN summary.notes %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/form-blocks.inc (+5 lines)
Line 0 Link Here
1
[% BLOCK selectoption %]
2
    [% IF value == selected %]<option value='[% value %]' selected='selected'>[% text %]</option>
3
    [% ELSE %]<option value='[% value %]'>[% text %]</option>
4
    [% END %]
5
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-1 / +1 lines)
Lines 153-159 function openAuth(tagsubfieldid,authtype) { Link Here
153
            }      
153
            }      
154
        }
154
        }
155
    }           
155
    }           
156
	newin=window.open("../authorities/auth_finder.pl?authtypecode="+  authtype+ "&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes');
156
    newin=window.open("../authorities/auth_finder.pl?source=auth&authtypecode="+  authtype+ "&index="+tagsubfieldid+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes');
157
}
157
}
158
158
159
function AddField(field,cntrepeatfield) {
159
function AddField(field,cntrepeatfield) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt (-3 / +14 lines)
Lines 11-16 function jumpfull(page) Link Here
11
{	
11
{	
12
    window.open(page,'','fullscreen,scrollbars');
12
    window.open(page,'','fullscreen,scrollbars');
13
}
13
}
14
15
function doauth(authid, index, repet)
16
{
17
[% IF source == 'auth' %]
18
    var e = document.getElementById("relationship");
19
    var relationship = e.options[e.selectedIndex].value;
20
21
    jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet + '&relationship=' + relationship);
22
[% ELSE %]
23
    jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet);
24
[% END %]
25
}
14
</script>
26
</script>
15
</head>
27
</head>
16
<body id="auth_searchresultlist_auth" class="auth">
28
<body id="auth_searchresultlist_auth" class="auth">
Lines 63-72 function jumpfull(page) Link Here
63
                        <td>
75
                        <td>
64
                          [% IF resul.repets %]
76
                          [% IF resul.repets %]
65
                            [% FOREACH repet IN resul.repets %]
77
                            [% FOREACH repet IN resul.repets %]
66
                            <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&amp;index=[% repet.index %]&amps;repet=[% repet.repet %]')" title="[% repet.value %]">[% repet.repet %]</a>
78
                            <a href="javascript:doauth('[% resul.authid %]', '[% repet.index %]', '[% repet.repet %]')" title="[% repet.value %]">[% repet.repet %]</a>
67
                            [% END %]
79
                            [% END %]
68
                          [% ELSE %]
80
                          [% ELSE %]
69
                            <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&amp;index=[% index %]')">Choose</a>
81
                            <a href="javascript:doauth('[% resul.authid %]', '[% index %]', '')">choose</a>
70
                          [% END %]
82
                          [% END %]
71
                        </td>
83
                        </td>
72
                        <td><a href="authorities.pl?authid=[% resul.authid %]">Edit authority</a></td>
84
                        <td><a href="authorities.pl?authid=[% resul.authid %]">Edit authority</a></td>
73
- 

Return to bug 8332