浏览代码

Allow plugins to add non-link text for attachments

pdontthink 4 年之前
父节点
当前提交
2e69989631
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      templates/default/read_attachments.tpl

+ 5 - 4
templates/default/read_attachments.tpl

@@ -81,10 +81,11 @@ if (count($attachments)==0) {
     }
     }
 
 
     foreach ($attachment['OtherLinks'] as $link) {
     foreach ($attachment['OtherLinks'] as $link) {
-        ?>
-    | 
-   <a href="<?php echo $link['HREF'] . '" ' . $link['Extra']; ?>><?php echo $link['Text']; ?></a>
-        <?php
+        echo '&nbsp;|&nbsp;';
+        if (empty($link['HREF']))
+            echo '<span ' . $link['Extra'] . '>' . $link['Text'] . '</span>';
+        else
+            echo '<a href="' . $link['HREF'] . '" ' . $link['Extra'] . '>' . $link['Text'] . '</a>';
     }
     }
    ?>
    ?>
    </small>
    </small>