Explorar o código

Add horizontal rule template and update line break to handle attributes

pdontthink %!s(int64=17) %!d(string=hai) anos
pai
achega
8e2014c6bb
Modificáronse 2 ficheiros con 39 adicións e 2 borrados
  1. 28 0
      templates/default/horizontal_rule.tpl
  2. 11 2
      templates/default/line_break.tpl

+ 28 - 0
templates/default/horizontal_rule.tpl

@@ -0,0 +1,28 @@
+<?php
+
+/**
+  * horizontal_rule.tpl
+  *
+  * Template for constructing a horizontal rule.
+  *
+  * The following variables are available in this template:
+  *
+  * array $aAttribs Any extra attributes: an associative array, where
+  *                 keys are attribute names, and values (which are
+  *                 optional and might be null) should be placed
+  *                 in double quotes as attribute values (optional;
+  *                 may not be present)
+  *
+  * @copyright &copy; 1999-2008 The SquirrelMail Project Team
+  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+  * @version $Id$
+  * @package squirrelmail
+  * @subpackage templates
+  */
+
+
+echo '<hr'; 
+foreach ($aAttribs as $key => $value) {
+    echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"');
+}
+echo ' />';

+ 11 - 2
templates/default/line_break.tpl

@@ -6,7 +6,12 @@
   * Template for constructing a line break.
   *
   * The following variables are available in this template:
-  *      (none)
+  *
+  * array $aAttribs Any extra attributes: an associative array, where
+  *                 keys are attribute names, and values (which are
+  *                 optional and might be null) should be placed
+  *                 in double quotes as attribute values (optional;
+  *                 may not be present)
   *
   * @copyright &copy; 1999-2008 The SquirrelMail Project Team
   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -16,4 +21,8 @@
   */
 
 
-?><br />
+echo '<br';
+foreach ($aAttribs as $key => $value) {
+    echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"');
+}
+echo ' />';