Changeset 1864

Show
Ignore:
Timestamp:
11/05/08 14:42:04 (2 months ago)
Author:
egj
Message:

re #367, make pluralizations consistent. also, fix layout bug on comment form when username is too long

Location:
siteapp/trunk/opengeo/almanac/templates
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • siteapp/trunk/opengeo/almanac/templates/appindex.pt

    r1843 r1864  
    9797    </div><!-- /.crossbar --> 
    9898    <div class="container"> 
    99       <div class="almanac-list span-15"> 
     99      <div class="almanac-list span-15" tal:define="num_almanacs view/number_of_almanacs"> 
    100100        <div class="box"> 
    101           <h3>Almanacs <span class="result-count">(showing <span tal:replace="view/number_of_almanacs" /> communities)</span></h3> 
    102           <div tal:condition="view/number_of_almanacs" id="spinner" class="spinner"></div> 
     101          <h3>Almanacs 
     102            <span class="result-count" tal:condition="python:num_almanacs > 1"> 
     103              (showing <span tal:replace="num_almanacs" /> communities) 
     104            </span> 
     105          </h3> 
     106          <div tal:condition="num_almanacs" id="spinner" class="spinner"></div> 
    103107          <div id="app-almanacs-container"></div> 
    104108          <div class="undisplayed"> 
     
    146150                                title item/dc:title; 
    147151                                alt item/dc:title" /> 
    148               <div class="summary"> 
     152              <div class="summary" tal:define="num_comments python:len(item.keys())"> 
    149153                <a tal:content="item/dc:title_or_name" tal:attributes="href item/@@absolute_url" /><br /> 
    150                 <span tal:replace="item/__parent__/dc:title_or_name"></span> - <span tal:replace="python:len(item.keys())" /> comments 
     154                <span tal:replace="item/__parent__/dc:title_or_name"></span> - <span tal:replace="num_comments" /> comment<tal:omit condition="python:num_comments!=1">s</tal:omit> 
    151155              </div> 
    152156            </li> 
  • siteapp/trunk/opengeo/almanac/templates/storyindex.pt

    r1845 r1864  
    111111 
    112112  <!-- comments --> 
    113   <div class="story-comments" tal:define="comments view/sorted_comments"> 
     113  <div class="story-comments" tal:define="comments view/sorted_comments; num_comments python:len(comments)"> 
    114114 
    115     <div id="comment-list-header" class="selfclear" tal:condition="python:len(comments) > 0"> 
    116       <h3><tal:count replace="python:len(comments)"/> Comment(s)</h3> 
     115    <div id="comment-list-header" class="selfclear" tal:condition="python:num_comments > 0"> 
     116      <h3><tal:count replace="num_comments"/> Comment<tal:omit condition="python:num_comments>1">s</tal:omit></h3> 
    117117      <a class="add-comment" tal:attributes="href string:${view/url}#commentform">Leave a Comment <span>&#8853;</span></a> 
    118118    </div><!-- end .comment-list-header --> 
    119119 
    120     <div class="story-comment" tal:repeat="comment comments"> 
     120    <div class="story-comment selfclear" tal:repeat="comment comments"> 
    121121      <div class="comment-meta"> 
    122122        <a class="comment-author" tal:condition="comment/website | nothing" tal:attributes="href comment/website"