]> projects.mako.cc - scuttle/blobdiff - templates/bookmarks.tpl.php
Merge branch 'master' of https://github.com/underhilllabs/scuttle
[scuttle] / templates / bookmarks.tpl.php
index 368ec8b87ebcf1da90c3562beda37b85910a47fc..a53559074d03f57f9a69358a7b52dabd3113d601 100644 (file)
@@ -1,31 +1,22 @@
 <?php
 <?php
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice     =& ServiceFactory::getServiceInstance('UserService');
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 
 $logged_on_userid = $userservice->getCurrentUserId();
 $this->includeTemplate($GLOBALS['top_include']);
 
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 
 $logged_on_userid = $userservice->getCurrentUserId();
 $this->includeTemplate($GLOBALS['top_include']);
 
-include('search.inc.php');
+include 'search.inc.php';
 if (count($bookmarks) > 0) {
 ?>
 
 if (count($bookmarks) > 0) {
 ?>
 
-<script type="text/javascript">
-window.onload = playerLoad;
-</script>
-
 <p id="sort">
 <p id="sort">
-    <?php echo T_("Sort by:"); ?>
-    <a href="?sort=date_desc"><?php echo T_("Date"); ?></a><span> / </span>
-    <a href="?sort=title_asc"><?php echo T_("Title"); ?></a><span> / </span>
-    <?php
-    if (!isset($hash)) {
-    ?>
+  <?php echo T_("Sort by:"); ?>
+  <a href="?sort=date_desc"><?php echo T_("Date"); ?></a><span> / </span>
+  <a href="?sort=title_asc"><?php echo T_("Title"); ?></a><span> / </span>
+  <?php if (!isset($hash)): ?>
     <a href="?sort=url_asc"><?php echo T_("URL"); ?></a>
     <a href="?sort=url_asc"><?php echo T_("URL"); ?></a>
-    <?php
-    }
-    ?>
+  <?php endif; ?>
 </p>
 </p>
-
 <ol<?php echo ($start > 0 ? ' start="'. ++$start .'"' : ''); ?> id="bookmarks">
 
     <?php
 <ol<?php echo ($start > 0 ? ' start="'. ++$start .'"' : ''); ?> id="bookmarks">
 
     <?php
@@ -109,7 +100,11 @@ window.onload = playerLoad;
         if ($row['bDescription'] != '') {
             echo '<div class="description">'. filter($row['bDescription']) ."</div>\n";
         }
         if ($row['bDescription'] != '') {
             echo '<div class="description">'. filter($row['bDescription']) ."</div>\n";
         }
-        echo '<div class="meta">'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."</div>\n";
+        if ($row['bDatetime'] == $row['bModified']) {
+            echo '<div class="meta">'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."</div>\n";
+        } else {
+            echo '<div class="meta"><span id="date-updated">updated: '. date($GLOBALS['shortdate'], strtotime($row['bModified'])) . '</span>, <span id="date-original">original: '. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . "</span>" . $cats . $copy . $edit ."</div>\n";
+        }
         echo "</li>\n";
     }
     ?>
         echo "</li>\n";
     }
     ?>

Benjamin Mako Hill || Want to submit a patch?