Projet

Général

Profil

Paste
Télécharger (2,31 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / corporateclean / comment-wrapper.tpl.php @ 87dbc3bf

1
<?php
2
// $Id: comment-wrapper.tpl.php,v 1.10 2010/05/05 06:41:22 webchick Exp $
3

    
4
/**
5
 * @file
6
 * Default theme implementation to provide an HTML container for comments.
7
 *
8
 * Available variables:
9
 * - $content: The array of content-related elements for the node. Use
10
 *   render($content) to print them all, or
11
 *   print a subset such as render($content['comment_form']).
12
 * - $classes: String of classes that can be used to style contextually through
13
 *   CSS. It can be manipulated through the variable $classes_array from
14
 *   preprocess functions. The default value has the following:
15
 *   - comment-wrapper: The current template type, i.e., "theming hook".
16
 * - $title_prefix (array): An array containing additional output populated by
17
 *   modules, intended to be displayed in front of the main title tag that
18
 *   appears in the template.
19
 * - $title_suffix (array): An array containing additional output populated by
20
 *   modules, intended to be displayed after the main title tag that appears in
21
 *   the template.
22
 *
23
 * The following variables are provided for contextual information.
24
 * - $node: Node object the comments are attached to.
25
 * The constants below the variables show the possible values and should be
26
 * used for comparison.
27
 * - $display_mode
28
 *   - COMMENT_MODE_FLAT
29
 *   - COMMENT_MODE_THREADED
30
 *
31
 * Other variables:
32
 * - $classes_array: Array of html class attribute values. It is flattened
33
 *   into a string within the variable $classes.
34
 *
35
 * @see template_preprocess_comment_wrapper()
36
 * @see theme_comment_wrapper()
37
 */
38
?>
39
<div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
40
  <?php if ($content['comments'] && $node->type != 'forum'): ?>
41

    
42
    <div id="comments-title">
43
    
44
        <div id="comments-title-left">
45
        <?php print render($title_prefix); ?>
46
        <h2 class="title"><?php print t('Comments'); ?></h2>
47
        <?php print render($title_suffix); ?>
48
        </div>
49
        
50
        <div id="comments-title-right">
51
        <span class="counter"><?php print $node->comment_count; ?></span>
52
        </div>
53

    
54
    </div>
55
    
56
  <?php endif; ?>
57

    
58
  <?php print render($content['comments']); ?>
59

    
60
  <?php if ($content['comment_form']): ?>
61
    <h2 class="title comment-form"><?php print t('Add new comment'); ?></h2>
62
    <?php print render($content['comment_form']); ?>
63
  <?php endif; ?>
64
</div>