[cc-commits] [SCM] License chooser & etc (branch master) updated. c08c31747915ddecb5cded7a3120721d1e91d137

git version control git at a7.creativecommons.org
Tue Jan 5 15:35:03 EST 2010


The branch, master has been updated
       via  c08c31747915ddecb5cded7a3120721d1e91d137 (commit)
       via  32506099323b74e4073c70c797941fb237d48b62 (commit)
       via  15cfb40c76da1bf5bb331861fba569e17bc5048e (commit)
      from  559a5bf61423ec55ed3ef6747652a68658581293 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c08c31747915ddecb5cded7a3120721d1e91d137
Author: Christopher Allan Webber <cwebber at dustycloud.org>
Date:   Tue Jan 5 14:35:37 2010 -0600

    Beginning to convert templates for the staticdirect stuff

commit 32506099323b74e4073c70c797941fb237d48b62
Author: Christopher Allan Webber <cwebber at dustycloud.org>
Date:   Tue Jan 5 13:46:25 2010 -0600

    Just cleaning up the template a bit

commit 15cfb40c76da1bf5bb331861fba569e17bc5048e
Author: Christopher Allan Webber <cwebber at dustycloud.org>
Date:   Tue Jan 5 11:25:03 2010 -0600

    Adding request in to the context

-----------------------------------------------------------------------

Summary of changes (followed by patch):
 cc/engine/licenses/views.py                        |    1 +
 .../templates/catalog_pages/licenses-index.pt      |  125 ++++++++++++++------
 cc/engine/templates/chooser_pages/index.pt         |    9 ++-
 cc/engine/templates/chooser_pages/results.pt       |    2 +
 .../templates/licenses/standard_templates/deed.pt  |    1 +
 cc/engine/templates/macros_templates/deed.pt       |   19 +++-
 cc/engine/templates/macros_templates/engine.pt     |   39 +++++--
 7 files changed, 141 insertions(+), 55 deletions(-)

