<commit_before><?php use_helper('I18N', 'Date', 'rtText', 'rtGravatar') ?>

<style type="text/css">
  /* Slider */
  #rating               { margin: 0 10px; }
  
  /* Rating styling */
  .rt-rating            { display: inline-block; vertical-align: text-bottom; }
  
  .rt-rating-text       { display: none; }
  
  .rt-rating-graph, .rt-rating-graph div { height: 20px; background-image: url('/rtUserPlugin/img/rating.png'); background-position: 0 0; background-repeat: repeat-x; }
  .rt-rating-graph      { width: 100px; background-color: #CCC; }
   .rt-rating-graph div { background-color: #000; }
   
   .rt-metas .rt-rating-graph, .rt-metas .rt-rating-graph div { background-position: 0 -20px; height: 10px; }
   .rt-metas .rt-rating-graph { width: 50px; }
</style>

<?php $commenting = sfConfig::get('app_rt_comment_active', true) && sfConfig::get('app_rt_comment_active', true) ?>

<?php if ($commenting): ?><div class="rt-section rt-comments"><?php endif; ?>

<?php if(sfConfig::get('app_rt_comment_active', true) && count($comments) > 0): ?>

  <div class="rt-section-header">
    <h3><?php echo count($comments) . ' ' .  __('responses to') . ' "' . $title . '"' ?>
    <?php if($rating_enabled): ?>
      <?php include_partial('rtComment/rating', array('rating_value' => $parent_object->getOverallRating(), 'show_items' => array('text','graph'))) ?>
    <?php endif; ?>
    </h3>
  </div>

  <div class="rt-section-content">
    <ul class="rt-comments-list">
      <?php foreach($comments as $comment): ?>
        <li class="clearfix" id="comment-<?php echo $comment->getId() ?>">
          <?php echo gravatar_for($comment->getAuthorEmail(), sfConfig::get('app_rt_gravatar_size_medium', 64), sfConfig::get('app_rt_gravatar_default', 'mm'), sfConfig::get('app_rt_gravatar_rating', 'g')) ?>
          <div>
            <cite>
              <?php echo link_to_if(trim($comment->getAuthorWebsite()) !== '', $comment->getAuthorName(), $comment->getAuthorWebsite()) ?> 
            </cite>
            <small class="rt-metas">
              <?php echo __('Left On') ?> <a href="#comment-<?php echo $comment->getId() ?>" title=""><?php echo format_date($comment->getCreatedAt(), 'D', $sf_user->getCulture()) ?></a>
              <span class="rating"><?php if($rating_enabled): ?><?php include_partial('rtComment/rating', array('rating_value' => $comment->getRating(), 'show_items' => array('graph'))) ?><?php endif; ?></span>
            </small>
            <?php echo markdown_to_html_safe($comment->getContent()) ?>
          </div>
        </li>
      <?php endforeach; ?>
    </ul>
    <p class="rt-comment-tools"><a href="" target="_self"><span><?php echo __('Show more comments') ?></span><span style="display: none"><?php echo __('Show less comments') ?></span></a></p>
  </div>
    
<script type="text/javascript">
  $(function(){
    $('.rt-comments .rt-comments-list li:gt(1)').hide();
    $('.rt-comment-tools a').click(function(){
      event.preventDefault();    
      $(this).find('span').toggle();
      $('.rt-comments .rt-comments-list li:gt(1)').toggle();<commit_msg>Cleaned comment form in preperation for new layout changes<commit_after><?php use_helper('I18N', 'Date', 'rtText', 'rtGravatar') ?>

<?php $commenting = sfConfig::get('app_rt_comment_active', true) && sfConfig::get('app_rt_comment_active', true) ?>

<?php if ($commenting): ?><div class="rt-section rt-comments"><?php endif; ?>

<?php if(sfConfig::get('app_rt_comment_active', true) && count($comments) > 0): ?>

  <div class="rt-section-header">
    <h2><?php echo count($comments) . ' ' .  __('People Have Left a Comment') ?>
    <?php if($rating_enabled): ?>
      <?php include_partial('rtComment/rating', array('rating_value' => $parent_object->getOverallRating(), 'show_items' => array('text','graph'))) ?>
    <?php endif; ?>
    </h2>
  </div>

  <div class="rt-section-content rt-comments-list">
    <ul>
      <?php foreach($comments as $comment): ?>
        <li id="rt-comment-<?php echo $comment->getId() ?>">
          <?php echo gravatar_for($comment->getAuthorEmail(), sfConfig::get('app_rt_gravatar_size_medium', 64), sfConfig::get('app_rt_gravatar_default', 'mm'), sfConfig::get('app_rt_gravatar_rating', 'g')) ?>
          <div class="rt-comment-content">
            <cite class="rt-metas">
              <?php echo link_to_if(trim($comment->getAuthorWebsite()) !== '', $comment->getAuthorName(), $comment->getAuthorWebsite()) ?> <?php echo __('said') ?>
              ( <a href="#comment-<?php echo $comment->getId() ?>" title=""><?php echo format_date($comment->getCreatedAt(), 'D', $sf_user->getCulture()) ?></a>)
              <?php if($rating_enabled): ?>
                <span class="rating">, <?php echo __('Rating') ?>: <?php include_partial('rtComment/rating', array('rating_value' => $comment->getRating(), 'show_items' => array('graph'))) ?></span>
              <?php endif; ?>
            </cite>
            <?php echo markdown_to_html_safe($comment->getContent()) ?>
          </div>
        </li>
      <?php endforeach; ?>
    </ul>
    <p class="rt-comment-tools"><a href="" target="_self"><span><?php echo __('Show more comments') ?></span><span style="display: none"><?php echo __('Show fewer comments') ?></span></a></p>
  </div>
    
<script type="text/javascript">
  $(function(){

    // Only show the toggle button if needed.
    if($('.rt-comments-list li').size() < 3) { $('.rt-comment-tools a').hide(); }

    // Look for special cases, like when a hash link is present
    if(location.href.indexOf("#") == -1) {
      $('.rt-comments .rt-comments-list li:gt(1)').hide();
    } else {
      $('.rt-comment-tools span').toggle();
    }

    // Enable the onclick action
    $('.rt-comment-tools a').click(function(){
      event.preventDefault();  $(this).find('span').toggle(); $('.rt-comments .rt-comments-list li:gt(1)').toggle();
{'fraction_non_alphanumeric': 0.2170357751277683, 'fraction_numerical': 0.0068143100511073255, 'mean_word_length': 3.608320251177394, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 142, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7135169', 'n_tokens_mistral': 1902, 'n_tokens_neox': 1870, 'n_words': 375}