<commit_before><!--
  ~ The contents of this file are subject to the OpenMRS Public License
  ~ Version 2.0 (the "License"); you may not use this file except in
  ~ compliance with the License. You may obtain a copy of the License at
  ~ http://license.openmrs.org
  ~
  ~ Software distributed under the License is distributed on an "AS IS"
  ~ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  ~ License for the specific language governing rights and limitations
  ~ under the License.
  ~
  ~ Copyright (C) OpenMRS, LLC.  All Rights Reserved.
  -->
<script id="detail-template" type="text/template">
    <div>
        <p>
            <a id="addLink" class="addLink" href="#"><?= __("Add %s", model.modelName()) ?></a>
        </p>
    </div>
    <div id="detailTabs" style="display: none">
        <ul id="detailTabList" style="display: none">
            <li><a href="#stockroomDetails">Details</a></li>
            <li><a href="#items">Items</a></li>
            <li><a href="#operations">Operations</a></li>
            <li><a href="#transactions">Transactions</a></li>
        </ul>

        <? if (model.isNew()) { ?>
            <b class="boxHeader title">Add New Stockroom</b>
        <? } ?>

        <div class="box form" id="stockroomDetails">
                <input type="submit" class="submit" value="<?= model.isNew() ? __("Create %s", model.modelName()) : __("Update %s", model.modelName()) ?>" />
                <button class="cancel"><?= __("Cancel") ?></button>
            <br /><br />
            <div class="retireVoidPurge" style="width: 75%">
                <div class="box">
                    <? var strRetireOrVoid = model.getDataType() === "data" ? "Void" : "Retire" ?>
                    <? if (model.isRetired()) { ?>
                    <? var strUnretire = "Un" + strRetireOrVoid.toLowerCase() ?>
                    <h4><?= __(strUnretire + " %s", model.modelName()) ?></h4>
                    <button class="unretireOrUnvoid"><?= __(strUnretire) ?></button>
                    <? } else { ?>
                    <h4><?= __(strRetireOrVoid + " %s", model.modelName()) ?></h4>
                    <label for="reason">Reason</label> <input name="reason" id="reason" class="reason" type="text" /><br />
                    <button class="retireOrVoid"><?= __(strRetireOrVoid) ?></button>
                    <? } ?>
                </div>
                <br />
                <div class="box">
                    <h4><?= __("Purge %s", model.modelName()) ?></h4>
                    <button class="purge"><?= __("Purge") ?></button>
                </div>
            </div>
        </div>
        <div id="items"></div>
        <div id="operations"></div>
        <div id="transactions"></div>
    </div>
</script>

<script id="stockroom-list" type="text/template">
	<div style="width: 100%">
		<? if (listLength === 0) { ?>
		<p class="empty"><?= __("There are currently no %s", modelType.modelNamePlural().toLowerCase()) ?></p>
		<? } else { ?>
		<table class="display" width="100%">
			<thead>
			<tr>
				<? if (options.itemActions.length > 0) { ?><th class="item-actions end" style="width: <?= options.itemActions.length * 10 ?>px;"></td> <? } ?>
				<? for (var field in fields) { if (modelSchema[fields[field]] && modelSchema[fields[field]].hidden) continue; ?>
                    <? var fieldClassName = "field-" + fields[field]; ?>
                    <th class="<?= fieldClassName ?>">
                        <? if (modelSchema[fields[field]] !== undefined) {
                            print(modelSchema[fields[field]].title === undefined ? helpers.keyToTitle(fields[field]) : modelSchema[fields[field]].title);
                        }
                        else
                            print(fields[field]);
                        ?>
                    </th>
				<? } ?>
			</tr>
			</thead>
			<tbody class="list"></tbody>
			<tfoot></tfoot>
		</table>
		<? } ?>
		<? if (pagingEnabled) { ?>
		<div class="paging-container ui-helper-clearfix"></div>
		<? } ?>
		<? var strRetiredOrVoided = (modelMeta.openmrsType === 'data') ? "voided" : "retired" ?>
		<? if (pagingEnabled) { ?><span class="pageSize"></span><? } ?>
		<? if (options.showRetiredOption) { ?><span class="showRetired"><input id="showRetired" type="checkbox"<?= showRetired ? ' checked="checked"' : '' ?>/><label for="showRetired"><?= __("Show " + strRetiredOrVoided) ?></label></span><? } ?>
	</div>
</script><commit_msg>Added spinner section to stockroom lists template. 	The stockroom lists use a template similar to the generic list but it was not updated with the spinner div. 	^inv-136 fixed<commit_after><!--
  ~ The contents of this file are subject to the OpenMRS Public License
  ~ Version 2.0 (the "License"); you may not use this file except in
  ~ compliance with the License. You may obtain a copy of the License at
  ~ http://license.openmrs.org
  ~
  ~ Software distributed under the License is distributed on an "AS IS"
  ~ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  ~ License for the specific language governing rights and limitations
  ~ under the License.
  ~
  ~ Copyright (C) OpenMRS, LLC.  All Rights Reserved.
  -->
