Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
feat(News): Fix news tag not appear in index
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed May 31, 2019
1 parent b8ca4c4 commit 51dfebc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion apps/views/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@
<?= $can_manage_news ? "<a href=\"/news/edit?id={$new['id']}\"><i class=\"icon-pencil\"></i> Edit</a> &nbsp;<a href=\"/news/delete?id={$new['id']}\"><i class=\"icon-remove\"></i> Delete</a> &nbsp;" : '' ?>
<span class="text-muted"><?= $new['create_at'] ?></span>
</div>
<h4><a href="#new_<?= $new['id'] ?>" data-toggle="collapse"><?= $new['title'] ?></a></h4>
<h4>
<a href="#new_<?= $new['id'] ?>" data-toggle="collapse"><?= $new['title'] ?></a>
<?php if ($index == 0): ?>
<span class="label label-info">New</span>
<?php endif; ?>
<?php if ($new['force_read']): ?>
<span class="label label-warning">Important</span>
<?php endif; ?>
</h4>
</div>
<div class="item-content collapse<?= $index === 0 ? ' in' : '' ?>" id="new_<?= $new['id'] ?>">
<div class="text"><?= $this->batch($new['body'],'format_ubbcode'); ?></div>
Expand Down
4 changes: 2 additions & 2 deletions apps/views/news/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
<h4>
<a href="#new_<?= $new['id'] ?>"><?= $new['title'] ?></a>
<?php if (empty($search) && $i == 0): ?>
<span class="label label-info">New</span>&nbsp;
<span class="label label-info">New</span>
<?php endif; ?>
<?php if ($new['force_read']): ?>
<span class="label label-warning">Important</span>&nbsp;
<span class="label label-warning">Important</span>
<?php endif; ?>
</h4>
</div>
Expand Down

0 comments on commit 51dfebc

Please sign in to comment.