1
0

Changing design to mostly tableless code.

This commit is contained in:
Stefan Frech
2008-05-30 21:11:07 +00:00
committed by Jonas Kattendick
parent df60ffea39
commit 91468a4bed
21 changed files with 733 additions and 970 deletions

View File

@@ -21,11 +21,10 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $
$tree = & new folder;
}
echo '<form name="bookmarks">' . "\n";
echo '<table cellspacing="0" style="width: 97%;">' . "\n";
echo '<form name="bookmarks" action="">' . "\n";
foreach ($bookmarks as $value) {
echo '<tr class="sh">' . "\n";
echo '<div class="bookmark">' . "\n";
# the folders, only needed when searching for bookmarks
if ($show_folder) {
@@ -46,28 +45,62 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $
echo "</td>\n";
}
# the checkbox and favicon section
echo "\t" . '<div class="bmleft">' . "\n";
# the checkbox
if ($show_checkbox){
# the checkbox, needed in any case
echo '<td class="ten">';
echo '<input type="checkbox" name="' . $value['id'] . '">';
echo "</td>\n";
echo "\t\t" . '<input class="link" type="checkbox" name="' . $value['id'] . '">' . "\n";
}
# the bookmark image if configured to be displayed
# the favicon
echo "\t\t";
if ($show_icon){
echo '<td class="ten">';
if ($value['favicon'] && is_file ($value['favicon'])) {
echo '<img src="' . $value['favicon'] . '" width="16" height="16">';
}
else {
echo $bookmark_image;
}
echo "</td>\n";
}
echo "\n\t</div>\n";
# the share, date and edit/move/delete icon section
echo "\t" . '<div class="bmright">' . "\n";
if ($show_share) {
$share = $value['public'] ? 'public' : 'private';
echo "\t\t" . '<span class="' . $share . '">' . $share . "</span>\n";
}
# the link if configured to be displayed
echo '<td>';
if ($show_date) {
echo "\t\t" . '<span class="date">';
echo date ($date_formats[$settings['date_format']], $value['timestamp']);
echo "\t</span>\n";
}
# the edit column
if ($show_edit) {
echo "\t\t" . '<a href="javascript:bookmarkedit(\'' . $value['id'] . '\')">';
echo sprintf ($edit_image, "Edit");
echo "</a>\n";
}
# the move column
if ($show_move) {
echo "\t\t" . '<a href="javascript:bookmarkmove(\'' . $value['id'] . '\', \'' . 'expand=' . implode (",", $expand) . '&amp;folderid=' . $folderid . '\')">';
echo sprintf ($move_image, "Move");
echo "</a>\n";
}
# the delete column
if ($show_delete) {
echo "\t\t" . '<a href="javascript:bookmarkdelete(\'' . $value['id'] . '\')">';
echo sprintf ($delete_image, "Delete");
echo "</a>\n";
}
echo "\t</div>\n";
# the link
if ($settings['open_new_window']) {
$target = ' target="_blank"';
}
@@ -81,58 +114,16 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $
else {
$link = $value['title'];
}
echo '<div>' . $link . "</div>\n";
echo "\t" . '<div class="link">' . $link . "</div>\n";
# the description if configured to be displayed and if not empty
# thanks to Tim Hogan <tlhogan22@yahoo.com>
# also display the public status here
# the description and if not empty
if ($show_desc && $value['description'] != "") {
echo '<div class="description">' . $value['description'] . "</div>\n";
}
echo "</td>\n";
if ($show_date) {
echo '<td class="ten">';
echo '<div class="date">'. date ($date_formats[$settings['date_format']], $value['timestamp']) .'</div>';
echo "</td>\n";
}
if ($show_share) {
echo '<td class="ten">';
$share = $value['public'] ? 'public' : 'private';
echo '<div class="'.$share.'">'.$share.'</div> ';
echo "</td>\n";
}
# the edit column if configured to be displayed
if ($show_edit) {
echo '<td class="ten">';
echo '<a href="javascript:bookmarkedit(\'' . $value['id'] . '\')">';
echo sprintf ($edit_image, "Edit");
echo "</a></td>\n";
}
# the move column if configured to be displayed
if ($show_move) {
echo '<td class="ten">';
echo '<a href="javascript:bookmarkmove(\'' . $value['id'] . '\', \'' . 'expand=' . implode (",", $expand) . '&folderid=' . $folderid . '\')">';
echo sprintf ($move_image, "Move");
echo "</a></td>\n";
}
# the delete column if configured to be displayed
if ($show_delete) {
echo '<td class="ten">';
echo '<a href="javascript:bookmarkdelete(\'' . $value['id'] . '\')">';
echo sprintf ($delete_image, "Delete");
echo "</a></td>\n";
}
echo "</tr>\n";
echo "</div>\n\n";
}
echo "</table></form>\n";
echo "</form>\n";
}
?>