PageRenderTime 45ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/system/application/views/blog_comment/display.php

https://bitbucket.org/zhemel/cloudengine
PHP | 36 lines | 35 code | 1 blank | 0 comment | 5 complexity | 5dd4dc4a6efe5bba3ab3dd80bb57b74c MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, BSD-3-Clause
  1. <?php if(count($comments) > 0):?>
  2. <h2 id="comments"><?=t("Comments")?></h2>
  3. <?php foreach ($comments as $row):?>
  4. <div class="grid comment">
  5. <div class="c1of2">
  6. <?php if ($row->picture): ?>
  7. <img src="<?= base_url() ?>image/user_32/<?= $row->user_id ?>" alt="" />
  8. <?php else: ?>
  9. <img src="<?=base_url() ?>_design/avatar-default-32.jpg" alt="" />
  10. <?php endif; ?>
  11. </div>
  12. <div class="c2of2">
  13. <div class="comment-body">
  14. <h3><a href="<?= base_url() ?>user/view/<?= $row->id ?>"><?= $row->fullname ?></a> says...</h3>
  15. <?= $row->body ?>
  16. <p class="date-stamp"><?= date("j F Y", $row->timestamp) ?>
  17. <?php if ($admin): ?>
  18. <a href="<?= base_url() ?>blog/comment_edit/<?= $row->comment_id ?>" class="button" title="Edit this Comment">Edit</a>
  19. <?php endif; ?>
  20. </p>
  21. </div>
  22. </div>
  23. </div>
  24. <?php endforeach; ?>
  25. <?php endif; ?>
  26. <div class="grid">
  27. <a name="post"><h2 id="post-comment"><?=t("Post a comment")?></h2></a>
  28. <?php if ($this->auth_lib->is_logged_in()): ?>
  29. <?php $this->load->view('blog_comment/add'); ?>
  30. <?php else: ?>
  31. <p>
  32. <?=t("Please [link-log]log in[/link] to post a comment. [link-join]Register here[/link] if you haven't signed up yet.",
  33. array('[link-log]' => t_link('auth/login'), '[link-join]' => t_link('user/register')))?></p>
  34. <?php endif; ?>
  35. </div>