Bug 31677: Convert basic MARC editor tabs to Bootstrap
This patch modifies the basic MARC editor template to replace jQueryUI tabs with Bootstrap tabs. The changes should have no visible effect, with all previous functionality still intact. To test, apply the patch and go to Cataloging -> New record. - When the page first displays, the "0" tab should be active. - Test that each of the numbered tabs works correctly to activate the correct tab content. - Confirm that the numbered tag anchors still work correctly. - Append a specific tab anchor to the URL, e.g. "#tab4XX" and refresh the page (you may need to shift-refresh). When the page reloads the correct tab should be active by default. - Try appending a query string to the URL, e.g. "?tab=tab4XX" This should reload the page and make the correct tab active. - Confirm that sortable subfields can still be re-ordered by dragging and dropping them via the "stacked lines" icons. Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
acea770e18
commit
6017a91c8d
|
|
@ -6,22 +6,16 @@ div#toolbar {
|
|||
border: 0;
|
||||
}
|
||||
|
||||
#addbibliotabs .ui-tabs-nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ui-tabs-panel h3,
|
||||
.tab-pane h3 {
|
||||
font-size: 140%;
|
||||
margin: .3em 0;
|
||||
}
|
||||
|
||||
.ui-tabs-panel ul,
|
||||
.tab-pane ul {
|
||||
margin-bottom: 0;
|
||||
padding-left: 0;
|
||||
|
|
@ -276,11 +270,6 @@ tbody tr.active td {
|
|||
width: 15em;
|
||||
}
|
||||
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.toolbar-tabs-container {
|
||||
margin: 3em -5px -5px -5px;
|
||||
}
|
||||
|
|
@ -461,7 +450,3 @@ tbody tr.active td {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
#authoritiestabs .ui-tabs-nav.ui-widget-header {
|
||||
border-bottom: 1px solid #b9d8d9;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,21 +32,31 @@
|
|||
$("#toolbar").hide();
|
||||
[% END %]
|
||||
|
||||
var $tabs = $('#addbibliotabs').tabs().bind('show.ui-tabs', function(e, ui) {
|
||||
$("#"+ui.panel.id+" input:eq(0)").focus();
|
||||
$("a[data-toggle='tab']").on("shown.bs.tab", function (e) {
|
||||
$( e.target.hash + " .input_marceditor:visible:eq(0)").focus();
|
||||
});
|
||||
$( "ul.sortable_field", $tabs ).sortable({
|
||||
|
||||
/* On page load, check for location.hash in the page URL */
|
||||
/* If present the location hash will be used to activate the correct tab */
|
||||
var hash = location.hash;
|
||||
var hashPieces = hash.split('?');
|
||||
if( hashPieces[0] !== "" ){
|
||||
selectTab( hashPieces[0] );
|
||||
window.scrollTo( 0, 0 );
|
||||
}
|
||||
|
||||
$( "ul.sortable_field", "#addbibliotabs" ).sortable({
|
||||
axis: "y",
|
||||
containment: $("#addbibliotabs")
|
||||
});
|
||||
$( "ul.sortable_subfield", $tabs ).sortable({
|
||||
$( "ul.sortable_subfield", "#addbibliotabs" ).sortable({
|
||||
axis: "y",
|
||||
containment: "parent"
|
||||
});
|
||||
|
||||
[% IF tab %]
|
||||
link = $("a[href='#[% tab | html %]']");
|
||||
selectTab( link );
|
||||
hash = "#[% tab | html %]";
|
||||
selectTab( hash );
|
||||
[% END %]
|
||||
|
||||
Sticky = $("#toolbar");
|
||||
|
|
@ -151,7 +161,7 @@
|
|||
|
||||
$(".toolbar-tabs a").on("click",function(e){
|
||||
e.preventDefault();
|
||||
selectTab( $(this ) );
|
||||
selectTab( this.hash );
|
||||
});
|
||||
|
||||
$(".tag_anchor").on("click", function(e){
|
||||
|
|
@ -179,10 +189,10 @@
|
|||
});
|
||||
|
||||
function selectTab( tablink ){
|
||||
let a = $("a[href='" + tablink + "']");
|
||||
$(".toolbar-tabs li").removeClass("selected");
|
||||
tablink.parent().addClass("selected");
|
||||
var tabid = tablink.data("tabid");
|
||||
$('#addbibliotabs').selectTabByID("#tab" + tabid + "XX");
|
||||
a.tab("show").parent().addClass("selected");
|
||||
var tabid = a.data("tabid");
|
||||
$(".tag_anchors").removeClass("tab_selected").hide();
|
||||
$(".tag_anchors_" + tabid ).addClass("tab_selected").show();
|
||||
}
|
||||
|
|
@ -950,14 +960,14 @@ function PopupMARCFieldDoc(field) {
|
|||
[% END # /UNLESS circborrowernumber %]
|
||||
<div class="toolbar-tabs-container">
|
||||
[% IF ( BIG_LOOP && BIG_LOOP.size > 1 ) %]
|
||||
<ul class="toolbar-tabs">
|
||||
<ul class="toolbar-tabs" role="tablist">
|
||||
[%- FOREACH BIG_LOO IN BIG_LOOP -%]
|
||||
[% IF loop.first %]
|
||||
<li class="selected">
|
||||
<li role="presentation" class="active selected">
|
||||
[% ELSE %]
|
||||
<li>
|
||||
<li role="presentation">
|
||||
[% END %]
|
||||
<a data-tabid="[% BIG_LOO.number | html %]" href="#tab[% BIG_LOO.number | html %]XX">[% BIG_LOO.number | html %]</a>
|
||||
<a data-tabid="[% BIG_LOO.number | html %]" href="#tab[% BIG_LOO.number | html %]XX" aria-controls="#tab[% BIG_LOO.number | html %]XX" role="tab" data-toggle="tab">[% BIG_LOO.number | html %]</a>
|
||||
</li>
|
||||
[%- END -%]
|
||||
</ul>
|
||||
|
|
@ -995,205 +1005,206 @@ function PopupMARCFieldDoc(field) {
|
|||
<input type="hidden" name="changed_framework" value="" />
|
||||
|
||||
<div id="addbibliotabs" class="toptabs numbered">
|
||||
<ul>
|
||||
<div class="tab-content">
|
||||
|
||||
[% FOREACH BIG_LOO IN BIG_LOOP %]
|
||||
<li><a href="#tab[% BIG_LOO.number | uri %]XX">[% BIG_LOO.number | html %]</a></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
|
||||
[% FOREACH BIG_LOO IN BIG_LOOP %]
|
||||
<div id="tab[% BIG_LOO.number | html %]XX">
|
||||
|
||||
[% IF ( BIG_LOOP.size > 1 ) %]
|
||||
<h3>Section [% BIG_LOO.number | html %]</h3>
|
||||
[% IF loop.first %]
|
||||
<div id="tab[% BIG_LOO.number | html %]XX" role="tabpanel" class="tab-pane active">
|
||||
[% ELSE %]
|
||||
<div id="tab[% BIG_LOO.number | html %]XX" role="tabpanel" class="tab-pane">
|
||||
[% END %]
|
||||
[% previous = "" %]
|
||||
[% FOREACH innerloo IN BIG_LOO.innerloop %]
|
||||
[% IF ( innerloo.tag ) %]
|
||||
[% IF innerloo.tag != previous %]
|
||||
[% IF previous != "" %]
|
||||
</ul>
|
||||
[% END %]
|
||||
[% previous = innerloo.tag %]
|
||||
[% IF ( innerloo.repeatable ) %]
|
||||
<ul class="sortable_field">
|
||||
[% ELSE %]
|
||||
<ul>
|
||||
[% END %]
|
||||
|
||||
[% IF ( BIG_LOOP.size > 1 ) %]
|
||||
<h3>Section [% BIG_LOO.number | html %]</h3>
|
||||
[% END %]
|
||||
[% IF ( innerloo.repeatable ) %]
|
||||
<li class="tag sortable_tag clearfix" id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
|
||||
[% ELSE %]
|
||||
<li class="tag clearfix" id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
|
||||
[% previous = "" %]
|
||||
[% FOREACH innerloo IN BIG_LOO.innerloop %]
|
||||
[% IF ( innerloo.tag ) %]
|
||||
[% IF innerloo.tag != previous %]
|
||||
[% IF previous != "" %]
|
||||
</ul>
|
||||
[% END %]
|
||||
[% previous = innerloo.tag %]
|
||||
[% IF ( innerloo.repeatable ) %]
|
||||
<ul class="sortable_field">
|
||||
[% ELSE %]
|
||||
<ul>
|
||||
[% END %]
|
||||
[% END %]
|
||||
<div class="tag_title" id="div_indicator_tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
|
||||
[% IF advancedMARCEditor %]
|
||||
<a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;">[% innerloo.tag | html %]</a>
|
||||
[% ELSE %]
|
||||
<span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
|
||||
<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag | html %]'); return false;"> ?</a>
|
||||
[% END %]
|
||||
|
||||
[% IF ( innerloo.fixedfield ) %]
|
||||
<input type="text"
|
||||
tabindex="1"
|
||||
class="indicator flat"
|
||||
style="display:none;"
|
||||
name="tag_[% innerloo.tag | html %]_indicator1_[% innerloo.index | html %][% innerloo.random | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
value="[% innerloo.indicator1 | html %]" />
|
||||
<input type="text"
|
||||
tabindex="1"
|
||||
class="indicator flat"
|
||||
style="display:none;"
|
||||
name="tag_[% innerloo.tag | html %]_indicator2_[% innerloo.index | html %][% innerloo.random | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
value="[% innerloo.indicator2 | html %]" />
|
||||
[% ELSE %]
|
||||
<input type="text"
|
||||
tabindex="1"
|
||||
class="indicator flat"
|
||||
name="tag_[% innerloo.tag | html %]_indicator1_[% innerloo.index | html %][% innerloo.random | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
value="[% innerloo.indicator1 | html %]" />
|
||||
<input type="text"
|
||||
tabindex="1"
|
||||
class="indicator flat"
|
||||
name="tag_[% innerloo.tag | html %]_indicator2_[% innerloo.index | html %][% innerloo.random | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
value="[% innerloo.indicator2 | html %]" />
|
||||
[% END # /IF innerloo.fixedfield %] -
|
||||
|
||||
[% UNLESS advancedMARCEditor %]
|
||||
<a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib | html %]</a>
|
||||
[% END %]
|
||||
|
||||
<span class="field_controls">
|
||||
[% IF ( innerloo.repeatable ) %]
|
||||
<a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]','0','[% advancedMARCEditor | html %]'); return false;" title="Repeat this Tag">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/repeat-tag.png" alt="Repeat this Tag" />
|
||||
</a>
|
||||
[% IF ( innerloo.repeatable ) %]
|
||||
<li class="tag sortable_tag clearfix" id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
|
||||
[% ELSE %]
|
||||
<li class="tag clearfix" id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
|
||||
[% END %]
|
||||
<div class="tag_title" id="div_indicator_tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
|
||||
[% IF advancedMARCEditor %]
|
||||
<a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;">[% innerloo.tag | html %]</a>
|
||||
[% ELSE %]
|
||||
<span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
|
||||
<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag | html %]'); return false;"> ?</a>
|
||||
[% END %]
|
||||
<a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Delete this Tag">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/delete-tag.png" alt="Delete this Tag" />
|
||||
</a>
|
||||
</span> <!-- /.field_controls -->
|
||||
</div> <!-- /div.tag_title -->
|
||||
|
||||
<ul class="sortable_subfield">
|
||||
[% FOREACH subfield_loo IN innerloo.subfield_loop %]
|
||||
<!-- One line on the marc editor -->
|
||||
<li class="subfield_line" style="[% subfield_loo.visibility | html %]" id="subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]">
|
||||
<div class="subfieldcode">
|
||||
[% IF ( innerloo.fixedfield ) %]
|
||||
<input type="text"
|
||||
title="[% subfield_loo.marc_lib | $raw %]"
|
||||
style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;"
|
||||
name="tag_[% subfield_loo.tag | html %]_code_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]"
|
||||
value="[% subfield_loo.subfield | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
class="flat"
|
||||
tabindex="0" />
|
||||
</div>
|
||||
tabindex="1"
|
||||
class="indicator flat"
|
||||
style="display:none;"
|
||||
name="tag_[% innerloo.tag | html %]_indicator1_[% innerloo.index | html %][% innerloo.random | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
value="[% innerloo.indicator1 | html %]" />
|
||||
<input type="text"
|
||||
tabindex="1"
|
||||
class="indicator flat"
|
||||
style="display:none;"
|
||||
name="tag_[% innerloo.tag | html %]_indicator2_[% innerloo.index | html %][% innerloo.random | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
value="[% innerloo.indicator2 | html %]" />
|
||||
[% ELSE %]
|
||||
<input type="text"
|
||||
tabindex="1"
|
||||
class="indicator flat"
|
||||
name="tag_[% innerloo.tag | html %]_indicator1_[% innerloo.index | html %][% innerloo.random | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
value="[% innerloo.indicator1 | html %]" />
|
||||
<input type="text"
|
||||
tabindex="1"
|
||||
class="indicator flat"
|
||||
name="tag_[% innerloo.tag | html %]_indicator2_[% innerloo.index | html %][% innerloo.random | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
value="[% innerloo.indicator2 | html %]" />
|
||||
[% END # /IF innerloo.fixedfield %] -
|
||||
|
||||
[% UNLESS advancedMARCEditor %]
|
||||
[% IF ( subfield_loo.mandatory ) %]
|
||||
<div class="subfield subfield_mandatory">
|
||||
[% ELSIF ( subfield_loo.important ) %]
|
||||
<div class="subfield subfield_important">
|
||||
[% ELSE %]
|
||||
<div class="subfield">
|
||||
[% END %]
|
||||
[% IF ( subfield_loo.fixedfield ) %]
|
||||
<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" style="display:none;" class="labelsubfield">
|
||||
[% ELSE %]
|
||||
<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" class="labelsubfield">
|
||||
[% END %]
|
||||
[% subfield_loo.marc_lib | $raw %]
|
||||
</label>
|
||||
</div>
|
||||
<a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib | html %]</a>
|
||||
[% END %]
|
||||
|
||||
[% SET mv = subfield_loo.marc_value %]
|
||||
<div id="field_marceditor[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]" class="field_marceditor">
|
||||
[% IF ( mv.type == 'text' ) %]
|
||||
[% IF ( mv.readonly == 1 ) %]
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor readonly" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" readonly="readonly" />
|
||||
[% ELSE %]
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" />
|
||||
[% END %]
|
||||
|
||||
[% ELSIF ( mv.type == 'text_complex' ) %]
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor framework_plugin" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" />
|
||||
[% mv.javascript | $raw %]
|
||||
[% ELSIF ( mv.type == 'hidden' ) %]
|
||||
<input tabindex="1" type="hidden" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
|
||||
[% ELSIF ( mv.type == 'textarea' ) %]
|
||||
<textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" class="input_marceditor" tabindex="1">[%- mv.value | html -%]</textarea>
|
||||
[% ELSIF ( mv.type == 'select' ) %]
|
||||
[% IF mv.category AND CAN_user_parameters_manage_auth_values %]
|
||||
<select name="[%- mv.name | html -%]" tabindex="1" class="input_marceditor" id="[%- mv.id | html -%]" data-category="[% mv.category | html %]">
|
||||
[% ELSE %]
|
||||
<select name="[%- mv.name | html -%]" tabindex="1" class="input_marceditor select2" id="[%- mv.id | html -%]">
|
||||
<span class="field_controls">
|
||||
[% IF ( innerloo.repeatable ) %]
|
||||
<a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]','0','[% advancedMARCEditor | html %]'); return false;" title="Repeat this Tag">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/repeat-tag.png" alt="Repeat this Tag" />
|
||||
</a>
|
||||
[% END %]
|
||||
[% FOREACH aval IN mv.values %]
|
||||
[% IF aval == mv.default %]
|
||||
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
|
||||
<a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Delete this Tag">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/delete-tag.png" alt="Delete this Tag" />
|
||||
</a>
|
||||
</span> <!-- /.field_controls -->
|
||||
</div> <!-- /div.tag_title -->
|
||||
|
||||
<ul class="sortable_subfield">
|
||||
[% FOREACH subfield_loo IN innerloo.subfield_loop %]
|
||||
<!-- One line on the marc editor -->
|
||||
<li class="subfield_line" style="[% subfield_loo.visibility | html %]" id="subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]">
|
||||
<div class="subfieldcode">
|
||||
<input type="text"
|
||||
title="[% subfield_loo.marc_lib | $raw %]"
|
||||
style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;"
|
||||
name="tag_[% subfield_loo.tag | html %]_code_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]"
|
||||
value="[% subfield_loo.subfield | html %]"
|
||||
size="1"
|
||||
maxlength="1"
|
||||
class="flat"
|
||||
tabindex="0" />
|
||||
</div>
|
||||
[% UNLESS advancedMARCEditor %]
|
||||
[% IF ( subfield_loo.mandatory ) %]
|
||||
<div class="subfield subfield_mandatory">
|
||||
[% ELSIF ( subfield_loo.important ) %]
|
||||
<div class="subfield subfield_important">
|
||||
[% ELSE %]
|
||||
<div class="subfield">
|
||||
[% END %]
|
||||
[% IF ( subfield_loo.fixedfield ) %]
|
||||
<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" style="display:none;" class="labelsubfield">
|
||||
[% ELSE %]
|
||||
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
|
||||
<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" class="labelsubfield">
|
||||
[% END %]
|
||||
[% END %]
|
||||
</select>
|
||||
[% END # /IF (mv.type...) %]
|
||||
</div>
|
||||
[% IF ( subfield_loo.mandatory ) %]
|
||||
<div class="subfield_loop_mandatory">
|
||||
<span class="required">Required</span>
|
||||
</div>
|
||||
[% ELSIF ( subfield_loo.important ) %]
|
||||
<div class="subfield_loop_mandatory">
|
||||
<span class="important">Important</span>
|
||||
</div>
|
||||
[% END %]
|
||||
<div class="subfield_controls">
|
||||
[% IF ( mv.type == 'text' ) %]
|
||||
[% IF ( mv.authtype ) %]
|
||||
<a href="#" class="buttonDot tag_editor" onclick="openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id,'[%- mv.authtype | html -%]','biblio'); return false;" tabindex="1" title="Tag editor">Tag editor</a>
|
||||
[% END %]
|
||||
[% ELSIF ( mv.type == 'text_complex' ) %]
|
||||
[% IF mv.noclick %]
|
||||
<span class="buttonDot tag_editor disabled" tabindex="-1" title="Field autofilled by plugin"></span>
|
||||
[% subfield_loo.marc_lib | $raw %]
|
||||
</label>
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[% SET mv = subfield_loo.marc_value %]
|
||||
<div id="field_marceditor[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]" class="field_marceditor">
|
||||
[% IF ( mv.type == 'text' ) %]
|
||||
[% IF ( mv.readonly == 1 ) %]
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor readonly" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" readonly="readonly" />
|
||||
[% ELSE %]
|
||||
[% IF mv.plugin == "upload.pl" %]
|
||||
<a href="#" id="buttonDot_[% mv.id | html %]" class="tag_editor upload framework_plugin" tabindex="1"><i class="fa fa-upload" aria-hidden="true"></i> Upload</a>
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" />
|
||||
[% END %]
|
||||
|
||||
[% ELSIF ( mv.type == 'text_complex' ) %]
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor framework_plugin" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" />
|
||||
[% mv.javascript | $raw %]
|
||||
[% ELSIF ( mv.type == 'hidden' ) %]
|
||||
<input tabindex="1" type="hidden" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
|
||||
[% ELSIF ( mv.type == 'textarea' ) %]
|
||||
<textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" class="input_marceditor" tabindex="1">[%- mv.value | html -%]</textarea>
|
||||
[% ELSIF ( mv.type == 'select' ) %]
|
||||
[% IF mv.category AND CAN_user_parameters_manage_auth_values %]
|
||||
<select name="[%- mv.name | html -%]" tabindex="1" class="input_marceditor" id="[%- mv.id | html -%]" data-category="[% mv.category | html %]">
|
||||
[% ELSE %]
|
||||
<select name="[%- mv.name | html -%]" tabindex="1" class="input_marceditor select2" id="[%- mv.id | html -%]">
|
||||
[% END %]
|
||||
[% FOREACH aval IN mv.values %]
|
||||
[% IF aval == mv.default %]
|
||||
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
|
||||
[% ELSE %]
|
||||
<a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a>
|
||||
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</span>
|
||||
</select>
|
||||
[% END # /IF (mv.type...) %]
|
||||
</div>
|
||||
[% IF ( subfield_loo.mandatory ) %]
|
||||
<div class="subfield_loop_mandatory">
|
||||
<span class="required">Required</span>
|
||||
</div>
|
||||
[% ELSIF ( subfield_loo.important ) %]
|
||||
<div class="subfield_loop_mandatory">
|
||||
<span class="important">Important</span>
|
||||
</div>
|
||||
[% END %]
|
||||
[% IF ( subfield_loo.repeatable ) %]
|
||||
<a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]','[% advancedMARCEditor | html %]'); return false;">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
|
||||
</a>
|
||||
<a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]'); return false;">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/delete-subfield.png" alt="Delete" title="Delete this subfield" />
|
||||
</a>
|
||||
[% END %]
|
||||
</div>
|
||||
</li> <!-- /.subfield_line -->
|
||||
<!-- End of the line -->
|
||||
[% END # /FOREACH subfield_loop %]
|
||||
</ul> <!-- /.sortable_subfield -->
|
||||
</li> <!-- /.tag.clearfix -->
|
||||
[% END %]<!-- if innerloo.tag -->
|
||||
[% END # /FOREACH BIG_LOO.innerloop %]
|
||||
</ul> <!-- /.sortable_field -->
|
||||
</div> <!-- /#tabXXX -->
|
||||
[% END # /FOREACH BIG_LOOP %]
|
||||
<div class="subfield_controls">
|
||||
[% IF ( mv.type == 'text' ) %]
|
||||
[% IF ( mv.authtype ) %]
|
||||
<a href="#" class="buttonDot tag_editor" onclick="openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id,'[%- mv.authtype | html -%]','biblio'); return false;" tabindex="1" title="Tag editor">Tag editor</a>
|
||||
[% END %]
|
||||
[% ELSIF ( mv.type == 'text_complex' ) %]
|
||||
[% IF mv.noclick %]
|
||||
<span class="buttonDot tag_editor disabled" tabindex="-1" title="Field autofilled by plugin"></span>
|
||||
[% ELSE %]
|
||||
[% IF mv.plugin == "upload.pl" %]
|
||||
<a href="#" id="buttonDot_[% mv.id | html %]" class="tag_editor upload framework_plugin" tabindex="1"><i class="fa fa-upload" aria-hidden="true"></i> Upload</a>
|
||||
[% ELSE %]
|
||||
<a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</span>
|
||||
[% END %]
|
||||
[% IF ( subfield_loo.repeatable ) %]
|
||||
<a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]','[% advancedMARCEditor | html %]'); return false;">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
|
||||
</a>
|
||||
<a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]'); return false;">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/delete-subfield.png" alt="Delete" title="Delete this subfield" />
|
||||
</a>
|
||||
[% END %]
|
||||
</div>
|
||||
</li> <!-- /.subfield_line -->
|
||||
<!-- End of the line -->
|
||||
[% END # /FOREACH subfield_loop %]
|
||||
</ul> <!-- /.sortable_subfield -->
|
||||
</li> <!-- /.tag.clearfix -->
|
||||
[% END %]<!-- if innerloo.tag -->
|
||||
[% END # /FOREACH BIG_LOO.innerloop %]
|
||||
</ul> <!-- /.sortable_field -->
|
||||
</div> <!-- /#tabXXX -->
|
||||
[% END # /FOREACH BIG_LOOP %]
|
||||
</div> <!-- /.tab-content -->
|
||||
</div><!-- /#addbibliotabs -->
|
||||
|
||||
[%# Fields for fast cataloging %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue