webstaff: improve truthiness test of bre.deleted in marc editor
[Evergreen.git] / Open-ILS / src / templates / staff / cat / share / t_marcedit.tt2
1 <div>
2   <div ng-show="bre && fastAdd" class="row pad-vert marcfastitemadd">
3     <div class="col-md-2">
4       <label><input type="checkbox" ng-model="enable_fast_add"/> [% l('Add Item') %]</label>
5     </div>
6     <div class="col-md-2">
7       <input id="mfiacn" class="form-control" ng-show="enable_fast_add" type="text" placeholder="[% l('Call Number') %]" ng-model="fast_item_callnumber"/>
8     </div>
9     <div class="col-md-2">
10       <input id="mfiabc" class="form-control" ng-show="enable_fast_add" type="text" placeholder="[% l('Barcode') %]" ng-model="fast_item_barcode"/>
11     </div>
12   </div>
13
14   <div class="pad-vert row marctypesource">
15     <div class="col-md-2 form-group" ng-show="!flatOnly">
16       <label>
17         <input type="checkbox" ng-model="flatEditor" ng-change="refreshVisual()"/>
18         [% l('Flat Text Editor') %]
19       </label>
20     </div>
21     <div class="col-md-2 form-group" ng-show="!flatOnly">
22       <label>
23         <input type="checkbox" ng-model="stackSubfields.enabled" />
24         [% l('Stack subfields') %]
25       </label>
26     </div>
27     <div class="col-md-3">
28       <div class="input-group">
29         <span class="input-group-addon"><b>[% l('Record Type') %]</b></span>
30         <span class="input-group-addon">{{calculated_record_type}}</span>
31       </div>
32     </div>
33     <div ng-if="bre" class="col-md-2">
34       <eg-marc-edit-bibsource/>
35     </div>
36     <div class="col-md-3">
37       <div class="btn-group">
38         <span class="btn-group">
39           <button class="btn btn-default" ng-show="record_type == 'bre' && !flatOnly" ng-click="validateHeadings()">[% l('Validate') %]</button>
40         </span>
41         <span class="btn-group">
42           <button class="btn btn-primary" ng-click="saveRecord()">{{ saveLabel || "[% l('Save') %]"}}</button>
43         </span>
44         <span class="btn-group">
45           <button ng-hide="brandNewRecord || embedded || Record().deleted() == 't'" class="btn btn-default" ng-click="deleteRecord()">[% l('Delete') %]</button>
46           <button ng-hide="brandNewRecord || Record().deleted() != 't'" class="btn btn-default" ng-click="undeleteRecord()">[% l('Undelete') %]</button>
47         </span>
48         <span class="btn-group">
49           <button class="btn btn-default" ng-click="showHelp = !showHelp">[% l('Help') %]</button>
50         </span>
51       </div>
52     </div>
53   </div>
54
55   <div ng-show="flatEditor">
56     <textarea class="marcflateditor" cols="120" rows="40" ng-model="flat_text_marc" ng-blur="saveFlatTextMARC()"></textarea>
57   </div>
58   <div ng-show="!flatEditor">
59     <div class="row pad-vert">
60       <div class="marcffeditor">
61         <div class="row col-md-12">
62             <eg-marc-edit-fixed-field fixed-field="Type" record="record"></eg-marc-edit-fixed-field>
63             <eg-marc-edit-fixed-field fixed-field="ELvl" record="record"></eg-marc-edit-fixed-field>
64             <eg-marc-edit-fixed-field fixed-field="Source" record="record"></eg-marc-edit-fixed-field>
65             <eg-marc-edit-fixed-field fixed-field="Audn" record="record"></eg-marc-edit-fixed-field>
66             <eg-marc-edit-fixed-field fixed-field="Ctrl" record="record"></eg-marc-edit-fixed-field>
67             <eg-marc-edit-fixed-field fixed-field="Lang" record="record"></eg-marc-edit-fixed-field>
68         </div>
69         <div class="row col-md-12">
70             <eg-marc-edit-fixed-field fixed-field="BLvl" record="record"></eg-marc-edit-fixed-field>
71             <eg-marc-edit-fixed-field fixed-field="Form" record="record"></eg-marc-edit-fixed-field>
72             <eg-marc-edit-fixed-field fixed-field="Conf" record="record"></eg-marc-edit-fixed-field>
73             <eg-marc-edit-fixed-field fixed-field="Biog" record="record"></eg-marc-edit-fixed-field>
74             <eg-marc-edit-fixed-field fixed-field="MRec" record="record"></eg-marc-edit-fixed-field>
75             <eg-marc-edit-fixed-field fixed-field="Ctry" record="record"></eg-marc-edit-fixed-field>
76         </div>
77         <div class="row col-md-12">
78             <eg-marc-edit-fixed-field fixed-field="s_l" record="record"></eg-marc-edit-fixed-field>
79             <eg-marc-edit-fixed-field fixed-field="Cont" record="record"></eg-marc-edit-fixed-field>
80             <eg-marc-edit-fixed-field fixed-field="GPub" record="record"></eg-marc-edit-fixed-field>
81             <eg-marc-edit-fixed-field fixed-field="LitF" record="record"></eg-marc-edit-fixed-field>
82             <eg-marc-edit-fixed-field fixed-field="Indx" record="record"></eg-marc-edit-fixed-field>
83             <eg-marc-edit-fixed-field fixed-field="Alph" record="record"></eg-marc-edit-fixed-field>
84         </div>
85         <div class="row col-md-12">
86             <eg-marc-edit-fixed-field fixed-field="Desc" record="record"></eg-marc-edit-fixed-field>
87             <eg-marc-edit-fixed-field fixed-field="Ills" record="record"></eg-marc-edit-fixed-field>
88             <eg-marc-edit-fixed-field fixed-field="Fest" record="record"></eg-marc-edit-fixed-field>
89             <eg-marc-edit-fixed-field fixed-field="DtSt" record="record"></eg-marc-edit-fixed-field>
90             <eg-marc-edit-fixed-field fixed-field="Date1" record="record"></eg-marc-edit-fixed-field>
91             <eg-marc-edit-fixed-field fixed-field="Date2" record="record"></eg-marc-edit-fixed-field>
92         </div>
93         <div class="row col-md-12">
94             <eg-marc-edit-fixed-field fixed-field="SrTp" record="record"></eg-marc-edit-fixed-field>
95             <eg-marc-edit-fixed-field fixed-field="Regl" record="record"></eg-marc-edit-fixed-field>
96             <eg-marc-edit-fixed-field fixed-field="Orig" record="record"></eg-marc-edit-fixed-field>
97             <eg-marc-edit-fixed-field fixed-field="Freq" record="record"></eg-marc-edit-fixed-field>
98             <eg-marc-edit-fixed-field fixed-field="EntW" record="record"></eg-marc-edit-fixed-field>
99         </div>
100         <div class="row col-md-12">
101             <eg-marc-edit-fixed-field fixed-field="TrAr" record="record"></eg-marc-edit-fixed-field>
102             <eg-marc-edit-fixed-field fixed-field="Part" record="record"></eg-marc-edit-fixed-field>
103             <eg-marc-edit-fixed-field fixed-field="LTxt" record="record"></eg-marc-edit-fixed-field>
104             <eg-marc-edit-fixed-field fixed-field="FMus" record="record"></eg-marc-edit-fixed-field>
105             <eg-marc-edit-fixed-field fixed-field="AccM" record="record"></eg-marc-edit-fixed-field>
106             <eg-marc-edit-fixed-field fixed-field="Comp" record="record"></eg-marc-edit-fixed-field>
107         </div>
108         <div class="row col-md-12">
109             <eg-marc-edit-fixed-field fixed-field="SpFm" record="record"></eg-marc-edit-fixed-field>
110             <eg-marc-edit-fixed-field fixed-field="Relf" record="record"></eg-marc-edit-fixed-field>
111             <eg-marc-edit-fixed-field fixed-field="Proj" record="record"></eg-marc-edit-fixed-field>
112             <eg-marc-edit-fixed-field fixed-field="CrTp" record="record"></eg-marc-edit-fixed-field>
113         </div>
114         <div class="row col-md-12">
115             <eg-marc-edit-fixed-field fixed-field="TMat" record="record"></eg-marc-edit-fixed-field>
116             <eg-marc-edit-fixed-field fixed-field="Time" record="record"></eg-marc-edit-fixed-field>
117             <eg-marc-edit-fixed-field fixed-field="Tech" record="record"></eg-marc-edit-fixed-field>
118             <eg-marc-edit-fixed-field fixed-field="File" record="record"></eg-marc-edit-fixed-field>
119         </div>
120         <div class="row col-md-12">
121             <eg-marc-edit-fixed-field fixed-field="Type_tbmfhd" record="record"></eg-marc-edit-fixed-field>
122             <eg-marc-edit-fixed-field fixed-field="ELvl_tbmfhd" record="record"></eg-marc-edit-fixed-field>
123             <eg-marc-edit-fixed-field fixed-field="Item_tbmfhd" record="record"></eg-marc-edit-fixed-field>
124             <eg-marc-edit-fixed-field fixed-field="GeoDiv" record="record"></eg-marc-edit-fixed-field>
125             <eg-marc-edit-fixed-field fixed-field="Roman" record="record"></eg-marc-edit-fixed-field>
126             <eg-marc-edit-fixed-field fixed-field="CatLang" record="record"></eg-marc-edit-fixed-field>
127         </div>
128         <div class="row col-md-12">
129             <eg-marc-edit-fixed-field fixed-field="Kind" record="record"></eg-marc-edit-fixed-field>
130             <eg-marc-edit-fixed-field fixed-field="Rules" record="record"></eg-marc-edit-fixed-field>
131             <eg-marc-edit-fixed-field fixed-field="Subj" record="record"></eg-marc-edit-fixed-field>
132             <eg-marc-edit-fixed-field fixed-field="Series" record="record"></eg-marc-edit-fixed-field>
133             <eg-marc-edit-fixed-field fixed-field="SerNum" record="record"></eg-marc-edit-fixed-field>
134             <eg-marc-edit-fixed-field fixed-field="NameUse" record="record"></eg-marc-edit-fixed-field>
135         </div>
136         <div class="row col-md-12">
137             <eg-marc-edit-fixed-field fixed-field="SubjUse" record="record"></eg-marc-edit-fixed-field>
138             <eg-marc-edit-fixed-field fixed-field="SerUse" record="record"></eg-marc-edit-fixed-field>
139             <eg-marc-edit-fixed-field fixed-field="TypeSubd" record="record"></eg-marc-edit-fixed-field>
140             <eg-marc-edit-fixed-field fixed-field="GovtAgn" record="record"></eg-marc-edit-fixed-field>
141             <eg-marc-edit-fixed-field fixed-field="RefStatus" record="record"></eg-marc-edit-fixed-field>
142             <eg-marc-edit-fixed-field fixed-field="UpdStatus" record="record"></eg-marc-edit-fixed-field>
143         </div>
144         <div class="row col-md-12">
145             <eg-marc-edit-fixed-field fixed-field="Name" record="record"></eg-marc-edit-fixed-field>
146             <eg-marc-edit-fixed-field fixed-field="Status" record="record"></eg-marc-edit-fixed-field>
147             <eg-marc-edit-fixed-field fixed-field="ModRec" record="record"></eg-marc-edit-fixed-field>
148         </div>
149       </div>
150     </div>
151     <div class="marcrecord pad-vert">
152       <div uib-collapse="!showHelp">
153         <div class="row">
154           <div class="col-md-4">
155             <ul>
156                <li>[% l('Undo: CTRL-z') %]</li>
157                <li>[% l('Redo: CTRL-y') %]</li>
158                <li>[% l('Add Row: CTRL+Enter') %]</li>
159                <li>[% l('Insert Row: CTRL+Shift+Enter') %]</li>
160             </ul>
161           </div>
162           <div class="col-md-4">
163             <ul>
164                <li>[% l('Copy Current Row Above: CTRL+Up') %]</li>
165                <li>[% l('Copy Current Row Below: CTRL+Down') %]</li>
166                <li>[% l('Add Subfield: CTRL+D or CTRL+I') %]</li>
167                <li>[% l('Remove Row: CTRL+Del') %]</li>
168             </ul>
169           </div>
170           <div class="col-md-4">
171             <ul>
172                <li>[% l('Remove Subfield: Shift+Del') %]</li>
173                <li>[% l('Create/Replace 006: Shift+F6') %]</li>
174                <li>[% l('Create/Replace 007: Shift+F7') %]</li>
175                <li>[% l('Create/Replace 008: Shift+F8') %]</li>
176             </ul>
177           </div>
178         </div>
179       </div>
180       <div>
181         <eg-marc-edit-leader record="record" on-keydown="onKeydown"/>
182       </div>
183       <div>
184         <eg-marc-edit-controlfield 
185           ng-repeat="field in controlfields" 
186           field="field" on-keydown="onKeydown"
187           id="r{{field.record.subfield('901','c')[1]}}f{{field.position}}"
188           context-functions="context_functions"
189         />
190       </div>
191       <div>
192         <eg-marc-edit-datafield 
193           ng-repeat="field in datafields" 
194           field="field" on-keydown="onKeydown" 
195           id="r{{field.record.subfield('901','c')[1]}}f{{field.position}}"
196           context-functions="context_functions"
197         />
198       </div>
199     </div>
200   </div>
201 </div>