Blame view

frontend/views/blog/view.php 2.41 KB
4ca21c3e   Alexey Boroda   first commit
1
  <?php
dec8b5ed   Alexey Boroda   Changes:
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
      
      /**
       * @var Blog $model
       * @var View $this
       */
      use common\models\Blog;
      use common\models\Comments;
      use common\modules\comment\widgets\CommentWidget;
      use yii\helpers\Url;
      use yii\web\View;
      
      $this->title = $model->title;
      
      $this->params[ 'breadcrumbs' ][] = [
          'label' => 'Блог',
          'url'   => Url::to([ '/blog' ]),
      ];
      $this->params[ 'breadcrumbs' ][] = $this->title;
4ca21c3e   Alexey Boroda   first commit
20
21
22
23
24
25
26
  
  ?>
  
  
  <div class="col-md-12">
      <div class="blog_post2">
          <div class="title"><?php echo $model->title; ?></div>
dec8b5ed   Alexey Boroda   Changes:
27
28
29
30
31
32
33
34
35
36
37
38
39
          <div class="tags">
              <?php foreach($model->categories as $category) { ?>
              <span class="blog_tag">
                              <a href="<?php
                                  echo Url::to([
                                      '/blog/category',
                                      'id' => $category->id,
                                  ]);
                              ?>"><?php echo $category->name; ?></a>
              </span>
              <?php } ?>
              <span class="date"><?php
                      echo \Yii::t('app', date('F', $model->date)), ' ', date('d, Y', $model->date);
4ca21c3e   Alexey Boroda   first commit
40
41
42
                  ?></span>
          </div>
          <div class="text-blog">
dec8b5ed   Alexey Boroda   Changes:
43
              <?php echo $model->body; ?>
4ca21c3e   Alexey Boroda   first commit
44
45
          </div>
          <ul class="shares-blog">
391c98b4   Alexey Boroda   -Added social but...
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
              <li><a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=<?php
                      echo Url::to([
                          'blog/view',
                          'id' => $model->id,
                      ], true);
                  ?>" class="fb"></a></li>
              <li><a target="_blank" href="http://pinterest.com/pin/create/button/?url=<?php
                      echo Url::to([
                          'blog/view',
                          'id' => $model->id,
                      ], true);
                  ?>" class="ptst"></a></li>
              <li><a target="_blank" href="https://plus.google.com/share?url=<?php
                      echo Url::to([
                          'blog/view',
                          'id' => $model->id,
                      ], true);
                  ?>" class="gpl"></a></li>
              <li><a target="_blank" href="http://vk.com/share.php?url=<?php
                      echo Url::to([
                          'blog/view',
                          'id' => $model->id,
                      ], true);
                  ?>" class="vk"></a></li>
4ca21c3e   Alexey Boroda   first commit
70
71
72
          </ul>
      </div>
  </div>