root / drupal7 / sites / all / themes / responsive / templates / comment-wrapper.tpl.php @ 1f623f01
1 | cc7b6b59 | Julien Enselme | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * @file
|
||
4 | * touch theme implementation to wrap comments.
|
||
5 | *
|
||
6 | * Available variables:
|
||
7 | * - $content: The array of content-related elements for the node. Use
|
||
8 | * render($content) to print them all, or
|
||
9 | * print a subset such as render($content['comment_form']).
|
||
10 | * - $classes: String of classes that can be used to style contextually through
|
||
11 | * CSS. It can be manipulated through the variable $classes_array from
|
||
12 | * preprocess functions. The default value has the following:
|
||
13 | * - comment-wrapper: The current template type, i.e., "theming hook".
|
||
14 | *
|
||
15 | * The following variables are provided for contextual information.
|
||
16 | * - $node: Node object the comments are attached to.
|
||
17 | * The constants below the variables show the possible values and should be
|
||
18 | * used for comparison.
|
||
19 | * - $display_mode
|
||
20 | * - COMMENT_MODE_FLAT
|
||
21 | * - COMMENT_MODE_THREADED
|
||
22 | *
|
||
23 | * Other variables:
|
||
24 | * - $classes_array: Array of html class attribute values. It is flattened
|
||
25 | * into a string within the variable $classes.
|
||
26 | *
|
||
27 | * @see template_preprocess_comment_wrapper()
|
||
28 | * @see theme_comment_wrapper()
|
||
29 | */
|
||
30 | ?>
|
||
31 | <div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>> |
||
32 | <?php if ($content['comments'] && $node->type != 'forum'): ?> |
||
33 | <?php print render($title_prefix); ?> |
||
34 | <h2 class="title"><?php print t('Comments'); ?></h2> |
||
35 | <?php print render($title_suffix); ?> |
||
36 | <?php endif; ?> |
||
37 | |||
38 | <?php print render($content['comments']); ?> |
||
39 | |||
40 | <?php if ($content['comment_form']): ?> |
||
41 | <section id="comment-form-wrapper"> |
||
42 | <h2 class="title"><?php print t('Add new comment'); ?></h2> |
||
43 | <?php print render($content['comment_form']); ?> |
||
44 | </section> <!-- /#comment-form-wrapper --> |
||
45 | <?php endif; ?> |
||
46 | </div> <!-- /#comments --> |