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
9
$library
=
new
LinkLibrary
(
$link_library_id
);
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();
Fakoli\usingFeature
static usingFeature()
Uses the specified framework feature(s).
Definition:
core.inc:388
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
Fakoli\assertRole
static assertRole($role, $redirect="", $message="")
Assert that the user has one of the specified roles.
Definition:
core.inc:297
LinkLibrary
Definition:
link_library.inc:41
$link_library_id
$link_library_id
Definition:
library_link_list.inc:7
$links
$links
Definition:
library_link_list.inc:10
$table
$table
Definition:
library_link_list.inc:12
$script
$script
Definition:
library_link_list.inc:21
$library
$library
Definition:
library_link_list.inc:9
code
cms.sonjara.com
cms
components
link_library
handlers
library_link_list.inc
Generated on Tue Mar 23 2021 15:36:13 for CMS by
1.9.1