* Remove ugly image border in gecko browser
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Sat, 15 Jul 2006 10:14:24 +0000 (10:14 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:34:59 +0000 (00:34 +0100)
* Use icon links for getting attachments

git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@104 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/misc.inc.php
banana/post.inc.php
css/banana.css
img/preview.gif [new file with mode: 0644]
img/save.gif [new file with mode: 0644]

index dfcae9e..d680293 100644 (file)
@@ -99,7 +99,7 @@ function makeHREF($params, $text = null, $popup = null, $class = null)
     if (isset($params['action']) && $params['action'] == 'view') {
         $target = ' target="_blank"';
     }
-    return '<a href="' . htmlentities($link) . $target . '"' . $popup . $class . '>' . $text . '</a>';
+    return '<a href="' . htmlentities($link) .'"' . $target . $popup . $class . '>' . $text . '</a>';
 }
 
 /** Format tree images links
index d50fc26..8d06e75 100644 (file)
@@ -455,17 +455,18 @@ class BananaPost
             $res .= '<tr><td colspan="2">';
             $i = 0;
             foreach ($this->pj as $file) {
-                $res .= $file['filename'].' ('.$file['MIME'].') : ';
-                $res .= makeHREF(Array('group' => $banana->state['group'],
-                                       'artid' => $this->id,
-                                       'pj'    => $i),
-                                 _b_('télécharger'));
-                $res .= ' . ';
-                $res .= makeHREF(Array('group' => $banana->state['group'],
-                                       'artid' => $this->id,
-                                       'pj'    => $i,
-                                       'action'=> 'view'),
-                                 _b_('aperçu'));
+                $res .= makeImgLink(Array('group' => $banana->state['group'],
+                                          'artid' => $this->id,
+                                          'pj'    => $i),
+                                    'save.gif',
+                                    _b_('Télécharger')) . ' ';
+                $res .= makeImgLink(Array('group' => $banana->state['group'],
+                                          'artid' => $this->id,
+                                          'pj'    => $i,
+                                          'action'=> 'view'),
+                                    'preview.gif',
+                                    _b_('Aperçu'));
+                $res .= ' ' . $file['filename'].' ('.$file['MIME'].')';
                 $res .=  '<br/>';
                 $i++;
             }
index cf1940b..b88a278 100644 (file)
@@ -34,6 +34,7 @@ div.foot {
 
 a:link, a:visited { color: #f60; background: transparent; }
 a:active, a:hover { color: #369; background: transparent; }
+a img { border: 0px; }
 
 hr { border: none; border-top: 1px dotted #a2c2e1; }
 
diff --git a/img/preview.gif b/img/preview.gif
new file mode 100644 (file)
index 0000000..8ca6167
Binary files /dev/null and b/img/preview.gif differ
diff --git a/img/save.gif b/img/save.gif
new file mode 100644 (file)
index 0000000..869ef32
Binary files /dev/null and b/img/save.gif differ