Changeset 10

Show
Ignore:
Timestamp:
06/16/06 17:50:00 (2 years ago)
Author:
francois
Message:

better form for comments, and link to comments at the bottom of a snippet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/apps/snippets/modules/sidebar/templates/_listAll.php

    r7 r10  
    1818<?php foreach($comments as $comment): ?> 
    1919  <li> 
    20     on <?php echo link_to($comment->getSnippetSnippet()->getTitle(), 'snippet/show?id='.$comment->getSnippetId()) ?> by <?php echo $comment->getSnippetUser() ?> (<?php echo format_date($comment->getCreatedAt()) ?>) 
     20    on <?php echo link_to($comment->getSnippetSnippet()->getTitle(), 'snippet/show?id='.$comment->getSnippetId().'#comments') ?> by <?php echo $comment->getSnippetUser() ?> (<?php echo format_date($comment->getCreatedAt()) ?>) 
    2121  </li>   
    2222<?php endforeach; ?> 
  • trunk/apps/snippets/modules/snippet/templates/_snippet.php

    r2 r10  
    3232  <?php endif; ?> 
    3333 
    34   <?php $nb_comments = $snippet->getNbComments(); if($nb_comments > 0): ?> 
    35     <span style="white-space:nowrap">(<?php echo $nb_comments ?> comment<?php echo $nb_comments > 1 ? 's' : '' ?>)</span> 
     34  <?php $nb_comments = $snippet->getNbComments(); if($nb_comments > 0 && $sf_context->getActionName() != 'show'): ?> 
     35    <span style="white-space:nowrap"><?php echo link_to('('.$nb_comments.' comment'.($nb_comments > 1 ? 's)' : ')'), 'snippet/show?id='.$snippet->getId().'#comments') ?></span> 
    3636  <?php endif; ?> 
    3737 
  • trunk/apps/snippets/modules/snippet/templates/showSuccess.php

    r2 r10  
    2727        Posting as <?php echo $sf_user->getUserName() ?> 
    2828        <div class="field"> 
    29           <?php echo textarea_tag('body', '', 'rows=15 style=width:400px') ?> 
     29          <?php echo textarea_tag('body', '', 'rows=15 style=width:100%') ?> 
    3030        </div> 
    3131