Projet

Général

Profil

Paste
Télécharger (3,48 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / responsive / templates / comment.tpl.php @ fbb05e21

1
<?php
2
/**
3
 * @file
4
 * touch theme implementation for comments.
5
 *
6
 * Available variables:
7
 * - $author: Comment author. Can be link or plain text.
8
 * - $content: An array of comment items. Use render($content) to print them all, or
9
 *   print a subset such as render($content['field_example']). Use
10
 *   hide($content['field_example']) to temporarily suppress the printing of a
11
 *   given element.
12
 * - $created: Formatted date and time for when the comment was created.
13
 *   Preprocess functions can reformat it by calling format_date() with the
14
 *   desired parameters on the $comment->created variable.
15
 * - $changed: Formatted date and time for when the comment was last changed.
16
 *   Preprocess functions can reformat it by calling format_date() with the
17
 *   desired parameters on the $comment->changed variable.
18
 * - $new: New comment marker.
19
 * - $permalink: Comment permalink.
20
 * - $picture: Authors picture.
21
 * - $signature: Authors signature.
22
 * - $status: Comment status. Possible values are:
23
 *   comment-unpublished, comment-published or comment-preview.
24
 * - $title: Linked title.
25
 * - $classes: String of classes that can be used to style contextually through
26
 *   CSS. It can be manipulated through the variable $classes_array from
27
 *   preprocess functions. The default values can be one or more of the following:
28
 *   - comment: The current template type, i.e., "theming hook".
29
 *   - comment-by-anonymous: Comment by an unregistered user.
30
 *   - comment-by-node-author: Comment by the author of the parent node.
31
 *   - comment-preview: When previewing a new or edited comment.
32
 *   The following applies only to viewers who are registered users:
33
 *   - comment-unpublished: An unpublished comment visible only to administrators.
34
 *   - comment-by-viewer: Comment by the user currently viewing the page.
35
 *   - comment-new: New comment since last the visit.
36
 * - $title_prefix (array): An array containing additional output populated by
37
 *   modules, intended to be displayed in front of the main title tag that
38
 *   appears in the template.
39
 * - $title_suffix (array): An array containing additional output populated by
40
 *   modules, intended to be displayed after the main title tag that appears in
41
 *   the template.
42
 *
43
 * These two variables are provided for context:
44
 * - $comment: Full comment object.
45
 * - $node: Node object the comments are attached to.
46
 *
47
 * Other variables:
48
 * - $classes_array: Array of html class attribute values. It is flattened
49
 *   into a string within the variable $classes.
50
 *
51
 * @see template_preprocess()
52
 * @see template_preprocess_comment()
53
 * @see template_process()
54
 * @see theme_comment()
55
 */
56
?>
57
<div class="<?php print $classes . ' ' . $zebra; ?>"<?php print $attributes; ?>>
58
  
59
  <header>
60
    <?php print $picture ?>
61
    
62
    <?php print render($title_prefix); ?>
63
    <h3 class="comment-title"><?php print $title ?></h3>
64
    <?php print render($title_suffix); ?>
65
    
66
    <div class="submitted"><?php print $author; ?> - <?php print $created; ?></div>
67

    
68
    <?php if ($new): ?>
69
      <span class="new"><?php print $new ?></span>
70
    <?php endif; ?>
71
  </header><!-- /.header -->
72

    
73
  <div class="content"<?php print $content_attributes; ?>>
74
    <?php hide($content['links']); print render($content); ?>
75
    <?php if ($signature): ?>
76
    <div class="user-signature clearfix">
77
      <?php print $signature ?>
78
    </div>
79
    <?php endif; ?>
80
  </div>
81

    
82
  <?php if (!empty($content['links'])): ?>
83
    <footer>
84
      <?php print render($content['links']) ?>
85
    </footer>
86
  <?php endif; ?>
87
</div> <!-- /.comment -->