From d582054c77b22daeb08d2bff17794b9a69a20dd4 Mon Sep 17 00:00:00 2001 From: mensonge Date: Wed, 12 Dec 2007 16:29:16 +0000 Subject: import of scuttle 0.7.2 git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@1 b3834d28-1941-0410-a4f8-b48e95affb8f --- templates/bookmarks.tpl.php | 166 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 templates/bookmarks.tpl.php (limited to 'templates/bookmarks.tpl.php') diff --git a/templates/bookmarks.tpl.php b/templates/bookmarks.tpl.php new file mode 100644 index 0000000..368ec8b --- /dev/null +++ b/templates/bookmarks.tpl.php @@ -0,0 +1,166 @@ +getCurrentUserId(); +$this->includeTemplate($GLOBALS['top_include']); + +include('search.inc.php'); +if (count($bookmarks) > 0) { +?> + + + +

+ + / + / + + + +

+ + 0 ? ' start="'. ++$start .'"' : ''); ?> id="bookmarks"> + + '. filter($tag) .', '; + } + $cats = substr($cats, 0, -2); + if ($cats != '') { + $cats = ' to '. $cats; + } + + // Edit and delete links + $edit = ''; + if ($bookmarkservice->editAllowed($row['bId'])) { + $edit = ' - '. T_('Edit') .''; + } + + // User attribution + $copy = ''; + if (!isset($user) || isset($watched)) { + $copy = ' '. T_('by') .' '. $row['username'] .''; + } + + // Udders! + if (!isset($hash)) { + $others = $bookmarkservice->countOthers($row['bAddress']); + $ostart = ''; + $oend = ''; + switch ($others) { + case 0: + break; + case 1: + $copy .= sprintf(T_(' and %s1 other%s'), $ostart, $oend); + break; + default: + $copy .= sprintf(T_(' and %2$s%1$s others%3$s'), $others, $ostart, $oend); + } + } + + // Copy link + if ($userservice->isLoggedOn() && ($logged_on_userid != $row['uId'])) { + // Get the username of the current user + $currentUser = $userservice->getCurrentUser(); + $currentUsername = $currentUser[$userservice->getFieldName('username')]; + $copy .= ' - '. T_('Copy') .''; + } + + // Nofollow option + $rel = ''; + if ($GLOBALS['nofollow']) { + $rel = ' rel="nofollow"'; + } + + $address = filter($row['bAddress']); + + // Redirection option + if ($GLOBALS['useredir']) { + $address = $GLOBALS['url_redir'] . $address; + } + + // Output + echo '
  • '."\n"; + echo '\n"; + if ($row['bDescription'] != '') { + echo '
    '. filter($row['bDescription']) ."
    \n"; + } + echo '
    '. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."
    \n"; + echo "
  • \n"; + } + ?> + + + + '. T_('First') .''; + $bprev = ''. T_('Previous') .''; + } else { + $prev = $page - 1; + $prev = 'page='. $prev; + $start = ($page - 1) * $perpage; + $bfirst= ''. T_('First') .''; + $bprev = ''. T_('Previous') .''; + } + + // Next + $next = $page + 1; + $totalpages = ceil($total / $perpage); + if (count($bookmarks) < $perpage || $perpage * $page == $total) { + $bnext = ''. T_('Next') .''; + $blast = ''. T_('Last') .''; + } else { + $bnext = ''. T_('Next') .''; + $blast = ''. T_('Last') .''; + } + echo '

    '. $bfirst .' / '. $bprev .' / '. $bnext .' / '. $blast .' / '. sprintf(T_('Page %d of %d'), $page, $totalpages) .'

    '; +} else { +?> + +

    .

    + +includeTemplate('sidebar.tpl'); +$this->includeTemplate($GLOBALS['bottom_include']); +?> -- cgit v1.2.3-54-g00ecf