Projet

Général

Profil

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

root / drupal7 / sites / all / modules / advanced_forum / styles / naked / advanced-forum.naked.post-preview.tpl.php @ 13c3c9b4

1
<?php
2

    
3
/**
4
 * @file
5
 * Theme implementation: Template the preview version of a post.
6
 *
7
 * All variables available in node.tpl.php and comment.tpl.php for your theme
8
 * are available here. In addition, Advanced Forum makes available the following
9
 * variables:
10
 *
11
 * - $top_post: TRUE if we are formatting the main post (ie, not a comment)
12
 * - $reply_link: Text link / button to reply to topic.
13
 * - $total_posts: Number of posts in topic (not counting first post).
14
 * - $new_posts: Number of new posts in topic, and link to first new.
15
 * - $links_array: Unformatted array of links.
16
 * - $account: User object of the post author.
17
 * - $name: User name of post author.
18
 * - $author_pane: Entire contents of advanced_forum-author-pane.tpl.php.
19
 */
20
?>
21

    
22
<?php if ($top_post): ?>
23
  <a id="forum-topic-top"></a>
24
<?php else: ?>
25
  <a id="forum-reply-preview"></a>
26
<?php endif; ?>
27

    
28
<div id="<?php print $post_id; ?>" class="<?php print $classes; ?>" <?php print $attributes; ?>>
29
  <div class="forum-post-info clearfix">
30
    <div class="forum-posted-on">
31
      <?php print $date ?>
32

    
33
      <?php if (!$top_post): ?>
34
        <?php if (!empty($first_new)): ?>
35
          <?php print $first_new; ?>
36
        <?php endif; ?>
37
        <?php if  (!empty($new_output)): ?>
38
          <?php print $new_output; ?>
39
        <?php endif; ?>
40
      <?php endif; ?>
41
    </div>
42

    
43
    <?php if (!$top_post && !empty($comment_link) && !empty($page_link)): ?>
44
      <span class="forum-post-number"><?php print $comment_link . ' ' . $page_link; ?></span>
45
    <?php endif; ?>
46
  </div>
47

    
48
  <div class="forum-post-wrapper">
49
    <div class="forum-post-panel-sub">
50
      <?php print $author_pane; ?>
51
    </div>
52

    
53
    <div class="forum-post-panel-main clearfix">
54
      <?php if ($title): ?>
55
        <div class="post-title">
56
          <?php print $title ?>
57
        </div>
58
      <?php endif; ?>
59

    
60
      <div class="forum-post-content">
61
        <?php
62
          // @codingStandardsIgnoreStart
63
          // We hide the comments and links now so that we can render them later.
64
          hide($content['taxonomy_forums']);
65
          hide($content['comments']);
66
          if (!$top_post)
67
            hide($content['body']);
68
          hide($content['links']);
69
          print render($content);
70
          // @codingStandardsIgnoreEnd
71
        ?>
72
      </div>
73

    
74
      <?php if (!empty($signature)): ?>
75
        <div class="author-signature">
76
          <?php print $signature ?>
77
        </div>
78
      <?php endif; ?>
79
    </div>
80
  </div>
81

    
82
        <div class="forum-post-footer clear-block">
83
    <?php /* Purposely empty on preview just to keep the structure intact. */ ?>
84
  </div>
85
</div>