Fix for Bug 4261 - keyword mapping should show which framework the map is for
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Galen Charlton <gmcharlt@gmail.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
53e17af66c
commit
8a281ef292
|
|
@ -46,8 +46,15 @@ my ($template, $loggedinuser, $cookie)
|
|||
# get framework list
|
||||
my $frameworks = getframeworks();
|
||||
my @frameworkloop;
|
||||
my $selected;
|
||||
my $frameworktext;
|
||||
foreach my $thisframeworkcode (keys %$frameworks) {
|
||||
my $selected = 1 if $thisframeworkcode eq $framework;
|
||||
if ($thisframeworkcode eq $framework){
|
||||
$selected = 1;
|
||||
$frameworktext = $frameworks->{$thisframeworkcode}->{'frameworktext'};
|
||||
} else {
|
||||
$selected = 0;
|
||||
}
|
||||
my %row =(value => $thisframeworkcode,
|
||||
selected => $selected,
|
||||
frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
|
||||
|
|
@ -70,6 +77,7 @@ my $fieldloop = GetFieldMapping($framework);
|
|||
|
||||
$template->param( frameworkloop => \@frameworkloop,
|
||||
framework => $framework,
|
||||
frameworktext => $frameworktext,
|
||||
fields => $fieldloop,
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@ $(document).ready(function() {
|
|||
<div class="yui-b">
|
||||
<h2>Keyword to MARC Mapping</h2>
|
||||
<!-- TMPL_UNLESS NAME="fields" -->
|
||||
<div class="dialog message"><p>There are no mappings for this framework. </p></div>
|
||||
<div class="dialog message"><p>There are no mappings for the <!-- TMPL_IF NAME="frameworktext" --><em><!-- TMPL_VAR NAME="frameworktext" --></em><!-- TMPL_ELSE -->default<!-- /TMPL_IF --> framework. </p></div>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<form method="get" action="/cgi-bin/koha/admin/fieldmapping.pl" id="selectframework">
|
||||
<label for="framework">Framework :</label>
|
||||
<label for="framework">Framework:</label>
|
||||
<select name="framework" id="framework" style="width:20em;">
|
||||
<option value="">Default</option>
|
||||
<!-- TMPL_LOOP NAME="frameworkloop" -->
|
||||
<!-- TMPL_IF NAME="selected" -->
|
||||
<option selected="selected" value="<!-- TMPL_VAR NAME='value' -->"><!--TMPL_VAR NAME='frameworktext' --></option>
|
||||
<option selected="selected" value="<!-- TMPL_VAR NAME='value' -->"><!--TMPL_VAR NAME="frameworktext" --></option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="<!-- TMPL_VAR NAME="value" -->"><!--TMPL_VAR NAME="frameworktext" --></option>
|
||||
<!-- /TMPL_IF -->
|
||||
|
|
@ -59,7 +59,7 @@ $(document).ready(function() {
|
|||
</form>
|
||||
|
||||
<!-- TMPL_IF NAME="fields" --><table>
|
||||
<caption>Mappings for this framework</caption>
|
||||
<caption>Mappings for the <!-- TMPL_IF NAME="frameworktext" --><em><!-- TMPL_VAR NAME="frameworktext" --></em><!-- TMPL_ELSE -->default<!-- /TMPL_IF --> framework</caption>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>MARC Field</th>
|
||||
|
|
|
|||
Loading…
Reference in New Issue