Projet

Général

Profil

Paste
Télécharger (1,96 ko) Statistiques
| Branche: | Révision:

root / drupal7 / themes / bartik / templates / comment-wrapper.tpl.php @ 134c7813

1
<?php
2

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

    
44
  <?php print render($content['comments']); ?>
45

    
46
  <?php if ($content['comment_form']): ?>
47
    <h2 class="title comment-form"><?php print t('Add new comment'); ?></h2>
48
    <?php print render($content['comment_form']); ?>
49
  <?php endif; ?>
50
</div>