CMS  Version 3.9
library_link_list.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("link_library");
3 Fakoli::usingFeature("data_view");
4 
5 Fakoli::assertRole("admin,editor");
6 
7 $link_library_id = checkNumeric($_GET["link_library_id"]);
8 
10 $links = $library->Links("ORDER BY title, url");
11 
12 $table = new DataListView($links, "link_records");
13 $table->column("Link Title", "<a href='#' onclick='LinkLibraryManager.editLink({link_id})'>{title}</a>", true)
14 ->column("URL", "<a href='{url}' target='_blank'>{url}</a>", true)
15 ->column("Description", "{description:100}", true)
16 ->column("Published", "{published:Yes/No}", true, "text-align: center");
17 
18 $table->enableDragReorder("/action/link_library/reorder_links");
19 $table->dragText = "<span style='font-size: 10px'>Click and drag to reorder links</span>";
20 
21 $script .= $table->writeScript();
22 
23 $table->drawView();
static usingFeature()
Uses the specified framework feature(s).
Definition: core.inc:388
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
static assertRole($role, $redirect="", $message="")
Assert that the user has one of the specified roles.
Definition: core.inc:297