<!--
Copyright (c) 2002-2008 Infrae. All rights reserved.
See also LICENSE.txt
Version of this file: $Revision: 1.4 $
-->

<tal:block define="dummy python: here.REQUEST.RESPONSE.setHeader('Content-Type', 'text/html;; charset=UTF-8')" />

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>ServiceNews</title>
<link rel="stylesheet" type="text/css" href="/manage_page_style.css">

</head>

<body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099">


<span tal:define="manage_tabs_message options/manage_tabs_message | nothing"
    tal:replace="structure here/manage_tabs">Tabs</span>

<tal:define define="global view here;
                    " />

<tal:block define="modify python: test(request.has_key('subjects'), 'subject', 'target_audience');
                    items python: test(request.has_key('subjects'), request.get('subjects'), request.get('target_audiences'))">
  <div class="form-title" tal:content="string:Rename ${modify}s"/><br />
  <form method="POST" tal:attributes="action python: 'manage_rename_%ss' % modify">
    <table border="0">
      <tr>
        <td class="form-text" style="width: 25%">Old id:</td>
        <td class="form-text" style="width: 25%">New id:</td>
        <td class="form-text" style="width: 25%">Old title:</td>
        <td class="form-text" style="width: 25%">New title:</td>
      </tr>
      <tal:block repeat="item items">
        <tr tal:define="title python: getattr(view, '%s_title' % modify)(item)">
          <td tal:content="item" class="form-text" />
          <td>
            <input type="text" 
                    class="form-element" 
                    tal:attributes="name item; value item" />
          </td>
          <td tal:content="title" class="form-text" />
          <td>
            <input type="text" 
                    class="form-element" 
                    tal:attributes="name string:title_${item}; value title" />
          </td>
        </tr>
      </tal:block>
      <tr>
        <td colspan="4" class="form-element">
          <input type="submit" value="Submit" />
        </td>
      </tr>
    </table>
  </form>
</tal:block>

<span tal:replace="structure here/manage_page_footer">Footer</span>
