Definition at line 41 of file forum_view.inc.
◆ drawView()
ForumListView::drawView |
( |
| ) |
|
◆ formatLastPost()
ForumListView::formatLastPost |
( |
|
$item | ) |
|
Definition at line 89 of file forum_view.inc.
91 $lastPost = $item->LastPost();
92 if (!$lastPost)
return "<em>No posts</em>";
93 $user = $lastPost->Author();
96 $title = $lastPost->title ? $lastPost->title :
"No Title";
98 return "<a href='{$this->messageLink}?forum_id={$lastPost->forum_id}&topic_id={$lastPost->topic_id}'>{$title}</a><br/>".
99 "<span class='small'>by ".$userProfile.
" ({$lastPost->date_posted})</span>";
static formatUserProfile($u)
◆ formatTitle()
ForumListView::formatTitle |
( |
|
$item | ) |
|
Definition at line 79 of file forum_view.inc.
81 $text = $item->format(
"<a href='{$this->forumLink}?forum_id={forum_id}'>{title|No Title}</a>");
84 $text .=
"<br/><span class='small'>{$item->teaser}</span>";
◆ ForumListView()
ForumListView::ForumListView |
( |
|
$fora, |
|
|
|
$forumLink, |
|
|
|
$messageLink, |
|
|
|
$id = "forum_list" , |
|
|
|
$reorder = false |
|
) |
| |
Definition at line 50 of file forum_view.inc.
58 $this->table =
new DataListView(
$fora,
$id);
61 $this->table->column(
"Title", array($this,
formatTitle),
true,
"width: 40%")
62 ->column(
"Last Post", array($this,
formatLastPost),
true,
"width: 40%")
63 ->column(
"Topics",
"{topics}",
true,
"width: 10%;text-align: center")
64 ->column(
"Posts",
"{posts}",
true,
"width: 10%;text-align: center");
68 $this->table->enableDragReorder(
"/action/forum/reorder_forums");
73 $this->table->filter =
true;
76 $this->table->emptyMessage =
"No fora have been created";
static getValue($component, $name)
Retrieve the value of the specified Setting.
◆ writeScript()
ForumListView::writeScript |
( |
| ) |
|
Definition at line 103 of file forum_view.inc.
105 return $this->table->writeScript();
◆ $fora
◆ $forumLink
ForumListView::$forumLink |
◆ $id
◆ $messageLink
ForumListView::$messageLink |
◆ $reorder
◆ $table
The documentation for this class was generated from the following file: