ModCfg/views/twig/admin/tplblocks/list.html.twig

165 lines
10 KiB
Twig

{% include "headitem.html.twig" with {title: "GENERAL_ADMIN_TITLE"|translate, box: "list"} %}
{% set where = oView.getListFilter() %}
{% if readonly %}
{% set readonly = "readonly disabled" %}
{% else %}
{% set readonly = "" %}
{% endif %}
<style>
.tabs .disabled .b1 a {
color: #787878;
}
</style>
<script type="text/javascript">
<!--
window.onload = function ()
{
top.reloadEditFrame();
{% if updatelist == 1 %}
top.oxid.admin.updateList('{{ oxid }}');
{% endif %}
}
function EditThis( sID)
{
let oTransfer = parent.edit.document.getElementById("transfer");
oTransfer.oxid.value=sID;
oTransfer.cl.value='{% if actlocation %}{{ actlocation|escape("js") }}{% else %}{{ default_edit|escape("js") }}{% endif %}';
//forcing edit frame to reload after submit
top.forceReloadingEditFrame();
let oSearch = document.getElementById("search");
oSearch.oxid.value=sID;
oSearch.submit();
}
//-->
</script>
<div id="liste">
<form name="search" id="search" action="{{ oViewConf.getSelfLink()|raw }}" method="post">
{% include "_formparams.html.twig" with {cl: oViewConf.getActiveClassName()|raw, lstrt: lstrt, actedit: actedit, oxid: oxid, fnc: "", language: actlang, editlanguage: actlang} %}
<table style="width: 100%; border: none; padding: 0; border-spacing: 0; border-collapse: collapse">
<colgroup>
{% block admin_d3tplblocks_list_colgroup %}
<col style="width: 3%">
<col style="width: 22%">
<col style="width: 23%">
<col style="width: 23%">
<col style="width: 22%">
<col style="width: 5%">
<col style="width: 2%">
{% endblock %}
</colgroup>
<tr class="listitem">
{% block admin_d3tplblocks_list_filter %}
<td style="text-align: right; vertical-align: top" class="listfilter first">
<div class="r1"><div class="b1">&nbsp;</div></div>
</td>
<td style="height: 20px; vertical-align: top" class="listfilter">
<label style="display: none;" for="oxtplblocks__oxmodule">{{ translate({ ident: "D3TPLMODULE" }) }}</label>
<div class="r1"><div class="b1">
&nbsp;&nbsp;<input class="listedit" type="text" size="30" maxlength="128" id="oxtplblocks__oxmodule" name="where[oxtplblocks][oxmodule]" value="{{ where.oxtplblocks.oxmodule }}">
</div></div>
</td>
<td style="height: 20px; vertical-align: top" class="listfilter">
<label style="display: none;" for="oxtplblocks__oxtemplate">{{ translate({ ident: "D3TPLTEMPLATE" }) }}</label>
<div class="r1"><div class="b1">
&nbsp;&nbsp;<input class="listedit" type="text" size="30" maxlength="128" id="oxtplblocks__oxtemplate" name="where[oxtplblocks][oxtemplate]" value="{{ where.oxtplblocks.oxtemplate }}">
</div></div>
</td>
<td style="height: 20px; vertical-align: top" class="listfilter">
<label style="display: none;" for="oxtplblocks__oxblockname">{{ translate({ ident: "D3TPLBLOCKNAME" }) }}</label>
<div class="r1"><div class="b1">
<input class="listedit" type="text" size="32" maxlength="32" id="oxtplblocks__oxblockname" name="where[oxtplblocks][oxblockname]" value="{{ where.oxtplblocks.oxblockname }}">
</div></div>
</td>
<td style="height: 20px; vertical-align: top" class="listfilter">
<label style="display: none;" for="oxtplblocks__oxtheme">{{ translate({ ident: "D3TPLTHEME" }) }}</label>
<div class="r1"><div class="b1">
<input class="listedit" type="text" size="32" maxlength="32" id="oxtplblocks__oxtheme" name="where[oxtplblocks][oxtheme]" value="{{ where.oxtplblocks.oxtheme }}">
</div></div>
</td>
<td style="height: 20px; vertical-align: top" class="listfilter">
<label style="display: none;" for="oxtplblocks__oxpos">{{ translate({ ident: "D3TPLPOS" }) }}</label>
<div class="r1"><div class="b1">
<input class="listedit" type="text" size="4" maxlength="4" id="oxtplblocks__oxpos" name="where[oxtplblocks][oxpos]" value="{{ where.oxtplblocks.oxpos }}">
</div></div>
</td>
<td style="height: 20px; vertical-align: top" class="listfilter">
<div class="r1"><div class="b1">
<div class="find">
<input class="listedit" type="submit" name="submitit" value="{{ translate({ ident: "GENERAL_SEARCH" }) }}">
</div>
</div></div>
</td>
{% endblock %}
</tr>
<tr>
{% block admin_d3tplblocks_list_sorting %}
<td class="listheader first" style="height: 15px; width: 30px; text-align: center"><a href="Javascript:top.oxid.admin.setSorting( document.search, 'oxtplblocks', 'oxactive', 'asc');document.search.submit();" class="listheader">{{ translate({ ident: "GENERAL_ACTIVTITLE" }) }}</a></td>
<td class="listheader" height="15">&nbsp;<a href="Javascript:top.oxid.admin.setSorting( document.search, 'oxtplblocks', 'oxmodule', 'asc');document.search.submit();" class="listheader">{{ translate({ ident: "D3TPLMODULE" }) }}</a></td>
<td class="listheader">&nbsp;<a href="Javascript:top.oxid.admin.setSorting( document.search, 'oxtplblocks', 'oxtemplate', 'asc');document.search.submit();" class="listheader">{{ translate({ ident: "D3TPLTEMPLATE" }) }}</a></td>
<td class="listheader"> <a href="Javascript:top.oxid.admin.setSorting( document.search, 'oxtplblocks', 'oxblockname', 'asc');document.search.submit();" class="listheader">{{ translate({ ident: "D3TPLBLOCKNAME" }) }}</a></td>
<td class="listheader"> <a href="Javascript:top.oxid.admin.setSorting( document.search, 'oxtplblocks', 'oxtheme', 'asc');document.search.submit();" class="listheader">{{ translate({ ident: "D3TPLTHEME" }) }}</a></td>
<td class="listheader" colspan="2"> <a href="Javascript:top.oxid.admin.setSorting( document.search, 'oxtplblocks', 'oxpos', 'asc');document.search.submit();" class="listheader">{{ translate({ ident: "D3TPLPOS" }) }}</a></td>
{% endblock %}
</tr>
{% set blWhite = "" %}
{% set _cnt = 0 %}
{% for listitem in mylist %}
{% set _cnt = _cnt+1 %}
<tr id="row.{{ _cnt }}">
{% block admin_d3tplblocks_list_item %}
{% if listitem.blacklist == 1 %}
{% set listclass = "listitem3" %}
{% else %}
{% set listclass = "listitem" ~ blWhite %}
{% endif %}
{% if listitem.getId() == oxid %}
{% set listclass = "listitem4" %}
{% endif %}
<td style="vertical-align: top; height: 15px" class="{{ listclass }}{% if listitem.getFieldData('oxactive') == 1 %} active{% endif %}"><div class="listitemfloating">&nbsp;</div></td>
<td style="vertical-align: top; height: 15px" class="{{ listclass }}"><div class="listitemfloating"><a href="Javascript:top.oxid.admin.editThis('{{ listitem.getId() }}');" class="{{ listclass }}">{{ listitem.getFieldData('oxmodule') }}</a></div></td>
<td style="vertical-align: top; height: 15px" class="{{ listclass }}"><div class="listitemfloating"><a href="Javascript:top.oxid.admin.editThis('{{ listitem.getId() }}');" class="{{ listclass }}">{{ listitem.getFieldData('oxtemplate') }}</a></div></td>
<td style="vertical-align: top; height: 15px" class="{{ listclass }}"><div class="listitemfloating"><a href="Javascript:top.oxid.admin.editThis('{{ listitem.getId() }}');" class="{{ listclass }}">{{ listitem.getFieldData('oxblockname') }}</a></div></td>
<td style="vertical-align: top; height: 15px" class="{{ listclass }}"><div class="listitemfloating"><a href="Javascript:top.oxid.admin.editThis('{{ listitem.getId() }}');" class="{{ listclass }}">{{ listitem.getFieldData('oxtheme') }}</a></div></td>
<td style="vertical-align: top; height: 15px" class="{{ listclass }}"><div class="listitemfloating"><a href="Javascript:top.oxid.admin.editThis('{{ listitem.getId() }}');" class="{{ listclass }}">{{ listitem.getFieldData('oxpos') }}</a></div></td>
<td class="{{ listclass }}">
{% if not readonly %}
<a href="Javascript:top.oxid.admin.deleteThis('{{ listitem.getId() }}');" class="delete" id="del.{{ _cnt }}" {% include "help.html.twig" with {helpid: "item_delete"} %}></a>
{% endif %}
</td>
{% endblock %}
</tr>
{% if blWhite == "2" %}
{% set blWhite = "" %}
{% else %}
{% set blWhite = "2" %}
{% endif %}
{% endfor %}
{% include "pagenavisnippet.html.twig" with {colspan: "7"} %}
</table>
</form>
</div>
{% include "pagetabsnippet.html.twig" with {noOXIDCheck: "true"} %}
<script type="text/javascript">
if (parent.parent) {
parent.parent.sShopTitle = "{{ actshopobj.oxshops__oxname|addslashes|raw }}";
parent.parent.sMenuItem = "{{ "mxextensions"|translate|striptags }}";
parent.parent.sMenuSubItem = "{{ "d3mxtplblocks"|translate|striptags }}";
parent.parent.sWorkArea = "{{ _act }}";
parent.parent.setTitle();
}
</script>
</body>
</html>