diff --git a/cc/engine/licenses/views.py b/cc/engine/licenses/views.py
index c182a84..0bda6c1 100644
--- a/cc/engine/licenses/views.py
+++ b/cc/engine/licenses/views.py
@@ -90,6 +90,7 @@ def license_deed_view(request, license):
             target_lang=target_lang)
 
     context = {
+        'request': request,
         'license_code': license.license_code,
         'license_title': license_title,
         'license': license,
diff --git a/cc/engine/templates/catalog_pages/licenses-index.pt b/cc/engine/templates/catalog_pages/licenses-index.pt
index 2669e9a..cb33245 100644
--- a/cc/engine/templates/catalog_pages/licenses-index.pt
+++ b/cc/engine/templates/catalog_pages/licenses-index.pt
@@ -4,68 +4,115 @@
       xmlns:metal="http://xml.zope.org/namespaces/metal"
       metal:use-macro="engine_template/macros/page"
       i18n:domain="cc_org">
-<head>
-  <title metal:fill-slot="title">Creative Commons Licenses</title>
-</head>
+  <head>
+    <title metal:fill-slot="title">Creative Commons Licenses</title>
+  </head>
 
-<body>
-<div metal:fill-slot="body">
-     <h1>Creative Commons Licenses</h1>
+  <body>
+    <div metal:fill-slot="body">
+      <h1>Creative Commons Licenses</h1>
 
-<p>The following are the six current license choices available from our <a href="/choose/">choose a license</a> application, along with previous versions that have been phased out. They are shown by name along the license characteristics that accompany them. <a href="http://creativecommons.org/about/licenses/">This page explains what each icon represents</a>.</p>
+      <p>
+        The following are the six current license choices available
+        from our <a href="/choose/">choose a license</a> application,
+        along with previous versions that have been phased out. They
+        are shown by name along the license characteristics that
+        accompany them.
+        <a href="http://creativecommons.org/about/licenses/">This
+        page explains what each icon represents</a>.
+      </p>
 
-<table border="0" style="margin-left:14px;margin-bottom:30px;" cellpadding="3">
+      <table border="0" style="margin-left:14px;margin-bottom:30px;" cellpadding="3">
 	<tr>
-		<th align="left">Name</th>
-	    <th align="left" colspan="3">Characteristics</th>
+	  <th align="left">Name</th>
+	  <th align="left" colspan="3">Characteristics</th>
 	</tr>
-<tr>
-	<th colspan="4" style="background:#dedede;color:#333;" align="left">Version 3.0 Licenses:</th>
-</tr>
+        <tr>
+	  <th colspan="4" style="background:#dedede;color:#333;"
+              align="left">Version 3.0 Licenses:</th>
+        </tr>
 
-<tr>
-		<td width="250"><a href="/licenses/by/3.0/">Attribution</a></td>
-		<td><img border="0" src="/icons/by/standard.gif" alt="by" align="left" /></td>
-		<td width="32">&nbsp;</td>
-		<td width="32">&nbsp;</td>
+        <tr>
+	  <td width="250"><a href="/licenses/by/3.0/">Attribution</a></td>
+	  <td>
+            <img border="0" src="/icons/by/standard.gif"
+                 alt="by" align="left" />
+          </td>
+	  <td width="32">&nbsp;</td>
+	  <td width="32">&nbsp;</td>
 	</tr>
 
 	<tr>
-		<td><a href="/licenses/by-nd/3.0/">Attribution-NoDerivs</a></td>
+	  <td><a href="/licenses/by-nd/3.0/">Attribution-NoDerivs</a></td>
 
-		<td><img border="0" src="/icons/by/standard.gif" alt="by" align="left" /></td><td width="32">&nbsp;</td><td><img border="0" src="/icons/nd/standard.gif" alt="nd" align="left" /></td>
+	  <td>
+            <img border="0" src="/icons/by/standard.gif" alt="by" align="left" />
+          </td>
+          <td width="32">&nbsp;</td>
+          <td><img border="0" src="/icons/nd/standard.gif" alt="nd" align="left" /></td>
 	</tr>
 
 	<tr>
-		<td><a href="/licenses/by-nc-nd/3.0/">Attribution-NonCommercial-NoDerivs</a></td>
-		<td><img border="0" src="/icons/by/standard.gif" alt="by" align="left" /></td><td><img border="0" src="/icons/nc/standard.gif" alt="nc" align="left" /></td><td><img border="0" src="/icons/nd/standard.gif" alt="nd" align="left" /></td>
+	  <td>
+            <a href="/licenses/by-nc-nd/3.0/">Attribution-NonCommercial-NoDerivs</a>
+          </td>
+	  <td>
+            <img border="0" src="/icons/by/standard.gif" alt="by" align="left" />
+          </td>
+          <td>
+            <img border="0" src="/icons/nc/standard.gif" alt="nc" align="left" />
+          </td>
+          <td>
+            <img border="0" src="/icons/nd/standard.gif" alt="nd" align="left" />
+          </td>
 	</tr>
 	
 	<tr>
-		<td><a href="/licenses/by-nc/3.0/">Attribution-NonCommercial</a></td>
+	  <td><a href="/licenses/by-nc/3.0/">Attribution-NonCommercial</a></td>
 
-		<td><img border="0" src="/icons/by/standard.gif" alt="by" align="left" /></td><td><img border="0" src="/icons/nc/standard.gif" alt="nc" align="left" /></td><td width="32">&nbsp;</td>
+	  <td>
+            <img border="0" src="/icons/by/standard.gif" alt="by" align="left" />
+          </td>
+          <td>
+            <img border="0" src="/icons/nc/standard.gif" alt="nc" align="left" />
+          </td>
+          <td width="32">&nbsp;</td>
 	</tr>
 
 	<tr>
-		<td><a href="/licenses/by-nc-sa/3.0/">Attribution-NonCommercial-ShareAlike</a></td>
-		<td><img border="0" src="/icons/by/standard.gif" alt="by" align="left" /></td><td><img border="0" src="/icons/nc/standard.gif" alt="nc" align="left" /></td><td><img border="0" src="/icons/sa/standard.gif" alt="sa" align="left" /></td>
+	  <td>
+            <a href="/licenses/by-nc-sa/3.0/">Attribution-NonCommercial-ShareAlike</a>
+          </td>
+	  <td>
+            <img border="0" src="/icons/by/standard.gif" alt="by" align="left" />
+          </td>
+          <td>
+            <img border="0" src="/icons/nc/standard.gif" alt="nc" align="left" />
+          </td>
+          <td>
+            <img border="0" src="/icons/sa/standard.gif" alt="sa" align="left" />
+          </td>
 	</tr>
 
 	<tr>
-
-		<td><a href="/licenses/by-sa/3.0/">Attribution-ShareAlike</a></td>
-		<td><img border="0" src="/icons/by/standard.gif" alt="by" align="left" /></td><td width="32">&nbsp;</td><td><img border="0" src="/icons/sa/standard.gif" alt="sa" align="left" /></td>
+	  <td><a href="/licenses/by-sa/3.0/">Attribution-ShareAlike</a></td>
+	  <td>
+            <img border="0" src="/icons/by/standard.gif"
+                 alt="by" align="left" />
+          </td>
+          <td width="32">&nbsp;</td>
+          <td>
+            <img border="0" src="/icons/sa/standard.gif" alt="sa" align="left" />
+          </td>
 	</tr>
-</table>
-
-<p>
-With Creative Commons licenses creators keep their copyright. If you
-want to waive all restrictions on your work or certify that a work is
-already in the public domain, see our <a href="/publicdomain">public
-domain tools</a>.
-</p>
+      </table>
 
-</div>
-</body>
+      <p>
+        With Creative Commons licenses creators keep their copyright. If you
+        want to waive all restrictions on your work or certify that a work is
+        already in the public domain, see our <a href="/publicdomain">public
+        domain tools</a>.
+      </p>
+    </div>
+  </body>
 </html>
diff --git a/cc/engine/templates/chooser_pages/index.pt b/cc/engine/templates/chooser_pages/index.pt
index 3baf19e..e66c379 100644
--- a/cc/engine/templates/chooser_pages/index.pt
+++ b/cc/engine/templates/chooser_pages/index.pt
@@ -15,7 +15,8 @@
             src="http://yui.yahooapis.com/2.6.0/build/container/container-min.js">
     </script> 
 
-    <script src="/includes/help.js" type="text/javascript">
+    <script tal:attributes="src python:request.staticdirect('/includes/help.js')"
+            type="text/javascript">
     </script>
   </metal:headers>
 </head>
@@ -70,6 +71,7 @@
                    i18n:translate="util.Yes">Yes</label> 
             <a href="" id="commercial" class="helpLink">
               <img src="images/information.png"
+                   tal:attributes="src python:request.staticdirect('images/information.png')"
                    i18n:attributes="alt" alt="Information"/>
             </a>
           </li>
@@ -81,6 +83,7 @@
                    i18n:translate="util.No">No</label>
             <a href="" id="noncommercial" class="helpLink">
               <img src="images/information.png"
+                   tal:attributes="src python:request.staticdirect('images/information.png')"
                    i18n:attributes="alt" alt="Information"/>
             </a>
           </li>
@@ -100,6 +103,7 @@
             <label for="question_3-5" i18n:translate="util.Yes">Yes</label>
             <a href="" id="derivatives" class="helpLink">
               <img src="images/information.png"
+                   tal:attributes="src python:request.staticdirect('images/information.png')"
                    i18n:attributes="alt" alt="Information" />
             </a>
           </li>
@@ -111,6 +115,7 @@
               <span i18n:translate="">Yes, as long as others share alike</span>
               <a href="" class="helpLink" id="sharealike">
                 <img src="images/information.png"
+                     tal:attributes="src python:request.staticdirect('images/information.png')"
                      i18n:attributes="alt" alt="Information" />
               </a>
             </label>
@@ -122,6 +127,7 @@
             <label for="question_3-7" i18n:translate="util.No">No</label>
             <a href="" id="noderivatives" class="helpLink">
               <img src="images/information.png"
+                   tal:attributes="src python:request.staticdirect('images/information.png')"
                    i18n:attributes="alt" alt="Information" />
             </a>
           </li>
@@ -133,6 +139,7 @@
           </span> 
           <a href="" class="helpLink" id="jurisdiction">
             <img src="images/information.png"
+                 tal:attributes="src python:request.staticdirect('images/information.png')"
                  i18n:attributes="alt" alt="Information" />
           </a>
           <br />
diff --git a/cc/engine/templates/chooser_pages/results.pt b/cc/engine/templates/chooser_pages/results.pt
index cec7086..fd25cff 100644
--- a/cc/engine/templates/chooser_pages/results.pt
+++ b/cc/engine/templates/chooser_pages/results.pt
@@ -15,6 +15,8 @@
           padding-left: 0;
         }
       </style>
