Code

Added templates for the distribution lists
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Oct 2010 10:31:53 +0000 (10:31 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 11 Oct 2010 10:31:53 +0000 (10:31 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19972 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/admin/ogroups/DistributionList/class_DistributionList.inc
gosa-plugins/groupware/admin/ogroups/DistributionList/generic.tpl [new file with mode: 0644]
gosa-plugins/groupware/admin/ogroups/DistributionList/initFailed.tpl [new file with mode: 0644]

index 36a4381ec1e447ec4f4fb6825438952f7f576ac7..642ab2f3be0ba87bd727791cee5c462300aaaa18 100644 (file)
@@ -9,6 +9,9 @@ class DistributionList extends plugin
 
     public $view_logged = FALSE;
 
+    public $attributes = array('primaryMailAddress','alternateAddresses','memberList');
+
+
     function __construct($config, $dn, $attrs = NULL)
     {
         plugin::plugin($config, $dn, $attrs);
@@ -125,7 +128,12 @@ class DistributionList extends plugin
                 return ($display);
             }
         }
-        return($display);
+
+        // Generate HTML output
+        $smarty = get_smarty();
+        $smarty->assign('rpcError' , $this->rpcError);
+        $smarty->assign('rpcErrorMessage' , $this->rpcErrorMessage);
+        return($display.$smarty->fetch(get_template_path('DistributionList/generic.tpl', TRUE)));
     }
 
 
diff --git a/gosa-plugins/groupware/admin/ogroups/DistributionList/generic.tpl b/gosa-plugins/groupware/admin/ogroups/DistributionList/generic.tpl
new file mode 100644 (file)
index 0000000..1279dbb
--- /dev/null
@@ -0,0 +1,34 @@
+<h3>{t}Groupware{/t}</h3>
+
+<table summary="{t}Groupware{/t}">
+    <tr>
+        <td style='width:50%; vertical-align: top;' class='right-border'>
+            {t}Mail address{/t}:
+            {render acl=$primaryMailACL}
+                <input type='text' name="primaryMail" value="{$primaryMail}">
+            {/render}
+        </td>
+        <td style='width:50%; vertical-align: top;'>
+            <h3><label for="alternateAddressList">{t}Alternative addresses{/t}</label></h3>
+            {render acl=$alternateAddressesACL}
+                <select id="alternateAddressList" style="width:100%;height:100px;" name="alternateAddressList[]" size="15" multiple
+                    title="{t}List of alternative mail addresses{/t}">
+                    {html_options values=$alternateAddresses output=$alternateAddresses}
+                    <option disabled>&nbsp;</option>
+                </select>
+                <br>
+            {/render}
+            {render acl=$alternateAddressesACL}
+                <input type='text' name="alternateAddressInput">
+            {/render}
+            {render acl=$alternateAddressesACL}
+                <button type='submit' name='addAlternateAddress'>{msgPool type=addButton}</button>
+            {/render}
+            {render acl=$alternateAddressesACL}
+                <button type='submit' name='deleteAlternateAddress'>{msgPool type=delButton}</button>
+            {/render}
+        </td>
+    </tr>
+</table>
+
+
diff --git a/gosa-plugins/groupware/admin/ogroups/DistributionList/initFailed.tpl b/gosa-plugins/groupware/admin/ogroups/DistributionList/initFailed.tpl
new file mode 100644 (file)
index 0000000..96404d4
--- /dev/null
@@ -0,0 +1,3 @@
+<h3>{t}Groupware{/t}</h3>
+{msgPool type=rpcError text=$rpcErrorMessage}
+&nbsp;<button name='retryInit'>{t}Retry{/t}</button>