Changeset 205

Show
Ignore:
Timestamp:
08/26/08 18:21:12 (3 months ago)
Author:
rgrp
Message:

[shakespeare/templates][s]: fix up link to text stats from index and link text stats to word stats.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/shakespeare/templates/stats/text.html

    Revision 203 Revision 205
    1<html xmlns:py="http://genshi.edgewall.org/" 1<html xmlns:py="http://genshi.edgewall.org/" 
    2  xmlns:xi="http://www.w3.org/2001/XInclude"> 2  xmlns:xi="http://www.w3.org/2001/XInclude"> 
    3   3   
    4  <py:def function="page_title">Stats for ${c.text.title}</py:def> 4  <py:def function="page_title">Stats for ${c.text.title}</py:def> 
    5 5 
    6  <div py:match="content"> 6  <div py:match="content"> 
    7    <img style="float: left;" 7    <img style="float: left;" 
    8      src="${c.img_url}" 8      src="${c.img_url}" 
    9      alt="Word Statistics Bar Chart" /> 9      alt="Word Statistics Bar Chart" /> 
    10 10 
    11    <p py:if="not c.stats"> 11    <p py:if="not c.stats"> 
    12      Sorry, no statistics are available for ${c.text.title} (name: ${c.text.name}) 12      Sorry, no statistics are available for ${c.text.title} (name: ${c.text.name}) 
    13    </p> 13    </p> 
    14    <table> 14    <table> 
    15    <thead> 15    <thead> 
    16      <tr> 16      <tr> 
    17        <th>Index</th> 17        <th>Index</th> 
    18        <th> 18        <th> 
    19          Word   19          Word   
    20        </th> 20        </th> 
    21        <th> 21        <th> 
    22          Frequency 22          Frequency 
    23        </th> 23        </th> 
    24      </tr> 24      </tr> 
    25    </thead> 25    </thead> 
    26    <tbody> 26    <tbody> 
    27      <tr py:for="index, stat in enumerate(c.stats)"> 27      <tr py:for="index, stat in enumerate(c.stats)"> 
    28        <td> 28        <td> 
    29          ${index + 1} 29          ${index + 1} 
    30        </td> 30        </td> 
    31        <td> 31        <td> 
    32          ${stat.word}  32           <a href="${h.url_for(controller='stats', action='word', id=stat.word)}"> 
       33             ${stat.word}</a> 
    33        </td> 34        </td> 
    34        <td> 35        <td> 
    35          ${stat.freq} 36          ${stat.freq} 
    36        </td> 37        </td> 
    37      </tr> 38      </tr> 
    38    </tbody> 39    </tbody> 
    39    </table> 40    </table> 
    40  </div> 41  </div> 
    41 42 
    42  <xi:include href="../layout.html" /> 43  <xi:include href="../layout.html" /> 
    43</html> 44</html> 
  • trunk/shakespeare/templates/text/index.html

    Revision 204 Revision 205
    1<html xmlns:py="http://genshi.edgewall.org/" 1<html xmlns:py="http://genshi.edgewall.org/" 
    2  xmlns:xi="http://www.w3.org/2001/XInclude"> 2  xmlns:xi="http://www.w3.org/2001/XInclude"> 
    3   3   
    4  <py:def function="page_title">Shakespeare's Works</py:def> 4  <py:def function="page_title">Shakespeare's Works</py:def> 
    5 5 
    6  <div py:match="content"> 6  <div py:match="content"> 
    7    <table border="1"> 7    <table border="1"> 
    8    <thead> 8    <thead> 
    9      <tr> 9      <tr> 
    10        <th> 10        <th> 
    11          Title 11          Title 
    12        </th> 12        </th> 
    13        <th>Author</th> 13        <th>Author</th> 
    14        <th>Other Information</th> 14        <th>Other Information</th> 
    15      </tr> 15      </tr> 
    16    </thead> 16    </thead> 
    17    <tbody> 17    <tbody> 
    18      <tr py:for="item in c.works_index"> 18      <tr py:for="item in c.works_index"> 
    19        <td> 19        <td> 
    20          <a href="${h.url_for(controller='text', action='view', 20          <a href="${h.url_for(controller='text', action='view', 
    21            name=item.name, format='lineno')}"> 21            name=item.name, format='lineno')}"> 
    22            ${item.title}</a> 22            ${item.title}</a> 
    23        </td> 23        </td> 
    24        <td> 24        <td> 
    25          ${item.creator} 25          ${item.creator} 
    26        </td> 26        </td> 
    27        <td> 27        <td> 
    28          <a href="${h.url_for(controller='stats', action='text', 28          <a href="${h.url_for(controller='stats', action='text', 
    29            name=item.name)}"> 29            id=item.name)}"> 
    30            Text statistics link</a>. ${item.notes} 30            Text statistics link</a>. ${item.notes} 
    31        </td> 31        </td> 
    32      </tr> 32      </tr> 
    33    </tbody> 33    </tbody> 
    34    </table> 34    </table> 
    35  </div> 35  </div> 
    36 36 
    37  <xi:include href="../layout.html" /> 37  <xi:include href="../layout.html" /> 
    38</html> 38</html>