+      <link rel="stylesheet" type="text/css" href="zero.css"
+	    tal:attributes="href python: request.staticdirect('includes/zero.css')" />
     </metal:style>
   </head>
 
diff --git a/cc/engine/templates/licenses/standard_templates/deed.pt b/cc/engine/templates/licenses/standard_templates/deed.pt
index e77a2c2..e119bb4 100644
--- a/cc/engine/templates/licenses/standard_templates/deed.pt
+++ b/cc/engine/templates/licenses/standard_templates/deed.pt
@@ -111,6 +111,7 @@ ${license/rdf} -->" />
                      tal:attributes="value license/uri" />
               <a href="" id="attribution_help" class="helpLink">
                 <img src="/@@/cc/images/information.png"
+                     tal:attributes="src python:request.staticdirect('images/license-information.png')"
                      i18n:attributes="alt"
                      alt="Information" />
               </a>
diff --git a/cc/engine/templates/macros_templates/deed.pt b/cc/engine/templates/macros_templates/deed.pt
index 3a28c1d..e55c8bf 100644
--- a/cc/engine/templates/macros_templates/deed.pt
+++ b/cc/engine/templates/macros_templates/deed.pt
@@ -15,21 +15,29 @@
 
     <meta http-equiv="content-type" content="text/html;charset=utf-8" />
 
