<html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="here/main_template/macros/master">
  <head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
  </head>

  <body>
    <div metal:fill-slot="main" i18n:domain="cmf_default">
      <div class="Desktop" tal:define="s_tool here/portal_syndication;
                 s_site_allowed s_tool/isSiteSyndicationAllowed;
                 s_here_allowed python:s_tool.isSyndicationAllowed(here);
                 s_allowed python:s_site_allowed and s_here_allowed;
                ">
        <h2 i18n:translate="">Default Syndication Properties</h2>
        <p>
          <span i18n:translate="">Syndication is the process by which a site is able to share information out to other sites. When syndication is enabled, this folder items summary will be provided on <strong>RSS</strong> xml format at :</span>
          <a href="." tal:omit-tag="not:s_allowed"
											tal:define="rssUrl string:${here/absolute_url}/RSS"
											tal:content="rssUrl"
											tal:attributes="href string:$rssUrl?noajax=1">this folder url/RSS</a>.
				</p>
        <div tal:condition="python:s_allowed">
          <form action="editSynProperties" method="post" tal:attributes="action string:${here/absolute_url}/editSynProperties">
            <table width="100%" border="0">
              <tr>
                <th colspan="2" align="left" valign="top" i18n:translate="">Channel Properties</th>
              </tr>
              <tr>
                <td colspan="2">
                  <table width="90%" border="1">
                    <tr>
                      <td>
                        <table>
                          <tr>
                            <td valign="top" height="30" i18n:translate="">
                              Channel Title:
                            </td>
                            <td valign="top" tal:content="here/Title" height="30">
                              Title
                            </td>
                          </tr>
                          <tr>
                            <td valign="top" height="30" i18n:translate="">
                              Channel Description:
                            </td>
                            <td valign="top" tal:content="here/Description" height="30">
                              Description
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table width="100%" border="0">
              <tr>
                <th align="left" valign="top" i18n:translate="">Sy Module Properties</th>
                <td></td>
              </tr>
              <tr>
                <td colspan="2">
                  <table width="90%" border="1">
                    <tr>
                      <td>
                        <table>
                          <tr>
                            <th align="left" i18n:translate="">Element</th>
                            <th align="left" i18n:translate="">Default Value</th>
                          </tr>
                          <tr>
                            <td i18n:translate="">
                              UpdatePeriod
                            </td>
                            <td>
                              <select name="updatePeriod">
                                <option value="hourly" tal:attributes="value python:item[0];
                                    selected python:item[0] == upd" tal:define="upd python:s_tool.getUpdatePeriod(here)" tal:content="python: item[1]" tal:repeat="item s_tool/buildUpdatePeriods" i18n:translate="">Hourly</option>
                              </select>
                            </td>
                          </tr>
                          <tr>
                            <td i18n:translate="">
                              UpdateFrequency
                            </td>
                            <td>
                              <input type="text" name="updateFrequency:int" value="" size="3" tal:attributes="value python:s_tool.getUpdateFrequency(here)" />
                            </td>
                          </tr>
                          <tr>
                            <td i18n:translate="">
                              UpdateBase
                            </td>
                            <td>
                              <input type="text" name="updateBase:date" value="" size="25" tal:attributes="value python:s_tool.getUpdateBase(here)" />
                            </td>
                          </tr>
                          <tr>
                            <td i18n:translate="">
                              Max Syndicated Items
                            </td>
                            <td>
                              <input type="text" name="max_items:int" value="" size="3" tal:attributes="value python:s_tool.getMaxItems(here)" />
                            </td>
                          </tr>
                          <tr>
                            <td colspan="2">
                              <input type="hidden" name="noAjax" value="1" />
                              <input type="submit" name="edit" value="Save" i18n:attributes="value" />
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td>
                  <br />
                </td>
                <td></td>
              </tr>
            </table>
          </form>
          <form action="disableSyndication" method="post" tal:attributes="action string:${here/absolute_url}/disableSyndication">
            <input type="submit" value="Disable Syndication" i18n:attributes="value" /> <input type="hidden" name="isAllowed:int" value="0" /><input type="hidden" name="noAjax" value="1" />
          </form>
        </div>
        <!--  s_allowed -->
        <div tal:condition="python:not(s_allowed)">
          <h4 i18n:translate="">Syndication is Disabled</h4>
        </div>
        <div tal:condition="python: s_site_allowed and not(s_here_allowed)">
          <form action="enableSyndication" method="post" tal:attributes="action string:${here/absolute_url}/enableSyndication">
            <input type="hidden" name="isAllowed:int" value="1" /><input type="hidden" name="noAjax" value="1" /><input type="submit" value="Enable Syndication" i18n:attributes="value" />
          </form>
        </div>
        <!-- s_site_allowed and not s_here_allowed -->
      </div>
      <!-- class="Desktop -->
    </div>
    <!-- metal:fill-slot="main" -->
  </body>

</html>