Source

pypi / templates / pkg_edit.pt

Full commit
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="standard_template/macros/page">
<metal:fill fill-slot="body">

<p tal:replace="structure app/release_nav" />

<p>
  Each package may have a release for each version of the
  package that is released. You may use this form to hide releases
  from users.
</p>

<p>Administer the <a tal:attributes="href string:${app/url_path}?:action=role_form&amp;package_name=${app/form/name}">Role</a>
assigned to users for this package.</p>

<p>
<form tal:attributes="action app/url_path" method="POST">
 <input type="hidden" name=":action" value="remove_pkg" />
 <input type="hidden" name="name" tal:attributes="value data/name" />
 <input id="remove_completely_submit" type="submit" value="Remove this package completely" />
</form>
</p>
<p>Alternatively, you may edit the information about each release:</p>
<form tal:attributes="action app/url_path" method="POST">
 <input type="hidden" name=":action" value="pkg_edit" />
 <input type="hidden" name="name" tal:attributes="value data/name" />

 <table class="list" style="width: auto">
  <tr><th>Remove?</th><th>Version</th><th>Hide?</th><th>Summary</th>
      <th colspan="4">Links</th></tr>

  <tr tal:repeat="release data/releases"
      tal:attributes="class repeat/release/parity">
   <td><input type="checkbox" name="version"
        tal:attributes="value release/version" /></td>
   <td tal:content="release/version" />
   <td>
    <select tal:attributes="name string:hid_${release/version}">
      <div tal:omit-tag=""
           tal:condition="release/_pypi_hidden">
        <option value="0">No</option>
        <option value="1" selected="selected">Yes</option>
      </div>
      <div tal:omit-tag=""
           tal:condition="not:release/_pypi_hidden">
        <option value="0" selected="selected">No</option>
        <option value="1">Yes</option>
      </div>
    </select>
   </td>
   <td><input size="40" tal:attributes="name string:sum_${release/version};
        value release/summary" /></td>
   <td><a tal:attributes="href string:${app/url_path}?:action=display&amp;name=${data/name}&amp;version=${release/version}">show</a></td>
   <td><a tal:attributes="href string:${app/url_path}?:action=submit_form&amp;name=${data/name}&amp;version=${release/version}">edit</a></td>
   <td><a tal:attributes="href string:${app/url_path}?:action=files&amp;name=${data/name}&amp;version=${release/version}">files</a></td>
   <td><a tal:attributes="href string:${app/url_path}?:action=urls&amp;name=${data/name}&amp;version=${release/version}">urls</a></td>
  </tr>

 <tr>
  <td id="last">
   <input type="submit" name="submit_remove" value="Remove" />
  </td>
  <td id="last"> </td>
  <td id="last" colspan="5">
   <input type="submit" name="submit_submit" value="Update Releases" />
  </td>
 </tr>
</table>
</form>

<p>By default, each new release will hide all other release from the
regular display. If you want to select yourself which packages to hide,
uncheck the button below</p>
<form tal:attributes="action app/url_path" method="POST"
    enctype="multipart/form-data">
  <input type="hidden" name=":action" value="pkg_edit" />
  <input type="hidden" name="name" tal:attributes="value data/name" />

  <!-- Apparently, we run TAL in XML mode, so the auto-remove feature
       for the checked attribute will not work -->
  <input tal:condition="data/autohide" type="checkbox" name="autohide"
         checked="checked">Auto-hide old releases</input>
  <input tal:condition="not:data/autohide" type="checkbox" name="autohide">Auto-hide old releases</input>
  <input type="submit" name="submit_autohide" value="Change" />
  <br/>
</form>


<p>You can now host documentation at
<a tal:attributes="href string:http://pythonhosted.org/${data/name}"
tal:content="string:http://pythonhosted.org/${data/name}"></a>. To
upload documentation, prepare a .zip file that is unpacked into this URL.
Only static pages are supported. The zip file must have a top-level
"index.html".</p>
<form tal:attributes="action app/url_path" method="POST"
    enctype="multipart/form-data">
<input type="hidden" name=":action" value="doc_upload" />
<input type="hidden" name="name" tal:attributes="value data/name" />
<input size="40" type="file" name="content" />
<input type="submit" value="Upload Documentation" />
</form>

</metal:fill>
</html>