diff options
author | Richard Jones <richard@mechanicalcat.net> | 2013-03-19 11:45:17 -0700 |
---|---|---|
committer | Richard Jones <richard@mechanicalcat.net> | 2013-03-19 11:45:17 -0700 |
commit | 673daef6b80d8ea4eda02aaa15c85cdcde343f31 (patch) | |
tree | 3de168ee8009405ffe627663b1e1bd6532e1f71c /templates | |
parent | 1e372617b4a6e327c8fc4f52bdf0e01f44c3169c (diff) | |
download | decorator-673daef6b80d8ea4eda02aaa15c85cdcde343f31.tar.gz |
Donald's implementation of hosting mode
Diffstat (limited to 'templates')
-rw-r--r-- | templates/pkg_edit.pt | 21 | ||||
-rw-r--r-- | templates/urls.pt | 49 |
2 files changed, 70 insertions, 0 deletions
diff --git a/templates/pkg_edit.pt b/templates/pkg_edit.pt index 2a3cf87..5f52cd2 100644 --- a/templates/pkg_edit.pt +++ b/templates/pkg_edit.pt @@ -54,6 +54,7 @@ assigned to users for this package.</p> <td><a tal:attributes="href string:${app/url_path}?:action=display&name=${data/name}&version=${release/version}">show</a></td> <td><a tal:attributes="href string:${app/url_path}?:action=submit_form&name=${data/name}&version=${release/version}">edit</a></td> <td><a tal:attributes="href string:${app/url_path}?:action=files&name=${data/name}&version=${release/version}">files</a></td> + <td><a tal:attributes="href string:${app/url_path}?:action=urls&name=${data/name}&version=${release/version}">urls</a></td> </tr> <tr> @@ -85,6 +86,26 @@ uncheck the button below</p> <br/> </form> +<p>Hosting Mode</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" /> + + <input tal:condition="python: data['hosting_mode'] != 'pypi-explicit'" type="radio" name="hosting_mode" id="pypi-explicit" value="pypi-explicit" /> + <input tal:condition="python: data['hosting_mode'] == 'pypi-explicit'" type="radio" name="hosting_mode" id="pypi-explicit" value="pypi-explicit" checked="checked" /> + <label for="pypi-explicit">Do not extract URLs from description field</label> + + <input tal:condition="python: data['hosting_mode'] != 'pypi-scrape'" type="radio" name="hosting_mode" id="pypi-scrape" value="pypi-scrape" /> + <input tal:condition="python: data['hosting_mode'] == 'pypi-scrape'" type="radio" name="hosting_mode" id="pypi-scrape" value="pypi-scrape" checked="checked" /> + <label for="pypi-scrape">Automatically extract URLs from description field</label> + + <input tal:condition="python: data['hosting_mode'] != 'pypi-scrape-crawl'" type="radio" name="hosting_mode" id="pypi-scrape-crawl" value="pypi-scrape-crawl" /> + <input tal:condition="python: data['hosting_mode'] == 'pypi-scrape-crawl'" type="radio" name="hosting_mode" id="pypi-scrape-crawl" value="pypi-scrape-crawl" checked="checked" /> + <label for="pypi-scrape-crawl">Scrape Homepage and Download URL (Slow!)</label> + + <input type="submit" name="submit_hosting_mode" value="Change" /> +</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 diff --git a/templates/urls.pt b/templates/urls.pt new file mode 100644 index 0000000..0ea88d5 --- /dev/null +++ b/templates/urls.pt @@ -0,0 +1,49 @@ +<?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" /> + +<form tal:attributes="action app/url_path" method="POST" enctype="multipart/form-data"> + <input type="hidden" name="name" tal:attributes="value data/name" /> + <input type="hidden" name="version" tal:attributes="value data/version" /> + <input type="hidden" name=":action" value="urls" /> + + <table class="list" style="width: auto"> + <tr> + <th>Remove?</th> + <th>URL</th> + </tr> + + <tr tal:repeat="url python:app.store.list_description_urls(data['name'], data['version'])" tal:attributes="class repeat/url/parity"> + <td><input type="checkbox" name="url-ids" tal:attributes="value url" /></td> + <td><a tal:attributes="href string:${url}" tal:content="url" /></td> + </tr> + + <tr> + <td colspan="2" id="last"> + <input type="submit" name="submit_remove" value="Remove" /> + </td> + </tr> + </table> +</form> + +<p><b>Add a New URL</b></p> +<p>Each URL must locate a distribution file directly, not point to an + index page of file URLs. The contents of the URLs you provide here are not + scraped for file download URLs.</p> +<form tal:attributes="action app/url_path" method="POST" enctype="multipart/form-data"> + <input type="hidden" name="name" tal:attributes="value data/name" /> + <input type="hidden" name="version" tal:attributes="value data/version" /> + <input type="hidden" name=":action" value="urls" /> + + <input name="new-url" /> + <input type="submit" name="submit_new_url" value="Add URL" /> +</form> + +</metal:fill> +</html> + |