public function render($action = null, $layout = null, $file = null) { if (!file_exists(VIEWS . 'utags' . DS . $action . '.ctp')) { $file = App::pluginPath('tags') . 'views' . DS . 'tags' . DS . $action . '.ctp'; } return parent::render($action, $layout, $file); }
$plan = ''; $view = '<a class="btn-expired" href="' . $link . '">已经结束</a>'; } if (isset($share->slide) && !empty($share->slide)) { $slide = '<a class="tag-slide" href="' . $link . '">PDF</a>'; } else { $slide = ''; } if (empty($share->description)) { $desc = '讲师太懒还没有写内容简介...'; } else { $desc = Core::safeSubstr(htmlspecialchars($share->description), 0, 80) . '...'; } $lecturerOrg = UserHelper::getUserOrg($lecturer); $avatar = '<img style="width:24px;border-radius:12px; vertical-align:-6px; margin:0 8px 0 0;" src="' . NewBambooHelper::getAvatarByLogin($lecturer->login) . '" />'; $tags = TagsController::getTagsForShare($share->id); $tagHtml = ''; if (count($tags) > 0) { $tagHtml = '<ul>'; foreach ($tags as $tag) { $tagHtml .= '<li><a href="/share/tag/' . $tag->id . '">' . htmlspecialchars($tag->name) . '</a></li>'; } $tagHtml .= '</ul>'; } echo ' <article class="item-card"> <header> <p class="exchange-guest"><strong>' . $lecturer->name . '</strong> @' . $lecturerOrg . '</p> <h3><a href="/share/default/' . $share->id . '">' . htmlspecialchars($share->title) . '</a></h3> ' . $plan . $slide . ' </header>