File:  [Repository] / kupuMPIWG / plone / kupu_config.pt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Aug 30 17:10:22 2005 UTC (18 years, 8 months ago) by dwinter
Branches: first, MAIN
CVS tags: alpha, HEAD


<metal:page define-macro="master"
  ><metal:master use-macro="here/main_template/macros/master"
    >

<metal:block metal:fill-slot="top_slot" define-slot="top_slot"
             tal:define="dummy python:request.set('disable_border',1)" />

<metal:fillbase fill-slot="base">
  <metal:baseslot define-slot="base">
    <base href="" tal:attributes="href template/absolute_url" />
  </metal:baseslot>
</metal:fillbase>

    <metal:cssslot fill-slot="css_slot">
      <!-- A slot where you can insert CSS in the header from a template -->
      <metal:cssslot define-slot="css_slot" />
    </metal:cssslot>

    <metal:override fill-slot="portlets_one_slot">
      <metal:prefs use-macro="here/portlet_prefs/macros/portlet" />
    </metal:override>

    <metal:override fill-slot="column_two_slot" />

<body>
<div metal:fill-slot="main" metal:define-slot="prefs_configlet_main"
    tal:define="errors python:request.get('errors', {});">

<div class="configlet">

<div class="documentEditable">

    <!-- simulating views -->
    <ul class="contentViews"
       tal:define="tabs python:('Config','kupu_config'),('Libraries','zmi_libraries'),('Resource Types','zmi_resource_types'),
        ('Documentation', 'zmi_docs'),;
                   tabs python:[ {'label':label, 'name':name} for (label,name) in tabs ];"
    >
        <li tal:repeat="tab tabs"
                class="selected" tal:attributes="class python:template.pt_source_file()==tab['name'] and 'selected' or ''">
        <a href=""
        tal:attributes="href string:${here/absolute_url}/${tab/name}"
        i18n:translate="" tal:content="tab/label">Config</a>
        </li>
    </ul>

    <div class="contentActions">
    &nbsp;
    </div>        
    <!-- End of tabs -->
    <div class="documentContent" metal:define-slot="kupu_content">
<h3>Kupu Configuration</h3>
<form action=""
    name="configure_kupu"
    method="post"
    tal:attributes="action here/absolute_url">

<fieldset>
<legend>Link options</legend>
<div class="field">
<input type="hidden" name="linkbyuid:int:default" value="0" />
<input type="checkbox"
    class="noborder"
    name="linkbyuid:int"
    id = "kupu_linkbyuid"
    value="1"
    tal:attributes="checked here/getLinkbyuid" />
<label for="kupu_linkbyuid">Link using UIDs</label>

<div class="formHelp">Links to objects on this site created by Kupu can use unique
object ids so that the links remain valid even if the target object is
renamed or moved elsewhere on the site.</div>
</div>

</fieldset>
<fieldset>
<legend>Warn before losing changes</legend>
<div class="field">
<input type="hidden" name="installBeforeUnload:int:default" value="0" />
<input type="checkbox"
    class="noborder"
    name="installBeforeUnload:int"
    id = "kupu_installBeforeUnload"
    value="1"
    tal:attributes="checked here/installBeforeUnload|python:1" />
<label for="kupu_installBeforeUnload">Install Kupu code to detect form changes</label>

<div class="formHelp">Kupu can install a handler to warn before navigating
away from a page where a form (even the non-Kupu fields) has been edited.
Turn this off to prevent Kupu loading its own handler.
</div>
</div>

</fieldset>
<fieldset>
<legend>Styles</legend>
<div class="field">
<label for="table_classnames">Tables</label>
<div class="formHelp">Enter a list of class names to be made available in the table drawer</div>
<input type="hidden" name="table_classnames:list:default" value=" " />

<textarea name="table_classnames:lines" id="table_classnames"
         rows="5" cols="30"
         tal:content="python:'\n'.join(here.getTableClassnames())">
</textarea>
</div>

<div class="field">
<label for="parastyles">Paragraph Styles</label>
<div class="formHelp">Enter a list of paragraph styles to appear in the style pulldown. Format is title|tag or title|tag|className, one per line.</div>
<input type="hidden" name="parastyles:list:default" value=" " />
<textarea name="parastyles:lines" id="parastyles"
         rows="5" cols="30"
         tal:content="python:'\n'.join(here.getParagraphStyles())">
</textarea>
</div>
</fieldset>

<fieldset>
<legend>HTML Filter</legend>

<table>
  <tr>
    <td></td>
    <th>Tags</th>
    <th>Attributes</th>
  </tr>

  <tr>
    <td></td>
    <td colspan="2">
      <div class="formHelp">Enter HTML tags and attributes to be removed when saving documents. (Uncheck to remove entries)</div>
    </td>
  </tr>
  
  <tr tal:repeat="exclusion_tuple here/getHtmlExclusions">
    <tal:with define="tags python:exclusion_tuple[0];
                      attributes python:exclusion_tuple[1]">
    <td valign="top">
      <input type="hidden" name="html_exclusions.recordmark:records" value="1" />
      <input type="checkbox" name="html_exclusions.keep:records" checked="1"
             tal:attributes="value python:1;" />
      <input type="hidden" name="html_exclusions.tags:records:list"
             tal:repeat="tag tags"
             tal:attributes="value tag" />
      <input type="hidden" name="html_exclusions.attributes:records:list"
             tal:repeat="attr attributes"
             tal:attributes="value attr" />
    </td>

    <td valign="top"><div tal:replace="python:', '.join(tags)"></div>
        <em tal:condition="not:tags">Any tag</em>
    </td>
    <td valign="top"><div tal:replace="python:', '.join(attributes)"></div>
        <em tal:condition="not:attributes">Whole tag removed</em>
    </td>

    </tal:with>
  </tr>
  <tr>
    <td valign="top">
      <input type="checkbox" name="html_exclusions.keep:records" checked="1" disabled="1"
             tal:attributes="value python:1;" />
    </td>
    <td valign="top">
      <textarea name="html_exclusions.tags:records"
                rows="5" cols="30"></textarea>
    </td>

    <td valign="top">
      <textarea name="html_exclusions.attributes:records"
                rows="5" cols="30"></textarea>
    </td>
  </tr>

<tr>
    <td></td>
    <th colspan="2">Style Whitelist</th></tr>
<tr>
    <td></td>
    <td colspan="2">
      <div class="formHelp">Enter a list of style elements to be permitted (one per line)</div>

      <textarea name="style_whitelist:lines"
               rows="5" cols="60"
               tal:content="python:'\n'.join(here.getStyleWhitelist())">
      </textarea>
    </td>
</tr>

<tr>
    <td></td>
    <th colspan="2">Class Blacklist</th>
</tr>
<tr>
    <td></td>
    <td colspan="2">
      <div class="formHelp">Enter a list of classnames to be excluded (one per line)</div>

      <textarea name="class_blacklist:lines"
               rows="5" cols="60"
               tal:content="python:'\n'.join(here.getClassBlacklist())">
      </textarea>
    </td>
</tr>
</table>
</fieldset>

<input class="context"
        tabindex=""
        type="submit"
        name="configure_kupu:method"
        value="Save"
        i18n:attributes="value"
        tal:attributes="tabindex tabindex|nothing;"
        />
</form>
    </div>

</div>

</div>

</div>

</body>
  </metal:master>
</metal:page>


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>