<script id="detail-template" type="text/template">
    <div>
        <p>
            <a id="addLink" class="addLink" href="#"><?= __("Add %s", model.modelName()) ?></a>
        </p>
    </div>
    <div id="detailTabs" style="display: none">
        <ul id="detailTabList" style="display: none">
            <li><a href="#stockroomDetails">Details</a></li>
            <li><a href="#items">Items</a></li>
            <li><a href="#operations">Operations</a></li>
            <li><a href="#transactions">Transactions</a></li>
        </ul>

        <? if (model.isNew()) { ?>
        <b class="boxHeader title">Add New Stockroom</b>
        <? } ?>

        <div class="box form" id="stockroomDetails">
            <input type="submit" class="submit" value="<?= model.isNew() ? __(" Create %s", model.modelName()) :__("Update %s", model.modelName()) ?>" />
            <button class="cancel"><?= __("Cancel") ?></button>
            <br/><br/>

            <div class="retireVoidPurge" style="width: 75%">
                <div class="box">
                    <? var strRetireOrVoid = model.getDataType() === "data" ? "Void" : "Retire" ?>
                    <? if (model.isRetired()) { ?>
                    <? var strUnretire = "Un" + strRetireOrVoid.toLowerCase() ?>
                    <h4><?= __(strUnretire + " %s", model.modelName()) ?></h4>
                    <button class="unretireOrUnvoid"><?= __(strUnretire) ?></button>
                    <? } else { ?>
                    <h4><?= __(strRetireOrVoid + " %s", model.modelName()) ?></h4>
                    <label for="reason">Reason</label> <input name="reason" id="reason" class="reason" type="text"/><br/>
                    <button class="retireOrVoid"><?= __(strRetireOrVoid) ?></button>
                    <? } ?>
                </div>
                <br/>

                <div class="box">
                    <h4><?= __("Purge %s", model.modelName()) ?></h4>
                    <button class="purge"><?= __("Purge") ?></button>
                </div>
            </div>
        </div>
        <div id="items"></div>
        <div id="operations"></div>
        <div id="transactions"></div>
    </div>
</script>

<script id="stockroom-list" type="text/template">
    <div style="width: 100%">
        <? if (listLength === 0) { ?>
        <p class="empty"><?= __("There are currently no %s", modelType.modelNamePlural().toLowerCase()) ?></p>
        <? } else { ?>
        <table class="display" width="100%">
            <thead>
            <tr>
                <? if (options.itemActions.length > 0) { ?>
                <th class="item-actions end" style="width: <?= options.itemActions.length * 10 ?>px;">
                </td> <? } ?>
                <? for (var field in fields) { if (modelSchema[fields[field]] && modelSchema[fields[field]].hidden) continue; ?>
                <? var fieldClassName = "field-" + fields[field]; ?>
                <th class="<?= fieldClassName ?>">
                    <? if (modelSchema[fields[field]] !== undefined) {
                            print(modelSchema[fields[field]].title === undefined ? helpers.keyToTitle(fields[field]) : modelSchema[fields[field]].title);
                        }
                        else
                            print(fields[field]);
                        ?>
                </th>
                <? } ?>
            </tr>
            </thead>
            <tbody class="list"></tbody>
            <tfoot></tfoot>
        </table>
        <? } ?>
        <? if (options.spinnerEnabled) { ?>
        <div class="tSpace">
            <div class="overlay">
                <div class="modalSpinner">
                    <div class="spinner"></div>
                    <? if (options.loadingText) { ?>
                    <div class="loadingText"><?=__("Loading %s", modelType.modelNamePlural()) ?></div>
                    <? } ?>
                </div>
            </div>
        </div>
        <? } ?>
        <? if (pagingEnabled) { ?>
        <div class="paging-container ui-helper-clearfix"></div>
        <? } ?>
        <? var strRetiredOrVoided = (modelMeta.openmrsType === 'data') ? "voided" : "retired" ?>
        <? if (pagingEnabled) { ?><span class="pageSize"></span><? } ?>
        <? if (options.showRetiredOption) { ?><span class="showRetired"><input id="showRetired"
                                                                               type="checkbox"<?= showRetired ? ' checked="checked"' : '' ?>
        /><label for="showRetired"><?= __("Show " + strRetiredOrVoided) ?></label></span><? } ?>
    </div>
</script>
{'fraction_non_alphanumeric': 0.18579568579568578, 'fraction_numerical': 0.004375254375254376, 'mean_word_length': 2.0215185982170305, 'pattern_counts': {'":': 0, '<': 284, '<?xml version=': 0, '>': 286, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2399103', 'n_tokens_mistral': 2911, 'n_tokens_neox': 2855, 'n_words': 658}