Annotation of kupuMPIWG/plone/kupu_config.pt, revision 1.1.1.1

1.1       dwinter     1: <metal:page define-macro="master"
                      2:   ><metal:master use-macro="here/main_template/macros/master"
                      3:     >
                      4: 
                      5: <metal:block metal:fill-slot="top_slot" define-slot="top_slot"
                      6:              tal:define="dummy python:request.set('disable_border',1)" />
                      7: 
                      8: <metal:fillbase fill-slot="base">
                      9:   <metal:baseslot define-slot="base">
                     10:     <base href="" tal:attributes="href template/absolute_url" />
                     11:   </metal:baseslot>
                     12: </metal:fillbase>
                     13: 
                     14:     <metal:cssslot fill-slot="css_slot">
                     15:       <!-- A slot where you can insert CSS in the header from a template -->
                     16:       <metal:cssslot define-slot="css_slot" />
                     17:     </metal:cssslot>
                     18: 
                     19:     <metal:override fill-slot="portlets_one_slot">
                     20:       <metal:prefs use-macro="here/portlet_prefs/macros/portlet" />
                     21:     </metal:override>
                     22: 
                     23:     <metal:override fill-slot="column_two_slot" />
                     24: 
                     25: <body>
                     26: <div metal:fill-slot="main" metal:define-slot="prefs_configlet_main"
                     27:     tal:define="errors python:request.get('errors', {});">
                     28: 
                     29: <div class="configlet">
                     30: 
                     31: <div class="documentEditable">
                     32: 
                     33:     <!-- simulating views -->
                     34:     <ul class="contentViews"
                     35:        tal:define="tabs python:('Config','kupu_config'),('Libraries','zmi_libraries'),('Resource Types','zmi_resource_types'),
                     36:         ('Documentation', 'zmi_docs'),;
                     37:                    tabs python:[ {'label':label, 'name':name} for (label,name) in tabs ];"
                     38:     >
                     39:         <li tal:repeat="tab tabs"
                     40:                 class="selected" tal:attributes="class python:template.pt_source_file()==tab['name'] and 'selected' or ''">
                     41:         <a href=""
                     42:         tal:attributes="href string:${here/absolute_url}/${tab/name}"
                     43:         i18n:translate="" tal:content="tab/label">Config</a>
                     44:         </li>
                     45:     </ul>
                     46: 
                     47:     <div class="contentActions">
                     48:     &nbsp;
                     49:     </div>        
                     50:     <!-- End of tabs -->
                     51:     <div class="documentContent" metal:define-slot="kupu_content">
                     52: <h3>Kupu Configuration</h3>
                     53: <form action=""
                     54:     name="configure_kupu"
                     55:     method="post"
                     56:     tal:attributes="action here/absolute_url">
                     57: 
                     58: <fieldset>
                     59: <legend>Link options</legend>
                     60: <div class="field">
                     61: <input type="hidden" name="linkbyuid:int:default" value="0" />
                     62: <input type="checkbox"
                     63:     class="noborder"
                     64:     name="linkbyuid:int"
                     65:     id = "kupu_linkbyuid"
                     66:     value="1"
                     67:     tal:attributes="checked here/getLinkbyuid" />
                     68: <label for="kupu_linkbyuid">Link using UIDs</label>
                     69: 
                     70: <div class="formHelp">Links to objects on this site created by Kupu can use unique
                     71: object ids so that the links remain valid even if the target object is
                     72: renamed or moved elsewhere on the site.</div>
                     73: </div>
                     74: 
                     75: </fieldset>
                     76: <fieldset>
                     77: <legend>Warn before losing changes</legend>
                     78: <div class="field">
                     79: <input type="hidden" name="installBeforeUnload:int:default" value="0" />
                     80: <input type="checkbox"
                     81:     class="noborder"
                     82:     name="installBeforeUnload:int"
                     83:     id = "kupu_installBeforeUnload"
                     84:     value="1"
                     85:     tal:attributes="checked here/installBeforeUnload|python:1" />
                     86: <label for="kupu_installBeforeUnload">Install Kupu code to detect form changes</label>
                     87: 
                     88: <div class="formHelp">Kupu can install a handler to warn before navigating
                     89: away from a page where a form (even the non-Kupu fields) has been edited.
                     90: Turn this off to prevent Kupu loading its own handler.
                     91: </div>
                     92: </div>
                     93: 
                     94: </fieldset>
                     95: <fieldset>
                     96: <legend>Styles</legend>
                     97: <div class="field">
                     98: <label for="table_classnames">Tables</label>
                     99: <div class="formHelp">Enter a list of class names to be made available in the table drawer</div>
                    100: <input type="hidden" name="table_classnames:list:default" value=" " />
                    101: 
                    102: <textarea name="table_classnames:lines" id="table_classnames"
                    103:          rows="5" cols="30"
                    104:          tal:content="python:'\n'.join(here.getTableClassnames())">
                    105: </textarea>
                    106: </div>
                    107: 
                    108: <div class="field">
                    109: <label for="parastyles">Paragraph Styles</label>
                    110: <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>
                    111: <input type="hidden" name="parastyles:list:default" value=" " />
                    112: <textarea name="parastyles:lines" id="parastyles"
                    113:          rows="5" cols="30"
                    114:          tal:content="python:'\n'.join(here.getParagraphStyles())">
                    115: </textarea>
                    116: </div>
                    117: </fieldset>
                    118: 
                    119: <fieldset>
                    120: <legend>HTML Filter</legend>
                    121: 
                    122: <table>
                    123:   <tr>
                    124:     <td></td>
                    125:     <th>Tags</th>
                    126:     <th>Attributes</th>
                    127:   </tr>
                    128: 
                    129:   <tr>
                    130:     <td></td>
                    131:     <td colspan="2">
                    132:       <div class="formHelp">Enter HTML tags and attributes to be removed when saving documents. (Uncheck to remove entries)</div>
                    133:     </td>
                    134:   </tr>
                    135:   
                    136:   <tr tal:repeat="exclusion_tuple here/getHtmlExclusions">
                    137:     <tal:with define="tags python:exclusion_tuple[0];
                    138:                       attributes python:exclusion_tuple[1]">
                    139:     <td valign="top">
                    140:       <input type="hidden" name="html_exclusions.recordmark:records" value="1" />
                    141:       <input type="checkbox" name="html_exclusions.keep:records" checked="1"
                    142:              tal:attributes="value python:1;" />
                    143:       <input type="hidden" name="html_exclusions.tags:records:list"
                    144:              tal:repeat="tag tags"
                    145:              tal:attributes="value tag" />
                    146:       <input type="hidden" name="html_exclusions.attributes:records:list"
                    147:              tal:repeat="attr attributes"
                    148:              tal:attributes="value attr" />
                    149:     </td>
                    150: 
                    151:     <td valign="top"><div tal:replace="python:', '.join(tags)"></div>
                    152:         <em tal:condition="not:tags">Any tag</em>
                    153:     </td>
                    154:     <td valign="top"><div tal:replace="python:', '.join(attributes)"></div>
                    155:         <em tal:condition="not:attributes">Whole tag removed</em>
                    156:     </td>
                    157: 
                    158:     </tal:with>
                    159:   </tr>
                    160:   <tr>
                    161:     <td valign="top">
                    162:       <input type="checkbox" name="html_exclusions.keep:records" checked="1" disabled="1"
                    163:              tal:attributes="value python:1;" />
                    164:     </td>
                    165:     <td valign="top">
                    166:       <textarea name="html_exclusions.tags:records"
                    167:                 rows="5" cols="30"></textarea>
                    168:     </td>
                    169: 
                    170:     <td valign="top">
                    171:       <textarea name="html_exclusions.attributes:records"
                    172:                 rows="5" cols="30"></textarea>
                    173:     </td>
                    174:   </tr>
                    175: 
                    176: <tr>
                    177:     <td></td>
                    178:     <th colspan="2">Style Whitelist</th></tr>
                    179: <tr>
                    180:     <td></td>
                    181:     <td colspan="2">
                    182:       <div class="formHelp">Enter a list of style elements to be permitted (one per line)</div>
                    183: 
                    184:       <textarea name="style_whitelist:lines"
                    185:                rows="5" cols="60"
                    186:                tal:content="python:'\n'.join(here.getStyleWhitelist())">
                    187:       </textarea>
                    188:     </td>
                    189: </tr>
                    190: 
                    191: <tr>
                    192:     <td></td>
                    193:     <th colspan="2">Class Blacklist</th>
                    194: </tr>
                    195: <tr>
                    196:     <td></td>
                    197:     <td colspan="2">
                    198:       <div class="formHelp">Enter a list of classnames to be excluded (one per line)</div>
                    199: 
                    200:       <textarea name="class_blacklist:lines"
                    201:                rows="5" cols="60"
                    202:                tal:content="python:'\n'.join(here.getClassBlacklist())">
                    203:       </textarea>
                    204:     </td>
                    205: </tr>
                    206: </table>
                    207: </fieldset>
                    208: 
                    209: <input class="context"
                    210:         tabindex=""
                    211:         type="submit"
                    212:         name="configure_kupu:method"
                    213:         value="Save"
                    214:         i18n:attributes="value"
                    215:         tal:attributes="tabindex tabindex|nothing;"
                    216:         />
                    217: </form>
                    218:     </div>
                    219: 
                    220: </div>
                    221: 
                    222: </div>
                    223: 
                    224: </div>
                    225: 
                    226: </body>
                    227:   </metal:master>
                    228: </metal:page>
                    229: 

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