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

(-)a/admin/koha2marclinks.pl (-19 / +9 lines)
Lines 85-98 if ( $op eq 'add_form' ) { Link Here
85
        {
85
        {
86
            push @marcarray, "$field $tagsubfield - $liblibrarian";
86
            push @marcarray, "$field $tagsubfield - $liblibrarian";
87
        }
87
        }
88
        my $marclist = CGI::scrolling_list(
88
        my $marclist = {
89
            -name   => 'marc',
89
            values  => \@marcarray,
90
            -values => \@marcarray,
90
            default => "$defaulttagfield $defaulttagsubfield - $defaultliblibrarian",
91
            -default =>
91
        };
92
              "$defaulttagfield $defaulttagsubfield - $defaultliblibrarian",
93
            -size     => 1,
94
            -multiple => 0,
95
        );
96
        $template->param( "marclist$i" => $marclist );
92
        $template->param( "marclist$i" => $marclist );
97
    }
93
    }
98
    $template->param(
94
    $template->param(
Lines 154-172 q|select tagfield,tagsubfield,liblibrarian,kohafield from marc_subfield_structur Link Here
154
"$script_name?op=add_form&tablename=$tablename&kohafield=$field";
150
"$script_name?op=add_form&tablename=$tablename&kohafield=$field";
155
        push( @loop_data, \%row_data );
151
        push( @loop_data, \%row_data );
156
    }
152
    }
153
    my $tablenames = {
154
        values  => [ 'biblio', 'biblioitems', 'items' ],
155
        default => $tablename,
156
    };
157
    $template->param(
157
    $template->param(
158
        loop      => \@loop_data,
158
        loop      => \@loop_data,
159
        tablename => CGI::scrolling_list(
159
        tablename => $tablenames,
160
            -name   => 'tablename',
161
            -values => [
162
                'biblio',
163
                'biblioitems',
164
                'items',
165
            ],
166
            -default  => $tablename,
167
            -size     => 1,
168
            -multiple => 0
169
        )
170
    );
160
    );
171
}    #---- END $OP eq DEFAULT
161
}    #---- END $OP eq DEFAULT
172
output_html_with_http_headers $input, $cookie, $template->output;
162
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt (-101 / +37 lines)
Lines 28-132 Link Here
28
[% IF ( add_form ) %]
28
[% IF ( add_form ) %]
29
<h1>Connect [% tablename %].[% kohafield %] to a MARC subfield</h1>
29
<h1>Connect [% tablename %].[% kohafield %] to a MARC subfield</h1>
30
    <p>Choose and validate 1 MARC subfield for <strong>[% tablename %].[% kohafield %]</strong>. That will modify <b>all frameworks</b> which is usually what you need, but you have been warned.</p>
30
    <p>Choose and validate 1 MARC subfield for <strong>[% tablename %].[% kohafield %]</strong>. That will modify <b>all frameworks</b> which is usually what you need, but you have been warned.</p>
31
    <fieldset class="rows"><ol>
31
    <fieldset class="rows">
32
<li><form action="[% script_name %]" method="post">	<input type="hidden" name="op" value="add_validate" />
32
        <ol>
33
            <input type="hidden" name="tablename" value="[% tablename %]" />
33
        [% FOR i IN [ 0 .. 9 ] %]
34
            <input type="hidden" name="kohafield" value="[% kohafield %]" />
34
            [% marclist = "marclist$i" %]
35
            <label>000s</label>
35
            <li>
36
            [% marclist0 %] <input type="submit" value="OK" /></form>
36
                <form action="[% script_name %]" method="post">
37
        
37
                <input type="hidden" name="op" value="add_validate" />
38
    </li>
38
                <input type="hidden" name="tablename" value="[% tablename %]" />
39
    <li>
39
                <input type="hidden" name="kohafield" value="[% kohafield %]" />
40
40
                <label>[% i %]00s</label>
41
        	<form action="[% script_name %]" method="post">
41
                <select name="marc" id="marc" size="1" width="570" style="width: 570px;">
42
            <input type="hidden" name="op" value="add_validate" />
42
                    [% FOREACH value IN $marclist.values %]
43
            <input type="hidden" name="tablename" value="[% tablename %]" />
43
                        [% IF ( value == $marclist.default ) %]
44
            <label>100s</label>
44
                            <option value="[% value %]" selected>[% value %]</option>
45
            [% marclist1 %]
45
                        [% ELSE %]
46
            <input type="hidden" name="kohafield" value="[% kohafield %]" /><input type="submit" value="OK" />	</form>
46
                            <option value="[% value %]">[% value %]</option>
47
        
47
                        [% END %]
48
    </li>
48
                    [% END %]
49
    <li>
49
                </select>
50
50
                <input type="submit" value="OK" />