-<link rel="stylesheet" type="text/css"
-      href="http://yui.yahooapis.com/2.6.0/build/container/assets/skins/sam/container.css"/> 
+    <link rel="stylesheet" type="text/css"
+          href="http://yui.yahooapis.com/2.6.0/build/container/assets/skins/sam/container.css"/> 
 
     <link rel="stylesheet" type="text/css" 
+          tal:attributes="href python: request.staticdirect('includes/deed3.css')"
           href="/@@/cc/includes/deed3.css" media="screen" />
     <link rel="stylesheet" type="text/css" 
           href="/@@/cc/includes/deed3-rtl.css" media="screen" 
+          tal:attributes="href python: request.staticdirect('includes/deed3-rtl.css')"
           tal:condition="is_rtl" />
     <link rel="stylesheet" type="text/css" 
           href="/includes/deed3-print.css" media="print" 
+          tal:attributes="href python: request.staticdirect('includes/deed3-print.css')"
           />
     <link rel="stylesheet" type="text/css" 
+          tal:attributes="href python: request.staticdirect('includes/jurisdictions.css')"
           href="/includes/jurisdictions.css" media="screen" />
 
-    <!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="/includes/deed3-ie.css" media="screen" tal:attributes="href /@@/cc/includes/deed3-ie.css" /><![endif]-->
+    <!--[if lt IE 7]>
+      <link rel="stylesheet" type="text/css" href="/includes/deed3-ie.css"
+            media="screen"
+            tal:attributes="href python:request.staticdirect('includes/deed3-ie.css')" />
+    <![endif]-->
 
     <link rel="alternate" type="application/rdf+xml" href="rdf" /> 
     <script metal:use-macro="support_template/macros/language_javascript" />
@@ -44,7 +52,9 @@
 	    src="http://yui.yahooapis.com/2.6.0/build/json/json-min.js">
     </script>
 
-    <script type="text/javascript" src="/includes/referrer/deed.js">
+    <script type="text/javascript"
+            tal:attributes="src python:request.staticdirect('includes/referrer/deed.js')"
+            src="/includes/referrer/deed.js">
     </script>
 
     <script type="text/javascript" 
@@ -52,6 +62,7 @@
     </script>
 
     <script type="text/javascript"
