Permalink
Browse files

Reorder the results page, based on feedback

git-svn-id: http://feedvalidator.googlecode.com/svn/trunk@845 34a10a33-d82d-0410-ba40-81c901463ecc
  • Loading branch information...
1 parent 4ad4944 commit 7f6e13e3367c928b10f39e00ad54f0f157e273c1 @rubys committed Oct 22, 2007
Showing with 30 additions and 26 deletions.
  1. +19 −15 check.cgi
  2. +1 −2 templates/andwarn1.tmpl
  3. +2 −2 templates/andwarn2.tmpl
  4. +4 −0 templates/congrats.tmpl
  5. +0 −4 templates/valid.tmpl
  6. +4 −3 templates/warning.tmpl
View
@@ -277,6 +277,19 @@ def checker_app(environ, start_response):
url = validationData['url']
feedType = validationData['feedType']
rawdata = validationData['rawdata']
+
+ htmlUrl = escapeURL(urllib.quote(url))
+ try:
+ htmlUrl = htmlUrl.encode('idna')
+ except:
+ pass
+ docType = 'feed'
+ if feedType == TYPE_ATOM_ENTRY: docType = 'entry'
+ if feedType == TYPE_XRD: docType = 'document'
+ if feedType == TYPE_APP_CATEGORIES: docType = 'Document'
+ if feedType == TYPE_APP_SERVICE: docType = 'Document'
+ if feedType == TYPE_OPENSEARCH: docType = 'description document'
+
yield applyTemplate('header.tmpl', {'title':'Feed Validator Results: %s' % escapeURL(url)})
if manual:
yield applyTemplate('manual.tmpl', {'rawdata':cgi.escape(rawdata)})
@@ -300,10 +313,12 @@ def checker_app(environ, start_response):
yield applyTemplate('notsupported.tmpl')
else:
yield applyTemplate('invalid.tmpl')
- elif msc == Warning:
- yield applyTemplate('warning.tmpl')
- elif msc == Info:
- yield applyTemplate('info.tmpl')
+ else:
+ yield applyTemplate('congrats.tmpl', {"feedType":FEEDTYPEDISPLAY[feedType], "graphic":VALIDFEEDGRAPHIC[feedType], "docType":docType})
+ if msc == Warning:
+ yield applyTemplate('warning.tmpl')
+ elif msc == Info:
+ yield applyTemplate('info.tmpl')
# Print any issues, whether or not the overall feed is valid
if output:
@@ -316,17 +331,6 @@ def checker_app(environ, start_response):
# As long as there were no errors, show that the feed is valid
if msc != Error:
# valid
- htmlUrl = escapeURL(urllib.quote(url))
- try:
- htmlUrl = htmlUrl.encode('idna')
- except:
- pass
- docType = 'feed'
- if feedType == TYPE_ATOM_ENTRY: docType = 'entry'
- if feedType == TYPE_XRD: docType = 'document'
- if feedType == TYPE_APP_CATEGORIES: docType = 'Document'
- if feedType == TYPE_APP_SERVICE: docType = 'Document'
- if feedType == TYPE_OPENSEARCH: docType = 'description document'
yield applyTemplate('valid.tmpl', {"url":htmlUrl, "srcUrl":htmlUrl, "feedType":FEEDTYPEDISPLAY[feedType], "graphic":VALIDFEEDGRAPHIC[feedType], "HOMEURL":HOMEURL, "docType":docType})
else:
# nothing to validate, just write basic form
View
@@ -1,3 +1,2 @@
-<p>In addition, this feed has an issue that may cause problems for some users.
-We recommend fixing this issue.</p>
+<p>In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendation.</p>
View
@@ -1,3 +1,3 @@
-<p>In addition, this feed has issues that may cause problems for some users.
-We recommend fixing these issues.</p>
+<p>In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations.</p>
+
View
@@ -0,0 +1,4 @@
+<h2>Congratulations!</h2>
+
+<blockquote><p><img alt="[Valid %(feedType)s]" title="Valid %(feedType)s" src="images/%(graphic)s" /> This is a valid %(feedType)s %(docType)s.</p></blockquote>
+
View
@@ -1,7 +1,3 @@
-<h2>Congratulations!</h2>
-
-<p><img alt="[Valid %(feedType)s]" title="Valid %(feedType)s" src="images/%(graphic)s" /> This is a valid %(feedType)s %(docType)s.</p>
-
<p>If you would like to create a banner that links to this page (i.e. this validation result), do the following:</p>
<ol>
View
@@ -1,5 +1,6 @@
-<h2>Warning</h2>
+<h2>Recommendations</h2>
+
+<p>This feed is valid, but interoperability with the widest range of feed
+readers could be improved by implementing the following recommendations.</p>
-<p>This feed is valid, but may cause problems for some users.
-We recommend fixing these problems.</p>

0 comments on commit 7f6e13e

Please sign in to comment.