<commit_before><#--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache 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://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

  <@section id="partyContentList">
      <#if partyContent?has_content>
        <@table type="data-list"> <#-- orig: class="basic-table" --> <#-- orig: cellspacing="0" -->
          <@tbody>
          <#list partyContent as pContent>
            <#assign content = pContent.getRelatedOne("Content", false)>
            <#assign contentType = content.getRelatedOne("ContentType", true)>
            <#assign mimeType = content.getRelatedOne("MimeType", true)!>
            <#assign status = content.getRelatedOne("StatusItem", true)!>
            <#assign pcType = pContent.getRelatedOne("PartyContentType", false)>
            <@tr>
              <#-- SCIPIO: for inter-app linking 
                  TODO: REVIEW: it might be sane to assume the default for pcntListEditInter to be true instead of false... -->
              <#assign pcntListEditUri>EditPartyContents?contentId=${pContent.contentId}&amp;partyId=${pContent.partyId}&amp;partyContentTypeId=${pContent.partyContentTypeId}&amp;fromDate=${pContent.fromDate}</#assign>
              <#if ((pcntListEditInter!parameters.pcntListEditInter!)?string) == "true">
                <#assign pcntListEditLink><@ofbizInterWebappUrl extLoginKey=true>/partymgr/control/${pcntListEditUri}</@ofbizInterWebappUrl></#assign>
              <#else>
                <#assign pcntListEditLink><@ofbizUrl>${pcntListEditUri}</@ofbizUrl></#assign>
              </#if>
              <@td class="button-col"><a href="${pcntListEditLink}">${content.contentId}</a></@td>
              <@td>${(pcType.get("description", locale))!}</@td>
              <@td>${content.contentName!}</@td>
              <#-- take too much space -->
              <#--<@td>${(contentType.get("description",locale))!}</@td>-->
              <#--<@td>${(mimeType.description)!}</@td>-->
              <@td>${(status.get("description",locale))!}</@td>
              <@td>${pContent.fromDate!}</@td>
              <@td class="button-col">
                <a href="<@ofbizUrl>img<#if (content.contentName?has_content)>/${content.contentName}</#if>?imgId=${(content.dataResourceId)!}</@ofbizUrl>" class="${styles.link_run_sys!} ${styles.action_view!}">${uiLabelMap.CommonView}</a>

                <#-- SCIPIO: WARN: for security reasons, we can currently only allow a view switch override here, not a full request URI 
                    - see also ContentList.ftl -->
                <#if !pcntListRemoveDonePage??>
                  <#assign pcntListRemoveDonePage = rawString(parameters.pcntListRemoveDonePage!)>
                  <#if pcntListRemoveDonePage?has_content>
                    <#assign pcntListRemoveDonePage = pcntListRemoveDonePage?replace("[^a-zA-Z0-9_-]+","")>
                  <#else>
                    <#assign pcntListRemoveDonePage = "viewprofile">
                  </#if>
                <#else>
                  <#assign pcntListRemoveDonePage = rawString(pcntListRemoveDonePage)>
                </#if>
                <#-- SCIPIO: TODO: WARN: this only removes the association, not the content itself! -->
                <form name="removePartyContent_${pContent_index}" method="post" action="<@ofbizUrl uri=("removePartyContent/"+pcntListRemoveDonePage) escapeAs='html'/>">
                  <input type="hidden" name="contentId" value="${pContent.contentId}" />
                  <input type="hidden" name="partyId" value="${pContent.partyId}" />
                  <input type="hidden" name="partyContentTypeId" value="${pContent.partyContentTypeId}" />
                  <input type="hidden" name="fromDate" value="${pContent.fromDate}" />
                  <a href="javascript:document.removePartyContent_${pContent_index}.submit()" class="${styles.link_run_sys!} ${styles.action_remove!}">${uiLabelMap.CommonRemove}</a>
                </form>
              </@td>
            </@tr>
          </#list>
          </@tbody>
        </@table>
      <#else>
        <@commonMsg type="result-norecord">${uiLabelMap.PartyNoContent}</@commonMsg>
      </#if>
  </@section><commit_msg>user: ContentList: support read-only<commit_after><#--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache 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://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

  <#assign pcntListReadOnly = (pcntListReadOnly!?string) == "true"><#-- SCIPIO -->
  <@section id="partyContentList">
      <#if partyContent?has_content>
        <@table type="data-list"> <#-- orig: class="basic-table" --> <#-- orig: cellspacing="0" -->
          <@tbody>
          <#list partyContent as pContent>
            <#assign content = pContent.getRelatedOne("Content", false)>
            <#assign contentType = content.getRelatedOne("ContentType", true)>
            <#assign mimeType = content.getRelatedOne("MimeType", true)!>
            <#assign status = content.getRelatedOne("StatusItem", true)!>
            <#assign pcType = pContent.getRelatedOne("PartyContentType", false)>
            <@tr>
              <#-- SCIPIO: for inter-app linking 
                  TODO: REVIEW: it might be sane to assume the default for pcntListEditInter to be true instead of false... -->
              <#assign pcntListEditUri>EditPartyContents?contentId=${pContent.contentId}&amp;partyId=${pContent.partyId}&amp;partyContentTypeId=${pContent.partyContentTypeId}&amp;fromDate=${pContent.fromDate}</#assign>
              <#if ((pcntListEditInter!parameters.pcntListEditInter!)?string) == "true">
                <#assign pcntListEditLink><@ofbizInterWebappUrl extLoginKey=true>/partymgr/control/${pcntListEditUri}</@ofbizInterWebappUrl></#assign>
              <#else>
                <#assign pcntListEditLink><@ofbizUrl>${pcntListEditUri}</@ofbizUrl></#assign>
              </#if>
              <@td class="button-col"><a href="${pcntListEditLink}">${content.contentId}</a></@td>
              <@td>${(pcType.get("description", locale))!}</@td>
              <@td>${content.contentName!}</@td>
              <#-- take too much space -->
              <#--<@td>${(contentType.get("description",locale))!}</@td>-->
              <#--<@td>${(mimeType.description)!}</@td>-->
              <@td>${(status.get("description",locale))!}</@td>
              <@td>${pContent.fromDate!}</@td>
              <@td class="button-col">
                <a href="<@ofbizUrl>img<#if (content.contentName?has_content)>/${content.contentName}</#if>?imgId=${(content.dataResourceId)!}</@ofbizUrl>" class="${styles.link_run_sys!} ${styles.action_view!}">${uiLabelMap.CommonView}</a>
              
              <#if !pcntListReadOnly>
                <#-- SCIPIO: WARN: for security reasons, we can currently only allow a view switch override here, not a full request URI 
                    - see also ContentList.ftl -->
                <#if !pcntListRemoveDonePage??>
                  <#assign pcntListRemoveDonePage = rawString(parameters.pcntListRemoveDonePage!)>
                  <#if pcntListRemoveDonePage?has_content>
                    <#assign pcntListRemoveDonePage = pcntListRemoveDonePage?replace("[^a-zA-Z0-9_-]+","")>
                  <#else>
                    <#assign pcntListRemoveDonePage = "viewprofile">
                  </#if>
                <#else>
                  <#assign pcntListRemoveDonePage = rawString(pcntListRemoveDonePage)>
                </#if>
                <#-- SCIPIO: TODO: WARN: this only removes the association, not the content itself! -->
                <form name="removePartyContent_${pContent_index}" method="post" action="<@ofbizUrl uri=("removePartyContent/"+pcntListRemoveDonePage) escapeAs='html'/>">
                  <input type="hidden" name="contentId" value="${pContent.contentId}" />
                  <input type="hidden" name="partyId" value="${pContent.partyId}" />
                  <input type="hidden" name="partyContentTypeId" value="${pContent.partyContentTypeId}" />
                  <input type="hidden" name="fromDate" value="${pContent.fromDate}" />
                  <a href="javascript:document.removePartyContent_${pContent_index}.submit()" class="${styles.link_run_sys!} ${styles.action_remove!}">${uiLabelMap.CommonRemove}</a>
                </form>
              </#if>
              
              </@td>
            </@tr>
          </#list>
          </@tbody>
        </@table>
      <#else>
        <@commonMsg type="result-norecord">${uiLabelMap.PartyNoContent}</@commonMsg>
      </#if>
  </@section>
{'fraction_non_alphanumeric': 0.14909239241280847, 'fraction_numerical': 0.0014276973281664286, 'mean_word_length': 2.7459893048128343, 'pattern_counts': {'":': 0, '<': 177, '<?xml version=': 0, '>': 177, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3957536', 'n_tokens_mistral': 2853, 'n_tokens_neox': 2724, 'n_words': 602}