+            tal:attributes="src python:request.staticdirect('includes/help.js')"
 	    src="/includes/help.js">
     </script>
 
diff --git a/cc/engine/templates/macros_templates/engine.pt b/cc/engine/templates/macros_templates/engine.pt
index 931237c..8cadb25 100644
--- a/cc/engine/templates/macros_templates/engine.pt
+++ b/cc/engine/templates/macros_templates/engine.pt
@@ -13,27 +13,41 @@
 	  /> 
 
     <link rel="stylesheet" type="text/css" 
-          href="/@@/cc/cc5/style.css" />
-	 <link rel="stylesheet" type="text/css" media="print"
-	       href="/@@/cc/cc5/print.css" />
-	<link href="http://creativecommons.org/includes/progress.css" 
+          href="/@@/cc/cc5/style.css"
+          tal:attributes="href python:request.staticdirect('cc5/style.css')" />
+    <link rel="stylesheet" type="text/css" media="print"
+	  href="/@@/cc/cc5/print.css"
+          tal:attributes="href python:request.staticdirect('cc5/print.css')" />
+    <link href="http://creativecommons.org/includes/progress.css" 
 	  rel="stylesheet" type="text/css" />
-    <link href="http://creativecommons.org/wp-content/themes/cc4/support.css" rel="stylesheet" type="text/css" />
+    <link href="http://creativecommons.org/wp-content/themes/cc4/support.css"
+          tal:attributes="href python:request.staticdirect('cc4/support.css')"
+          rel="stylesheet" type="text/css" />
     <link rel="stylesheet" type="text/css"
+          tal:attributes="href python:request.staticdirect('cc5/engine.css')"
           href="/@@/cc/cc5/engine.css" />
     <link rel="stylesheet" type="text/css"
           href="/@@/cc/cc5/engine-rtl.css"
+          tal:attributes="href python:request.staticdirect('cc5/engine-rtl.css')"
 	  tal:condition="is_rtl"/>
 
-    <!--[if IE]><link rel="stylesheet" type="text/css" media="screen" href=/@@/cc/includes/style-ie.css" />
+    <!--[if IE]>
+      <link rel="stylesheet" type="text/css"
+            media="screen" href=/@@/cc/includes/style-ie.css"
+            tal:attributes="href python:request.staticdirect('includes/style-ie.css')" />
     <![endif]-->
 
     <script type="text/javascript" 
 	    src="http://yui.yahooapis.com/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
     <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/animation/animation-min.js"></script> 
     <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/container/container-min.js"></script>
-    <script type="text/javascript" src="/@@/cc/includes/license-results.js" ></script>
-    <script type="text/javascript" src="/@@/cc/cc5/site.js" ></script>
+    <script type="text/javascript"
+            tal:attributes="src python:request.staticdirect('includes/license-results.js')"
+            src="/@@/cc/includes/license-results.js" >
+    </script>
+    <script type="text/javascript"
+            tal:attributes="src python:request.staticdirect('cc5/site.js')"
+            src="/@@/cc/cc5/site.js" ></script>
 
    <metal:headers define-slot="headers" />
 
@@ -101,11 +115,14 @@
           <div class="sideitem">
             <ul>
               <li><img src="/@@/cc/cc5/images/license-alt.png" 
-                        alt="License your work" />&nbsp;&nbsp;
+                       tal:attributes="src python:request.staticdirect('images/license-alt.png')"
+                       alt="License your work" />&nbsp;&nbsp;
                   <a href="/choose/">License your work</a>
               </li>
-              <li><img src="/@@/cc/cc5/images/find-alt.png" 
-                        alt="Find licensed works" width="12" height="12" />&nbsp;&nbsp;
+              <li>
+                <img src="/@@/cc/cc5/images/find-alt.png" 
+                     tal:attributes="src python:request.staticdirect('images/find-alt.png')"
+                     alt="Find licensed works" width="12" height="12" />&nbsp;&nbsp;
                   <a href="http://search.creativecommons.org/">Find licensed works</a>
               </li>
             </ul>


hooks/post-receive
-- 
License chooser & etc



More information about the cc-commits mailing list