Projet

Général

Profil

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

root / drupal7 / sites / all / themes / adaptivetheme / at_core / templates / comment-wrapper.tpl.php @ 74f6bef0

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

    
46
  <?php if ($content['comments'] && $node->type != 'forum'): ?>
47
    <?php print render($title_prefix); ?>
48
    <h2 class="comment-title title"><?php print t('Comments'); ?></h2>
49
    <?php print render($title_suffix); ?>
50
  <?php endif; ?>
51

    
52
  <?php print render($content['comments']); ?>
53

    
54
  <?php if ($content['comment_form']): ?>
55
    <h2 class="comment-title title comment-form"><?php print t('Add new comment'); ?></h2>
56
    <?php print render($content['comment_form']); ?>
57
  <?php endif; ?>
58

    
59
</section>