|
1 | 1 | <div class="row">
|
2 | 2 | <div class="col-md-10">
|
3 |
| - <small> |
4 |
| - <ul class="breadcrumb"> |
5 |
| - <li>{{ HTML::link('forum', 'Forums') }}</li> |
6 |
| - <li>{{ HTML::link('forum/category/view/'. $board->category->id, $board->category->name) }}</li> |
7 |
| - @if ($board->parent != null) |
8 |
| - <li>{{ HTML::link('forum/board/view/'. $board->parent->id, $board->parent->name) }}</li> |
9 |
| - @endif |
10 |
| - <li class="active"> |
11 |
| - {{ $board->name }} |
12 |
| - @if (count($posts) == 30 || isset($_GET['page'])) |
13 |
| - <?php |
14 |
| - if (isset($_GET['page'])) { |
15 |
| - $page = $_GET['page']; |
16 |
| - } else { |
17 |
| - $page = 1; |
18 |
| - } |
19 |
| - ?> |
20 |
| - : Page {{ $page }} |
21 |
| - @endif |
22 |
| - </li> |
23 |
| - <li class="pull-right"> |
24 |
| - {{ HTML::link('/forum/post/add/'. $board->id, 'Add Post') }} |
25 |
| - </li> |
26 |
| - </ul> |
27 |
| - </small> |
| 3 | + @include('forum.board.components.breadcrumbs') |
28 | 4 | @if (count($board->children) > 0)
|
29 |
| - <div class="well"> |
30 |
| - <div class="well-title">Child Boards</div> |
31 |
| - @foreach ($board->children as $child) |
32 |
| - <table style="width: 100%;"> |
33 |
| - <tbody> |
34 |
| - <tr> |
35 |
| - <td class="middle" style="width: 65px;" rowpsan="3"> |
36 |
| - @if (Auth::user()->checkUnreadBoard($child->id)) |
37 |
| - {{ HTML::image('img/forum/on.png', null, array('style' => 'width: 30px')) }} |
38 |
| - @else |
39 |
| - {{ HTML::image('img/forum/off.png', null, array('style' => 'width: 30px')) }} |
40 |
| - @endif |
41 |
| - </td> |
42 |
| - <td class="boardLink" rowpsan="3"> |
43 |
| - <table> |
44 |
| - <tbody> |
45 |
| - <tr> |
46 |
| - <td>{{ HTML::link('forum/board/view/'. $child->id, $child->name) }}</td> |
47 |
| - </tr> |
48 |
| - </tbody> |
49 |
| - </table> |
50 |
| - </td> |
51 |
| - <td class="middle" style="width: 100px;"> |
52 |
| - <table class="main no_border"> |
53 |
| - <tbody> |
54 |
| - <tr> |
55 |
| - <td>{{ $child->postsCount .' '. Str::plural('Post', $child->postsCount) }}</td> |
56 |
| - </tr> |
57 |
| - <tr> |
58 |
| - <td>{{ $child->repliesCount .' '. Str::plural('Reply', $child->repliesCount) }}</td> |
59 |
| - </tr> |
60 |
| - </tbody> |
61 |
| - </table> |
62 |
| - </td> |
63 |
| - <td style="width: 200px;"> |
64 |
| - @if ($child->lastUpdate !== false) |
65 |
| - <?php |
66 |
| - $lastUpdateType = $child->lastUpdate->type->keyName; |
67 |
| - $lastUpdateUser = ($child->lastUpdate->morph_id == null || $lastUpdateType == 'application' |
68 |
| - ? $child->lastUpdate->author : $child->lastUpdate->morph); |
69 |
| - $lastUpdateName = ($lastUpdateUser instanceof User ? $lastUpdateUser->username : $lastUpdateUser->name); |
70 |
| - ?> |
71 |
| - <small> |
72 |
| - <table> |
73 |
| - <tbody> |
74 |
| - <tr> |
75 |
| - <td>Last Post by {{ HTML::link('/user/view/'. $child->lastUpdate->author->id, $lastUpdateName) }}</td> |
76 |
| - </tr> |
77 |
| - <tr> |
78 |
| - <td>in {{ HTML::link('forum/post/view/'. $child->lastPost->uniqueId .'#reply:'. $child->lastUpdate->id, $child->lastUpdate->name) }}</td> |
79 |
| - </tr> |
80 |
| - <tr> |
81 |
| - <td>on {{ $child->lastUpdate->created_at }}</td> |
82 |
| - </tr> |
83 |
| - </tbody> |
84 |
| - </table> |
85 |
| - </small> |
86 |
| - @else |
87 |
| - <small> |
88 |
| - No posts. |
89 |
| - </small> |
90 |
| - @endif |
91 |
| - </td> |
92 |
| - </tr> |
93 |
| - </tbody> |
94 |
| - </table> |
95 |
| - <hr /> |
96 |
| - @endforeach |
| 5 | + <div class="panel panel-default"> |
| 6 | + <div class="panel-heading">Child Boards</div> |
| 7 | + <ul class="forum"> |
| 8 | + @foreach ($board->children as $child) |
| 9 | + @include('forum.category.components.board', array('board' => $child)) |
| 10 | + @endforeach |
| 11 | + </ul> |
97 | 12 | </div>
|
98 | 13 | @endif
|
99 | 14 | <div class="panel panel-default">
|
|
111 | 26 | <ul class="forum">
|
112 | 27 | @if (count($announcements) > 0)
|
113 | 28 | @foreach ($announcements as $announcement)
|
114 |
| - <li class="{{ $announcement->classes }}"> |
115 |
| - <div class="post"> |
116 |
| - <div class="subject"> |
117 |
| - {{ $announcement->link }} |
118 |
| - <br /> |
119 |
| - {{ $announcement->startedBy }} |
120 |
| - </div> |
121 |
| - <div class="replies"> |
122 |
| - {{ $announcement->repliesBlock }} |
123 |
| - </div> |
124 |
| - <div class="lastPost"> |
125 |
| - {{ $announcement->lastPostBlock }} |
126 |
| - </div> |
127 |
| - <div class="clearfix"></div> |
128 |
| - </div> |
129 |
| - </li> |
| 29 | + @include('forum.board.components.post', array('post' => $announcement)) |
130 | 30 | @endforeach
|
131 | 31 | @endif
|
132 | 32 | @if (count($posts) > 0)
|
133 | 33 | @foreach ($posts as $post)
|
134 |
| - <li class="{{ $post->classes }}"> |
135 |
| - <div class="post"> |
136 |
| - <div class="subject"> |
137 |
| - {{ $post->link }} |
138 |
| - <br /> |
139 |
| - {{ $post->startedBy }} |
140 |
| - </div> |
141 |
| - <div class="replies"> |
142 |
| - {{ $post->repliesBlock }} |
143 |
| - </div> |
144 |
| - <div class="lastPost"> |
145 |
| - {{ $post->lastPostBlock }} |
146 |
| - </div> |
147 |
| - <div class="clearfix"></div> |
148 |
| - </div> |
149 |
| - </li> |
| 34 | + @include('forum.board.components.post', array('post' => $post)) |
150 | 35 | @endforeach
|
151 | 36 | @endif
|
152 | 37 | </ul>
|
|
156 | 41 | @endif
|
157 | 42 | </div>
|
158 | 43 | </div>
|
159 |
| - <small> |
160 |
| - <ul class="breadcrumb"> |
161 |
| - <li>{{ HTML::link('forum', 'Forums') }}</li> |
162 |
| - <li>{{ HTML::link('forum/category/view/'. $board->category->id, $board->category->name) }}</li> |
163 |
| - <li class="active"> |
164 |
| - {{ $board->name }} |
165 |
| - @if (count($posts) == 30 || isset($_GET['page'])) |
166 |
| - <?php |
167 |
| - if (isset($_GET['page'])) { |
168 |
| - $page = $_GET['page']; |
169 |
| - } else { |
170 |
| - $page = 1; |
171 |
| - } |
172 |
| - ?> |
173 |
| - : Page {{ $page }} |
174 |
| - @endif |
175 |
| - </li> |
176 |
| - <li class="pull-right"> |
177 |
| - {{ HTML::link('/forum/post/add/'. $board->id, 'Add Post') }} |
178 |
| - </li> |
179 |
| - </ul> |
180 |
| - </small> |
| 44 | + @include('forum.board.components.breadcrumbs') |
181 | 45 | </div>
|
182 | 46 | <div class="col-md-2">
|
183 | 47 | <div class="well">
|
|
0 commit comments