1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
|
<?xml version="1.0"?>
<!--
-
- $Id$
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2018 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:include href="common.xsl"/>
<!-- ====================================================================================== -->
<xsl:template match="page">
<table id="info" width="500" align="center" cellpadding="0" cellspacing="0" border="0">
<xsl:apply-templates select="object"/>
</table>
<br/>
</xsl:template>
<!-- ====================================================================================== -->
<xsl:template match="object">
<xsl:choose>
<xsl:when test="@action_id = 0">
<xsl:call-template name="edit_folder"/>
</xsl:when>
<xsl:when test="@action_id = 1">
<xsl:call-template name="del_folder"/>
</xsl:when>
<xsl:when test="@action_id = 2">
<xsl:call-template name="emp_folder"/>
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- ====================================================================================== -->
<xsl:template name="edit_folder">
<caption>
<span>Edit folder</span>
</caption>
<form method="post">
<xsl:attribute name="action"><xsl:value-of select="$iri" />/tools.vsp</xsl:attribute>
<xsl:call-template name="hid_sid"/>
<input type="hidden" name="tp">
<xsl:attribute name="value"><xsl:value-of select="/page/tp"/>,1</xsl:attribute>
</input>
<input type="hidden" name="ok">
<xsl:attribute name="value">1</xsl:attribute>
</input>
<tr>
<th>
<label for="name">Name:</label>
<xsl:call-template name="nbsp"/>
</th>
<td>
<input type="text" name="oname" id="name">
<xsl:attribute name="value"><xsl:value-of select="object_name"/></xsl:attribute>
</input>
</td>
</tr>
<xsl:apply-templates select="folders" mode="combo"/>
<tr>
<td align="center" colspan="2">
<xsl:call-template name="make_submit">
<xsl:with-param name="name">save</xsl:with-param>
<xsl:with-param name="value">Save</xsl:with-param>
<xsl:with-param name="alt">Save</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="make_submit">
<xsl:with-param name="name">cancel</xsl:with-param>
<xsl:with-param name="value">Cancel</xsl:with-param>
<xsl:with-param name="alt">cancel</xsl:with-param>
<xsl:with-param name="onclick">javascript:history.go(-1)</xsl:with-param>
</xsl:call-template>
</td>
</tr>
</form>
</xsl:template>
<!-- ====================================================================================== -->
<xsl:template match="folders" mode="combo">
<tr>
<th>
<label for="folders">Parent:</label>
<xsl:call-template name="nbsp"/>
</th>
<td>
<select name="pid" id="folders">
<xsl:apply-templates select="folder"/>
</select>
</td>
</tr>
</xsl:template>
<!-- ====================================================================================== -->
<xsl:template match="folder[@smartFlag='N']">
<xsl:if test="@id != /page/object/object_id">
<option>
<xsl:if test="@id = /page/object/parent_id">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:attribute name="value"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:value-of select="level/@str"/>
<xsl:value-of select="name"/>
</option>
<xsl:apply-templates select="folders/folder"/>
</xsl:if>
</xsl:template>
<!-- ====================================================================================== -->
<xsl:template name="del_folder">
<thead>
<tr>
<th>Are you sure you want to delete folder "<xsl:value-of select="/page/object/object_name"/>"?</th>
</tr>
</thead>
<tr>
<td>
<ul>
<li>If you choose "Yes" you will delete <xsl:value-of select="count_m"/> message(s), <xsl:value-of select="count_f"/> subfolder(s) and this folder. External boxes will use parent folder for incoming messages.<br/>
</li>
<li>If you choose "No" you will return to folder list without any actions<br/>
</li>
</ul>
</td>
</tr>
<tfoot>
<tr>
<td>
<xsl:call-template name="make_href">
<xsl:with-param name="url">tools.vsp</xsl:with-param>
<xsl:with-param name="params">tp=<xsl:value-of select="object_id"/>,<xsl:value-of select="@action_id"/>,1</xsl:with-param>
<xsl:with-param name="label">Delete This Folder</xsl:with-param>
<xsl:with-param name="img">/oMail/i/yes.gif</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="make_href">
<xsl:with-param name="url">folders.vsp</xsl:with-param>
<xsl:with-param name="label">Go Back Without Delete Anything</xsl:with-param>
<xsl:with-param name="img">/oMail/i/no.gif</xsl:with-param>
</xsl:call-template>
</td>
</tr>
</tfoot>
</xsl:template>
<!-- ====================================================================================== -->
<xsl:template name="emp_folder">
<thead>
<tr>
<th>Are you sure you want to delete all messages from this folder?</th>
</tr>
</thead>
<tr>
<td>
<ul>
<li>If you choose "Yes" you will delete <xsl:value-of select="count_m"/> message(s) in <xsl:value-of select="count_f"/> subfolder(s)<br/>
</li>
<li>If you choose "No" you will return to folder list without any actions<br/>
</li>
</ul>
</td>
</tr>
<tfoot>
<tr>
<td>
<xsl:call-template name="make_href">
<xsl:with-param name="url">tools.vsp</xsl:with-param>
<xsl:with-param name="params">tp=<xsl:value-of select="object_id"/>,<xsl:value-of select="@action_id"/>,1</xsl:with-param>
<xsl:with-param name="label">Delete All Messages in This Folder</xsl:with-param>
<xsl:with-param name="img">/oMail/i/yes.gif</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="make_href">
<xsl:with-param name="url">folders.vsp</xsl:with-param>
<xsl:with-param name="label">Go Back Without Delete Anything</xsl:with-param>
<xsl:with-param name="img">/oMail/i/no.gif</xsl:with-param>
</xsl:call-template>
</td>
</tr>
</tfoot>
</xsl:template>
<!-- ====================================================================================== -->
</xsl:stylesheet>
|