Pastie: Improve formatting of recent pastes
authorBen Klang <ben@alkaloid.net>
Tue, 18 May 2010 03:21:38 +0000 (23:21 -0400)
committerBen Klang <ben@alkaloid.net>
Tue, 18 May 2010 03:21:38 +0000 (23:21 -0400)
pastie/templates/paste.inc
pastie/templates/recent.inc
pastie/themes/screen.css

index 2097b1c..0209d88 100644 (file)
@@ -1,4 +1,4 @@
-<?php
-require_once PASTIE_TEMPLATES . '/recent.inc';
-echo '<br style="clear:both;">';
-$form->renderActive(null, null, $url, 'post');
\ No newline at end of file
+<?php require_once PASTIE_TEMPLATES . '/recent.inc'; ?>
+<div class="pasteForm">
+<?php $form->renderActive(null, null, $url, 'post'); ?>
+</div>
index a220e77..d7c7f72 100644 (file)
@@ -4,7 +4,11 @@ $uuid = Horde::applicationUrl('uuid');
 <div id="recentPastes">
 <h2>Recent Pastings</h2>
 <hr>
-<?php foreach ($recent as $r) { ?>
+<?php foreach ($recent as $r) {
+          if (empty($r['title'])) {
+              $r['title'] = _("[Untitled]");
+          }
+?>
     <div class="recentPaste">
         <span class="pasteTitle"><a href="<?php echo $uuid . '/' . $r['uuid']; ?>"><?php echo $r['title']; ?></a></span><br>
         <span class="pasteAuthor"><?php echo $r['owner']; ?></span> |
@@ -13,4 +17,4 @@ $uuid = Horde::applicationUrl('uuid');
     </div>
     <hr>
 <?php } ?>
-</div>
\ No newline at end of file
+</div>
index f993e98..ebb34bd 100644 (file)
     border: 1px solid #c00;
     background-color: #ddd;
     list-style-position: inside;
-}
\ No newline at end of file
+}
+
+.pasteForm {
+    float: right;
+    width: 75%;
+    margin: 10px;
+    border: 1px solid #ccc;
+}