272 lines
14 KiB
Twig
272 lines
14 KiB
Twig
|
{% include "headitem.html.twig" with {title: "d3mxcfg"|translate, box: "list"} %}
|
||
|
{% set where = oView.getListFilter() %}
|
||
|
|
||
|
{% if readonly %}
|
||
|
{% set readonly = "readonly disabled" %}
|
||
|
{% else %}
|
||
|
{% set readonly = "" %}
|
||
|
{% endif %}
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
<!--
|
||
|
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();
|
||
|
}
|
||
|
|
||
|
function DeleteThis( sID)
|
||
|
{
|
||
|
let blCheck;
|
||
|
blCheck = confirm("{{ translate({ ident: "GENERAL_YOUWANTTODELETE" }) }}");
|
||
|
if( blCheck === true)
|
||
|
{
|
||
|
let oSearch = document.getElementById("search");
|
||
|
oSearch.oxid.value=sID;
|
||
|
oSearch.fnc.value='deleteentry';
|
||
|
oSearch.actedit.value=0;
|
||
|
oSearch.submit();
|
||
|
|
||
|
let oTransfer = parent.edit.document.getElementById("transfer");
|
||
|
oTransfer.oxid.value='-1';
|
||
|
oTransfer.cl.value='{{ default_edit|escape("js") }}';
|
||
|
|
||
|
//forcing edit frame to reload after submit
|
||
|
top.forceReloadingEditFrame();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function ChangeEditBar( sLocation, sPos)
|
||
|
{
|
||
|
let oSearch = document.getElementById("search");
|
||
|
oSearch.actedit.value=sPos;
|
||
|
oSearch.submit();
|
||
|
|
||
|
let oTransfer = parent.edit.document.getElementById("transfer");
|
||
|
oTransfer.cl.value=sLocation;
|
||
|
|
||
|
//forcing edit frame to reload after submit
|
||
|
top.forceReloadingEditFrame();
|
||
|
}
|
||
|
|
||
|
function ChangeLanguage()
|
||
|
{
|
||
|
let oSearch = document.getElementById("search");
|
||
|
oSearch.language.value=oSearch.changelang.value;
|
||
|
oSearch.editlanguage.value=oSearch.changelang.value;
|
||
|
oSearch.submit();
|
||
|
|
||
|
let oTransfer = parent.edit.document.getElementById("transfer");
|
||
|
oTransfer.innerHTML += '<input type="hidden" name="language" value="'+oSearch.changelang.value+'">';
|
||
|
oTransfer.innerHTML += '<input type="hidden" name="editlanguage" value="'+oSearch.changelang.value+'">';
|
||
|
|
||
|
//forcing edit frame to reload after submit
|
||
|
top.forceReloadingEditFrame();
|
||
|
}
|
||
|
|
||
|
window.onLoad = top.reloadEditFrame();
|
||
|
-->
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
<!--
|
||
|
.d3notallowed,
|
||
|
.d3notallowed a {
|
||
|
color: silver;
|
||
|
}
|
||
|
-->
|
||
|
</style>
|
||
|
|
||
|
{% if oView.d3getShowListItems() %}
|
||
|
|
||
|
<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="border: none; padding: 0; border-spacing: 0; border-collapse: collapse; width: 100%">
|
||
|
<colgroup>
|
||
|
{% block admin_d3modprofile_list_colgroup %}
|
||
|
<col style="width: 3%">
|
||
|
<col style="width: 15%">
|
||
|
<col style="width: 47%">
|
||
|
<col style="width: 20%">
|
||
|
<col style="width: 15%">
|
||
|
{% endblock %}
|
||
|
</colgroup>
|
||
|
<tr class="listitem">
|
||
|
{% block admin_d3modprofile_list_filter %}
|
||
|
<td style="height: 20px; vertical-align: middle" class="listfilter first" nowrap>
|
||
|
<div class="r1"><div class="b1"> </div></div>
|
||
|
</td>
|
||
|
<td style="height: 20px; vertical-align: middle" class="listfilter" nowrap>
|
||
|
<div class="r1">
|
||
|
<div class="b1">
|
||
|
TODO: fix dynamic variables in base_list.html.twig
|
||
|
{{ _context['where.' ~ listTable ~ '.oxsort'] }}
|
||
|
{#
|
||
|
<input class="listedit" type="text" size="10" maxlength="128" name="where[{{ listTable }}][oxsort]" value="{{ where.$listTable.oxsort|raw }}"
|
||
|
{% include "help.html.twig" with {helpid: "searchfieldoxdynamic"} %}>
|
||
|
#}
|
||
|
</div>
|
||
|
</div>
|
||
|
</td>
|
||
|
<td style="vertical-align: top" class="listfilter" nowrap>
|
||
|
<div class="r1">
|
||
|
<div class="b1">
|
||
|
{#
|
||
|
<input class="listedit" type="text" size="25" maxlength="128" name="where[{{ listTable }}][oxtitle]" value="{{ where.$listTable.oxtitle|raw }}"
|
||
|
{% include "help.html.twig" with {helpid: "searchfieldoxdynamic"} %}>
|
||
|
#}
|
||
|
</div>
|
||
|
</div>
|
||
|
</td>
|
||
|
<td style="height: 20px; vertical-align: middle" colspan="2" class="listfilter" nowrap>
|
||
|
<div class="r1">
|
||
|
<div class="b1">
|
||
|
<div class="find">
|
||
|
{% if blShowLangSwitch %}
|
||
|
<select name="changelang" class="editinput" onChange="ChangeLanguage();">
|
||
|
{% for lang in languages %}
|
||
|
<option value="{{ lang.id }}" {% if lang.selected %}SELECTED{% endif %}>{{ lang.name }}</option>
|
||
|
{% endfor %}
|
||
|
</select>
|
||
|
{% endif %}
|
||
|
<input class="listedit" type="submit" name="submitit" value="{{ translate({ ident: "GENERAL_SEARCH" }) }}" onClick="document.search.lstrt.value=0;">
|
||
|
</div>
|
||
|
|
||
|
<select name="folder" class="folderselect" onChange="document.search.submit();" {% include "help.html.twig" with {helpid: "searchfieldoxdynamic"} %}>
|
||
|
{% for sMLIdent, sTranslation in oView.getSelectableFolderList() %}
|
||
|
<option value="{{ sMLIdent }}" {% if sMLIdent == folder %}SELECTED{% endif %}>{{ sTranslation }}</option>
|
||
|
{% endfor %}
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
</td>
|
||
|
{% endblock %}
|
||
|
</tr>
|
||
|
<tr>
|
||
|
{% block admin_d3modprofile_list_sorting %}
|
||
|
<td class="listheader first" height="15">
|
||
|
<a href="Javascript:top.oxid.admin.setSorting( document.search, '{{ listTable }}', 'oxactive', 'asc');document.search.submit();" class="listheader">
|
||
|
{{ translate({ ident: "GENERAL_ACTIVTITLE" }) }}
|
||
|
</a>
|
||
|
</td>
|
||
|
<td class="listheader" height="15">
|
||
|
<a href="Javascript:top.oxid.admin.setSorting( document.search, '{{ listTable }}', 'oxsort', 'asc');document.search.submit();" class="listheader">
|
||
|
{{ translate({ ident: "D3_GENERAL_MODPROFILE_SORT" }) }}
|
||
|
</a>
|
||
|
</td>
|
||
|
<td class="listheader">
|
||
|
<a href="Javascript:top.oxid.admin.setSorting( document.search, '{{ listTable }}', 'oxtitle', 'asc');document.search.submit();" class="listheader">
|
||
|
{{ translate({ ident: "D3_GENERAL_MODPROFILE_TITLE" }) }}
|
||
|
</a>
|
||
|
</td>
|
||
|
<td class="listheader" colspan="2">
|
||
|
<a href="Javascript:top.oxid.admin.setSorting( document.search, '{{ listTable }}', 'oxfolder', 'asc');document.search.submit();" class="listheader">
|
||
|
{{ translate({ ident: "D3_GENERAL_MODPROFILE_FOLDER" }) }}
|
||
|
</a>
|
||
|
</td>
|
||
|
{% endblock %}
|
||
|
</tr>
|
||
|
|
||
|
{% set blWhite = "" %}
|
||
|
{% set _cnt = 0 %}
|
||
|
{% for listitem in mylist %}
|
||
|
{% set _cnt = _cnt+1 %}
|
||
|
{% if listitem.getLicenseActive() %}
|
||
|
{% set formatclass = "" %}
|
||
|
{% else %}
|
||
|
{% set formatclass = "d3notallowed" %}
|
||
|
{% endif %}
|
||
|
<tr id="row.{{ _cnt }}">
|
||
|
{% block admin_d3modprofile_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 }} {{ formatclass }} {% if listitem.getFieldData('oxactive') == 1 %} active{% endif %}">
|
||
|
<div class="listitemfloating">
|
||
|
|
||
|
</div>
|
||
|
</td>
|
||
|
<td style="vertical-align: top; height: 15px" class="{{ listclass }} {{ formatclass }} ">
|
||
|
<div class="listitemfloating">
|
||
|
<a href="Javascript:EditThis('{{ listitem.getId() }}');" class="{{ listclass }}">
|
||
|
{{ listitem.getFieldData('oxsort') }}
|
||
|
</a>
|
||
|
</div>
|
||
|
</td>
|
||
|
<td style="vertical-align: top; height: 15px" class="{{ listclass }} {{ formatclass }} ">
|
||
|
<div class="listitemfloating">
|
||
|
<a href="Javascript:EditThis('{{ listitem.getId() }}');" class="{{ listclass }}">
|
||
|
{{ listitem.getFieldData('oxtitle')|truncate(200, "..", false) }}
|
||
|
</a>
|
||
|
</div>
|
||
|
</td>
|
||
|
<td style="vertical-align: top; height: 15px" class="{{ listclass }} {{ formatclass }} ">
|
||
|
<div class="listitemfloating">
|
||
|
<a href="Javascript:EditThis('{{ listitem.getId() }}');" class="{{ listclass }}">
|
||
|
{% if listitem.getFieldData('oxfolder') %}{{ translate({ ident: listitem.getFieldData('oxfolder') }) }}{% endif %}
|
||
|
</a>
|
||
|
</div>
|
||
|
</td>
|
||
|
<td class="{{ listclass }} {{ formatclass }} ">
|
||
|
{% if not readonly %}
|
||
|
<a href="Javascript:DeleteThis('{{ listitem.getId() }}');" class="delete" id="del.{{ _cnt }}" title="" {% 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: "5"} %}
|
||
|
</table>
|
||
|
</form>
|
||
|
</div>
|
||
|
|
||
|
{% else %}
|
||
|
<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} %}
|
||
|
|
||
|
{% if blShowLangSwitch %}
|
||
|
<label for="changelang">{{ translate({ ident: "D3_CFG_MOD_LIST_SETTLANG" }) }}</label>
|
||
|
<select id="changelang" name="changelang" class="editinput" onChange="top.oxid.admin.changeLanguage();">
|
||
|
{% for lang in languages %}
|
||
|
<option value="{{ lang.id }}" {% if lang.selected %}SELECTED{% endif %}>{{ lang.name }}</option>
|
||
|
{% endfor %}
|
||
|
</select>
|
||
|
{% endif %}
|
||
|
</form>
|
||
|
{% endif %}
|
||
|
|
||
|
{% include "pagetabsnippet.html.twig" %}
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
{% set rawMenuItemTitle = oView.d3GetMenuItemTitle() %}
|
||
|
{% set rawMenuSubItemTitle = oView.d3GetMenuSubItemTitle() %}
|
||
|
if (parent.parent) {
|
||
|
parent.parent.sShopTitle = "{{ actshopobj.oxshops__oxname.getRawValue()|addslashes }}";
|
||
|
parent.parent.sMenuItem = "{{ rawMenuItemTitle|translate|striptags }}";
|
||
|
parent.parent.sMenuSubItem = "{{ rawMenuSubItemTitle|translate|striptags }}";
|
||
|
parent.parent.sWorkArea = "{{ _act }}";
|
||
|
parent.parent.setTitle();
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|