51
        
51
                </form>
52
                <form action="[% script_name %]" method="post"><input type="hidden" name="op" value="add_validate" />
52
            </li>
53
            <input type="hidden" name="tablename" value="[% tablename %]" />
53
        [% END %]
54
            <input type="hidden" name="kohafield" value="[% kohafield %]" />
54
        </ol>
55
            <label>200s</label>
55
    </fieldset>
56
            [% marclist2 %] <input type="submit" value="OK" /></form>
57
        
58
    </li>
59
    <li>
60
    
61
        <form action="[% script_name %]" method="post">
62
            <input type="hidden" name="op" value="add_validate" />
63
            <input type="hidden" name="tablename" value="[% tablename %]" />
64
            <input type="hidden" name="kohafield" value="[% kohafield %]" />
65
            <label>300s</label>
66
            [% marclist3 %] <input type="submit" value="OK" />	</form>
67
        
68
    </li>
69
    <li>
70
    
71
        <form action="[% script_name %]" method="post">
72
            <input type="hidden" name="op" value="add_validate" />
73
            <input type="hidden" name="tablename" value="[% tablename %]" />
74
            <input type="hidden" name="kohafield" value="[% kohafield %]" />
75
            <label>400s</label>
76
            [% marclist4 %] <input type="submit" value="OK" /></form>
77
        
78
    </li>
79
    <li>
80
81
        	<form action="[% script_name %]" method="post">
82
            <input type="hidden" name="op" value="add_validate" />
83
            <input type="hidden" name="tablename" value="[% tablename %]" />
84
            <input type="hidden" name="kohafield" value="[% kohafield %]" />
85
            <label>500s</label>
86
            [% marclist5 %] <input type="submit" value="OK" /></form>
87
        
88
    </li>
89
    <li>
90
    
91
        <form action="[% script_name %]" method="post">
92
            <input type="hidden" name="op" value="add_validate" />
93
            <input type="hidden" name="tablename" value="[% tablename %]" />
94
            <input type="hidden" name="kohafield" value="[% kohafield %]" />
95
            <label>600s</label>
96
            [% marclist6 %] <input type="submit" value="OK" /></form>
97
        
98
    </li>
99
    <li>
100
    
101
        <form action="[% script_name %]" method="post">
102
            <input type="hidden" name="op" value="add_validate" />
103
            <input type="hidden" name="tablename" value="[% tablename %]" />
104
            <input type="hidden" name="kohafield" value="[% kohafield %]" />
105
            <label>700s</label>
106
            [% marclist7 %] <input type="submit" value="OK" /></form>
107
        
108
    </li>
109
    <li>
110
    
111
        <form action="[% script_name %]" method="post">
112
            <input type="hidden" name="op" value="add_validate" />
113
            <input type="hidden" name="tablename" value="[% tablename %]" />
114
            <input type="hidden" name="kohafield" value="[% kohafield %]" />
115
            <label>800s</label>
116
            [% marclist8 %] <input type="submit" value="OK" /></form>
117
        
118
    </li>
119
    <li>
120
    
121
        <form action="[% script_name %]" method="post">
122
            <input type="hidden" name="op" value="add_validate" />
123
            <input type="hidden" name="tablename" value="[% tablename %]" />
124
            <input type="hidden" name="kohafield" value="[% kohafield %]" />
125
            <label>900s</label>
126
            [% marclist9 %] <input type="submit" value="OK" /></form>
127
        
128
    </li>
129
    </ol></fieldset>
130
	<fieldset class="action">
56
	<fieldset class="action">
131
            <form action="[% script_name %]" name="Aform" method="post">
57
            <form action="[% script_name %]" name="Aform" method="post">
132
                <input type="hidden" name="op" value="add_validate" />
58
                <input type="hidden" name="op" value="add_validate" />
Lines 144-150 Link Here
144
70
145
<h1>Koha to MARC mapping [% tagfield %]</h1>
71
<h1>Koha to MARC mapping [% tagfield %]</h1>
146
<form action="[% script_name %]" method="post">
72
<form action="[% script_name %]" method="post">
147
<p>[% tablename %] <input type="submit" value="OK" /></p>
73
<p>
74
    <select name="tablename" id="tablename" size="1">
75
    [% FOREACH value IN tablename.values %]
76
        [% IF ( value == tablename.default ) %]
77
        <option value=[% value %] selected>[% value %]</option>
78
        [% ELSE %]
79
        <option value=[% value %]>[% value %]</option>
80
        [% END %]
81
    [% END %]
82
    </select>
83
    <input type="submit" value="OK" />
84
</p>
148
</form>
85
</form>
149
<table>
86
<table>
150
<tr>
87
<tr>
151
- 

Return to bug 12613