[1] | 1 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" |
---|
| 2 | lang="en" |
---|
| 3 | metal:use-macro="here/prefs_main_template/macros/master" |
---|
| 4 | i18n:domain="plone"> |
---|
| 5 | |
---|
| 6 | <metal:block fill-slot="top_slot" |
---|
| 7 | tal:define="dummy python:request.set('disable_border',1)" /> |
---|
| 8 | |
---|
| 9 | <body> |
---|
| 10 | |
---|
| 11 | <div metal:fill-slot="prefs_configlet_main" |
---|
| 12 | tal:define="errors python:request.get('errors', {}); |
---|
| 13 | props python:here.portal_properties;"> |
---|
| 14 | |
---|
| 15 | <div class="configlet"> |
---|
| 16 | |
---|
| 17 | <div class="documentEditable"> |
---|
| 18 | |
---|
| 19 | <!-- simulating views on the topics pages until we have real objects. --> |
---|
| 20 | <ul class="contentViews" |
---|
| 21 | i18n:domain="atcontenttypes"> |
---|
| 22 | <li class=""> |
---|
| 23 | <a href="" |
---|
| 24 | tal:attributes="href string:${here/absolute_url}/atct_manageTopicIndex" |
---|
| 25 | i18n:translate="label_topic_indexes">Smart Folder Indexes</a> |
---|
| 26 | </li> |
---|
| 27 | |
---|
| 28 | <li class="selected"> |
---|
| 29 | <a href="" |
---|
| 30 | tal:attributes="href string:${here/absolute_url}/${template/id}" |
---|
| 31 | i18n:translate="label_topic_metadata">Smart Folder Metadata</a> |
---|
| 32 | </li> |
---|
| 33 | </ul> |
---|
| 34 | |
---|
| 35 | <div class="contentActions"> |
---|
| 36 | |
---|
| 37 | </div> |
---|
| 38 | |
---|
| 39 | <!-- End of tabs --> |
---|
| 40 | |
---|
| 41 | <div class="documentContent"> |
---|
| 42 | |
---|
| 43 | <h1 i18n:domain="atcontenttypes" |
---|
| 44 | i18n:translate="heading_smart_folder_settings"> |
---|
| 45 | Smart Folder Settings |
---|
| 46 | </h1> |
---|
| 47 | |
---|
| 48 | <a href="" |
---|
| 49 | class="link-parent" |
---|
| 50 | tal:attributes="href string: $portal_url/plone_control_panel" |
---|
| 51 | i18n:translate="label_up_to_plone_setup"> |
---|
| 52 | Up to Site Setup |
---|
| 53 | </a> |
---|
| 54 | |
---|
| 55 | <p i18n:domain="atcontenttypes" |
---|
| 56 | i18n:translate="description_configure_available_metadata"> |
---|
| 57 | Configure which metadata will be available for Smart Folder views. |
---|
| 58 | </p> |
---|
| 59 | |
---|
| 60 | <form method="post" |
---|
| 61 | name="manageTopicMetadata" |
---|
| 62 | i18n:domain="atcontenttypes" |
---|
| 63 | tal:define="errors options/state/getErrors; |
---|
| 64 | atct_tool here/portal_atct; |
---|
| 65 | all_types atct_tool/getAllPortalTypes; |
---|
| 66 | allowed_types python:atct_tool.getAllowedPortalTypes(populate_for_end_usage=0); |
---|
| 67 | allowed_ids python:[a[0] for a in allowed_types]; |
---|
| 68 | catalog python:request.get('catalog','portal_catalog')" |
---|
| 69 | tal:attributes="action python:here.absolute_url()+'/'+template.id"> |
---|
| 70 | |
---|
| 71 | <input type="hidden" name="form.submitted" value="1" /> |
---|
| 72 | <input type="hidden" name="sub" value="1" /> |
---|
| 73 | <!--<input type="hidden" name="catalog" value="portal_catalog" |
---|
| 74 | tal:attributes="value python:catalog" />--> |
---|
| 75 | |
---|
| 76 | <tal:indices tal:define="enabledOnly python:request.get('showEnabledOnly',True); |
---|
| 77 | indexes python:atct_tool.getIndexes(enabledOnly=enabledOnly,catalog_name=catalog); |
---|
| 78 | metadata python:atct_tool.getAllMetadata(enabledOnly=enabledOnly, catalog_name=catalog)"> |
---|
| 79 | |
---|
| 80 | <h3 i18n:translate="heading_metadata_fields_for_display"> |
---|
| 81 | Metadata (fields for display) |
---|
| 82 | </h3> |
---|
| 83 | <div> |
---|
| 84 | <select name="catalog"> |
---|
| 85 | <option tal:repeat="c here/archetype_tool/getCatalogsInSite" |
---|
| 86 | tal:attributes="value c; |
---|
| 87 | selected python:c == catalog" |
---|
| 88 | tal:content="c"/> |
---|
| 89 | |
---|
| 90 | </select> |
---|
| 91 | |
---|
| 92 | <input class="context" |
---|
| 93 | tabindex="" |
---|
| 94 | type="submit" |
---|
| 95 | name="form.button.Go" |
---|
| 96 | value="Go" |
---|
| 97 | i18n:domain="plone" |
---|
| 98 | i18n:attributes="value label_go" |
---|
| 99 | tal:attributes="tabindex tabindex/next;"/> |
---|
| 100 | </div> |
---|
| 101 | <div style="text-align:right"> |
---|
| 102 | <a href="" |
---|
| 103 | i18n:translate="atct_show_enabled_fields" |
---|
| 104 | tal:condition="not:enabledOnly" |
---|
| 105 | tal:attributes="href python:here.absolute_url() +'/'+ template.id + '?showEnabledOnly:int=1&catalog='+catalog"> |
---|
| 106 | Enabled fields only |
---|
| 107 | </a> |
---|
| 108 | <a href="" |
---|
| 109 | i18n:translate="atct_show_all_fields" |
---|
| 110 | tal:condition="enabledOnly" |
---|
| 111 | tal:attributes="href python:here.absolute_url() +'/'+ template.id + '?showEnabledOnly:int=0&catalog='+catalog"> |
---|
| 112 | All fields |
---|
| 113 | </a> |
---|
| 114 | </div> |
---|
| 115 | |
---|
| 116 | <table class="listing" border="0" cellpadding="0" cellspacing="0" style="" |
---|
| 117 | tal:define="bgcolor string:background-color:${here/base_properties/evenRowBackgroundColor}; |
---|
| 118 | border_color here/base_properties/globalBorderColor" |
---|
| 119 | tal:attributes="style string:border:1px solid ${border_color}" |
---|
| 120 | summary="Metadata configuration" i18n:attributes="summary summary_metadata_configuration;"> |
---|
| 121 | <thead> |
---|
| 122 | <tr> |
---|
| 123 | <th i18n:translate="listingheader_catalog_metadata">Catalog metadata</th> |
---|
| 124 | <th i18n:translate="listingheader_enable">Enable</th> |
---|
| 125 | <th i18n:translate="listingheader_friendly_name">Friendly name</th> |
---|
| 126 | <th i18n:translate="listingheader_explanation">Explanation</th> |
---|
| 127 | </tr> |
---|
| 128 | </thead> |
---|
| 129 | <tbody> |
---|
| 130 | <tal:indexes tal:repeat="index metadata"> |
---|
| 131 | <tal:object tal:define="indexObj python:atct_tool.getMetadata(index, catalog); |
---|
| 132 | oddrow repeat/index/odd;"> |
---|
| 133 | |
---|
| 134 | <tr class="" tal:attributes="class python:test(oddrow, 'even', 'odd')"> |
---|
| 135 | <td> |
---|
| 136 | <span tal:content="indexObj/index" i18n:translate="" i18n:domain="plone"/> |
---|
| 137 | <input type="hidden" |
---|
| 138 | value="" |
---|
| 139 | name="" |
---|
| 140 | id="" |
---|
| 141 | tal:attributes="id indexObj/index; |
---|
| 142 | name string:metadata.index:records; |
---|
| 143 | value indexObj/index"/> |
---|
| 144 | </td> |
---|
| 145 | <td> |
---|
| 146 | <input type="checkbox" |
---|
| 147 | value="" |
---|
| 148 | name="" |
---|
| 149 | id="" |
---|
| 150 | tal:attributes="name string:metadata.enabled:records; |
---|
| 151 | value python:test(indexObj.enabled, '1', '0'); |
---|
| 152 | tabindex tabindex/next; |
---|
| 153 | checked python:test(indexObj.enabled, 'checked', None)"/> |
---|
| 154 | </td> |
---|
| 155 | <td> |
---|
| 156 | <input type="text" |
---|
| 157 | value="" |
---|
| 158 | name="" |
---|
| 159 | id="" |
---|
| 160 | size="10" |
---|
| 161 | tal:attributes="name string:metadata.friendlyName:records; |
---|
| 162 | value indexObj/friendlyName; |
---|
| 163 | tabindex tabindex/next;" |
---|
| 164 | i18n:attributes="value" |
---|
| 165 | i18n:domain="plone"/> |
---|
| 166 | </td> |
---|
| 167 | <td> |
---|
| 168 | <textarea cols="30" rows="4" type="text" |
---|
| 169 | value="" |
---|
| 170 | name="" |
---|
| 171 | id="" |
---|
| 172 | tal:attributes="name string:metadata.description:records; |
---|
| 173 | tabindex tabindex/next;" |
---|
| 174 | tal:content="indexObj/description" |
---|
| 175 | i18n:translate="" |
---|
| 176 | i18n:domain="plone"></textarea> |
---|
| 177 | </td> |
---|
| 178 | |
---|
| 179 | </tr> |
---|
| 180 | |
---|
| 181 | </tal:object> |
---|
| 182 | </tal:indexes> |
---|
| 183 | </tbody> |
---|
| 184 | </table> |
---|
| 185 | <input class="context" |
---|
| 186 | tabindex="" |
---|
| 187 | type="submit" |
---|
| 188 | name="form.button.metadata_save" |
---|
| 189 | value="Save" |
---|
| 190 | i18n:domain="plone" |
---|
| 191 | i18n:attributes="value label_save;" |
---|
| 192 | tal:attributes="tabindex tabindex/next;" |
---|
| 193 | /> |
---|
| 194 | </tal:indices> |
---|
| 195 | |
---|
| 196 | </form> |
---|
| 197 | </div> |
---|
| 198 | </div> |
---|
| 199 | </div> |
---|
| 200 | </div> |
---|
| 201 | </body> |
---|
| 202 | </html> |
---|