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 (-1 / +27 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 90-99 $(document).ready(function(){ Link Here
90
91
91
92
92
<form name="f" method="get" action="auth_finder.pl">
93
<form name="f" method="get" action="auth_finder.pl">
94
            <input type="hidden" name="source" value="[% source %]" />
93
            <input type="hidden" name="op" value="do_search" />
95
            <input type="hidden" name="op" value="do_search" />
94
            <input type="hidden" name="type" value="intranet" />
96
            <input type="hidden" name="type" value="intranet" />
95
            <input type="hidden" name="index" value="[% index %]" />
97
            <input type="hidden" name="index" value="[% index %]" />
96
                <fieldset class="rows"><ol><li>
98
                <fieldset class="rows"><legend>Search options</legend>
99
                <ol><li>
97
                    <span class="label">Authority type</span>
100
                    <span class="label">Authority type</span>
98
                    [% authtypecode %]
101
                    [% authtypecode %]
99
                    <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
102
                    <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
Lines 159-163 $(document).ready(function(){ Link Here
159
            <option value="HeadingDsc">Heading descendant</option>
162
            <option value="HeadingDsc">Heading descendant</option>
160
        </select>
163
        </select>
161
        </li></ol></fieldset>
164
        </li></ol></fieldset>
165
        [% IF source == 'auth' %]
166
        <fieldset class="rows"><legend>Relationship information</legend>
167
            <ol>
168
            <li>
169
                <label for="relationship">Special relationship: </label>
170
                <select name="relationship" id="relationship">
171
                    [% selected=relationship %]
172
                    [% PROCESS selectoption value='' text='None specified' %]
173
                    [% PROCESS selectoption value='a' text='a - Earlier heading' %]
174
                    [% PROCESS selectoption value='b' text='b - Later heading' %]
175
                    [% PROCESS selectoption value='d' text='d - Acronym' %]
176
                    [% PROCESS selectoption value='f' text='f - Musical composition' %]
177
                    [% PROCESS selectoption value='g' text='g - Broader term' %]
178
                    [% PROCESS selectoption value='h' text='h - Narrower term' %]
179
                    [% PROCESS selectoption value='i' text='i - Reference instruction phrase in subfield $i' %]
180
                    [% PROCESS selectoption value='n' text='n - Not applicable' %]
181
                    [% PROCESS selectoption value='r' text='r - Relationship designation in $i or $4' %]
182
                    [% PROCESS selectoption value='t' text='t - Immediate parent body' %]
183
                </select>
184
            </li>
185
            </ol>
186
        </fieldset>
187
        [% END %]
162
            <fieldset class="action"> <input type="submit" value="Start search" class="submit" /> <a class="cancel close" href="#">Cancel</a></fieldset>
188
            <fieldset class="action"> <input type="submit" value="Start search" class="submit" /> <a class="cancel close" href="#">Cancel</a></fieldset>
163
</form>
189
</form>
(-)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 73-82 function jumpfull(page) Link Here
73
                        <td>
85
                        <td>
74
                          [% IF resul.repets %]
86
                          [% IF resul.repets %]
75
                            [% FOREACH repet IN resul.repets %]
87
                            [% FOREACH repet IN resul.repets %]
76
                            <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>
88
                            <a href="javascript:doauth('[% resul.authid %]', '[% repet.index %]', '[% repet.repet %]')" title="[% repet.value %]">[% repet.repet %]</a>
77
                            [% END %]
89
                            [% END %]
78
                          [% ELSE %]
90
                          [% ELSE %]
79
                            <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&amp;index=[% index %]')">choose</a>
91
                            <a href="javascript:doauth('[% resul.authid %]', '[% index %]', '')">choose</a>
80
                          [% END %]
92
                          [% END %]
81
                        </td>
93
                        </td>
82
                        <td><a href="authorities.pl?authid=[% resul.authid %]">Edit authority</a></td>
94
                        <td><a href="authorities.pl?authid=[% resul.authid %]">Edit authority</a></td>
83
- 

Return to bug 8332