19 $table =
new DataListView(
$libraries,
"libraries");
21 ->column(
"Owner",
"{getOwnerName()}",
true,
"width: 30%")
22 ->column(
"# Links",
"{countLinks()}",
true,
"width: 15%;text-align: right");
27 $table->emptyMessage =
"No Link Libraries have been created.";
34 return $library->format(
"<a href='/link_library_form?link_library_id={link_library_id}'>{name}</a>{description}");
39 return $this->table->writeScript();
44 $this->table->drawView();
57 return $library->format(
"<a href='/admin/link_library_form?link_library_id={link_library_id}'>{name}</a>{description}");
72 $this->links = $this->library->Links(
"WHERE published=1 ORDER BY sort_order, title, url");
75 $this->facetManager =
new FacetManager(
'facet_manager', $this->view);
108 $table =
new DataListView($this->links,
"library_link_list");
109 $table->column(
"Link", array($this,
formatLinkTitle),
true,
"width: 40%", String,
null,
"{title:lower}")
110 ->column(
"Description",
"{description}",
true,
"width: 40%");
114 $table->emptyMessage =
"No links have been added to this library.";
118 $table->writeIdTag =
true;
125 if(checkRole($this->library->write_access))
127 $details_icon =
"icon_edit.png";
128 $fn =
"LinkLibraryManager.editLink";
129 $details_link =
"<a href=\"#\" onclick=\"LinkLibraryManager.editLink({link_id}); return false;\"><img src=\"/fakoli/images/{$details_icon}\" style=\"border: none;display: inline-block;vertical-align: middle;padding-right: 4px\"></a>\n";
132 if(checkRole($this->library->write_access))
134 $delete_link .=
"<a href=\"#\" onclick=\"LinkLibraryManager.deleteLink({link_id}); return false;\"><img alt=\"delete\" src=\"/fakoli/images/icon_delete_trash.png\"></a>\n";
137 return $link->format(
"<span class='document_title'>{title}</span><br/><img style='display:inline-block;vertical-align: middle' src='/fakoli/images/file_icon.png' alt='External Link'/> <a target = '_new' href='{url}'> View Web Page </a><span style='display: inline-block'> {$details_link} {$delete_link}</span>");
144 $script .= $this->facetManager->writeScript();
145 $script .= $this->view->writeScript();
147 $this->facetManager->drawForm();
148 $this->view->drawView();
155 if(!checkRole(
"admin") && !checkRole($this->library->upload_files))
160 echo
"<div id='document_library_button_row'>\n";
161 if (checkRole($this->library->upload_files))
163 echo
"<button id='upload' class='button' onclick='LinkLibraryManager.addLink({$this->library->link_library_id});'>Add a Link...</button>\n";
179 $list =
new PagedList($this->links,
"library_links",
"{LinkLibraryManager::formatLink}");
180 $list->pageSize = 20;
181 $list->emptyList =
"No links have been added to this library";
190 $script .= $this->view->writeScript();
191 $this->view->drawList();
if(! $document_library_id) $library
AdminLinkLibraryListView($libraries)
formatTitleLink($library)
LinkLibraryListView($libraries)
formatTitleLink($library)
This class maps the publication table.
static getValue($component, $name)
Retrieve the value of the specified Setting.
static addFacets($manager, $classes, $dropdown=true, $max_width="200px", $width="200px", $height="120px")