source: trunk/prototype/modules/filters/edit-filter.ejs @ 6387

Revision 6387, 8.8 KB checked in by natan, 12 years ago (diff)

Ticket #2828 - Melhoria na busca de mensagens - Corrigido

Line 
1<%
2        var specialFolders = {
3                INBOX: {name:'Caixa de Entrada', classe:'inbox'},
4                Inbox: {name:'Caixa de Entrada', classe:'inbox'},
5                Trash: {name:'Lixeira', classe:'trash'},
6                Drafts:{name:'Rascunhos', classe:'drafts'},
7                Spam:  {name:'Spam', classe:'spam'},
8                Sent:  {name:'Enviados', classe:'sent'}
9        };
10%>
11<form action="filter:detail" method="POST">
12        <input type="hidden" class="imapDelimiter" value="<%= data.delimiter %>"></input>
13        <div class="rule-details-container">
14                <h3><a href="#"><%= get_lang("Criteria")%></a></h3>
15                <div>
16                        <fieldset>
17                                <label class="small"><%= get_lang("Name of the rule")%></label>
18                                <input type="text" name="name" />
19                        </fieldset>
20                        <fieldset>
21                                <label class="small"><%= get_lang("Sender")%></label>
22                                <select name="criteriaOperator[]">
23                                        <option value="*"><%= get_lang("contains the phrase")%></option>
24                                        <option value="="><%= get_lang("is equal to")%></option>
25                                        <option value="!*"><%= get_lang("doesn't contain the phrase")%></option>
26                                        <option value="^"><%= get_lang("starting with")%></option>
27                                        <option value="$"><%= get_lang("ends with")%></option>
28
29                                </select>
30                                <input type="text" name="criteriaValue[]" />
31                                <input type="hidden" name="criteriaType[]" value="from"/>
32                        </fieldset>
33                        <fieldset>
34                                <label class="small"><%= get_lang("Receiver")%></label>
35                                <select name="criteriaOperator[]">
36                                        <option value="*"><%= get_lang("contains the phrase")%></option>
37                                        <option value="="><%= get_lang("is equal to")%></option>
38                                        <option value="!*"><%= get_lang("doesn't contain the phrase")%></option>
39                                        <option value="^"><%= get_lang("starting with")%></option>
40                                        <option value="$"><%= get_lang("ends with")%></option>
41                                </select>
42                                <input type="text" name="criteriaValue[]" />
43                                <input type="hidden" name="criteriaType[]" value="to"/>
44                        </fieldset>
45                        <fieldset>
46                                <label class="small"><%= get_lang("Subject")%></label>
47                                <select name="criteriaOperator[]">
48                                        <option value="*"><%= get_lang("contains the phrase")%></option>
49                                        <option value="="><%= get_lang("is equal to")%></option>
50                                        <option value="!*"><%= get_lang("doesn't contain the phrase")%></option>
51                                        <option value="^"><%= get_lang("starting with")%></option>
52                                        <option value="$"><%= get_lang("ends with")%></option>
53
54                                </select>
55                                <input type="text" name="criteriaValue[]" />
56                                <input type="hidden" name="criteriaType[]" value="subject"/>
57                        </fieldset>
58                        <fieldset>
59                                <label class="small"><%= get_lang("Message")%></label>
60                                <select name="criteriaOperator[]">
61                                        <option value="*"><%= get_lang("contains the phrase")%></option>
62                                        <option value="="><%= get_lang("is equal to")%></option>
63                                        <option value="!*"><%= get_lang("doesn't contain the phrase")%></option>
64                                        <option value="^"><%= get_lang("starting with")%></option>
65                                        <option value="$"><%= get_lang("ends with")%></option>
66                                </select>
67                                <input type="text" name="criteriaValue[]" />
68                                <input type="hidden" name="criteriaType[]" value="body"/>
69                        </fieldset>
70                        <fieldset>
71                                <label class="small"><%= get_lang("Size")%>(KB)</label>
72                                <select name="criteriaOperator[]">
73                                        <option value=">"><%= get_lang("is over than")%></option>
74                                        <option value="<"><%= get_lang("is under than")%></option>
75                                </select>
76                                <input type="text" class="sizeRule" name="criteriaValue[]" />
77                                <input type="hidden" name="criteriaType[]" value="size"/>
78                        </fieldset>
79                        <fieldset>
80                                <input type="hidden" name="criteriaOperator[]" value="^"></input>
81                                <input type="checkbox" name="criteriaValue[]" value="*.*" class="hasAttachment"/>
82                                <input type="hidden" name="criteriaType[]" value="hasAttachment"/>
83                                <label><%= get_lang("The message has attachment")%></label>
84                        </fieldset>
85                        <fieldset class="fields-isexact">
86                                <fieldset>
87                                        <input type="radio" name="isExact" value="and" checked="checked"/>
88                                        <label><%= get_lang("Attend all the criteria")%></label>
89                                </fieldset>
90                                <fieldset>
91                                        <input type="radio" name="isExact" value="or"/>
92                                        <label><%= get_lang("Attend any of the criteria")%></label>
93                                </fieldset>
94                        </fieldset>
95                        <div class="menu-container">
96                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
97                                <a class="button forth" href="#"><%= get_lang("Continue")%> &raquo;</a>
98                        </div>
99                </div>
100                <h3><a href="#"><%= get_lang("Actions")%></a></h3>
101                <div>
102                        <ul class="message-tip-container">
103                                <li class="message-tip"><%= get_lang("Actions to be performed on messages that attend the criteria specified above.")%></li>
104                                <li class="message-tip"><%= get_lang("These actions apply only to new messages arriving.")%></li>
105                        </ul>
106                        <fieldset class="select-folderlist">
107                                <input type="radio" name="actionType[]" value="fileinto" checked="checked" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
108                                <label><%= get_lang("Archive in folder")%></label>
109                                <!--
110                                Aguardando o problema do form do DataLayer ser resolvido.
111                                -->
112                                <select name="valueFileInto" style="width:150px">
113                                        <%for(var i=0; i < data.folders.length; i++){
114                                                var folder_name = specialFolders[data.folders[i].commonName] ? get_lang(data.folders[i].commonName) : data.folders[i].commonName;
115                                                if(/^INBOX/.test(data.folders[i].id)){ %>
116                                                        <option value="<%= data.folders[i].id%>"><%= folder_name%></option>
117                                        <%
118                                                }else if(/^user/.test(data.folders[i].id)){
119                                                        var user_name = (data.folders[i].parentFolder.split(data.delimiter)[1] ? (data.folders[i].parentFolder.split(data.delimiter)[1] + data.delimiter) : "");
120                                                %>
121                                                        <option value="<%= data.folders[i].id%>"><%= user_name + folder_name%></option>
122                                                <% }
123                                        }
124                                        %>
125                                </select>
126                        </fieldset>
127                        <fieldset>
128                                <input type="radio" name="actionType[]" value="redirect" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
129                                <label><%= get_lang("Forward to the address")%></label>
130                                <input type="text" name="addressRedirect" />
131                        </fieldset>
132                        <fieldset>
133                                <input type="radio" name="actionType[]" value="setflag" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
134                                <label><%= get_lang("Mark as")%></label>
135                                <!--
136                                Aguardando o problema do form do DataLayer ser resolvido.
137                                -->
138                                <select name="valueSetFlag">
139                                        <option value="flagged"><%= get_lang("Flagged")%></option>
140                                        <option value="seen"><%= get_lang("Seen")%></option>
141                                </select>
142                        </fieldset>
143                        <fieldset>
144                                <input type="radio" name="actionType[]" value="fileintoTrash" onchange="$('.ui-widget-content :checkbox').parent().removeClass(' hidden');"/>
145                                <label><%= get_lang("Trash")%></label>
146                                <input type="hidden" name="actionParameter[]" value="Trash"/>
147                        </fieldset>
148                        <fieldset class="fields-replyto">
149                                <input type="radio" name="actionType[]" value="reject" onchange="$('.ui-widget-content :checkbox').parent().addClass(' hidden');"/>
150                                <label><%= get_lang("Reply with a message automatically")%></label>
151                                <textarea name="messageReject"></textarea>
152                        </fieldset>
153                        <fieldset>
154                                <input type="checkbox" name="actionType[]" value="fileintoInbox"/>
155                                <label><%= get_lang("Keep a copy of the message at your Inbox")%></label>
156                                <input type="hidden" name="actionParameter[]" value="INBOX"/>
157                        </fieldset>
158                        <div class="menu-container">   
159                                <a class="button back"   href="#" >&laquo; <%= get_lang("Previous")%></a>
160                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
161                                <a class="button forth2" href="#"><%= get_lang("Continue")%> &raquo;</a>
162                                <a class="button submit" href="#"><%= get_lang("Save")%></a>
163                        </div>
164                </div>
165               
166                <h3><a href="#"><%= get_lang("Apply filter")%></a></h3>
167                <div>
168                        <fieldset>
169                                <div id="filtergrid-container" class="empty-container">
170                                        <span class="message"><%= 'nenhuma mensagem pesquisada' %></span>
171                                </div>
172                                <fieldset class="fields-search-messages" style="border: none;">
173                                        <span class="button ui-button-text-only search menu-container"><%= get_lang("Search Inbox")%></span>
174                                </fieldset>
175                        </fieldset>
176                        <div class="menu-container">   
177                                <a class="button back2"   href="#" >&laquo; <%= get_lang("Previous")%></a>
178                                <a class="button cancel" href="#"><%= get_lang("Cancel")%></a>
179                                <a class="button submit" href="#"><%= get_lang("Save")%></a>
180                        </div>
181                </div>
182        </div>
183        <div class="vacation-details-container hidden">
184                <fieldset>
185                        <label><%= get_lang("Type a reply message")%></label>
186                        <ul class="message-tip-container">
187                                <li class="message-tip"><%= get_lang("All messages will be answered automatically with the message indicated.")%></li>
188                        </ul>
189                        <textarea class="filter-textarea" name="vacation"></textarea>
190                </fieldset>
191                        <div class="menu-container">   
192                              <a class="button back"   href="#" title="<%= get_lang("Cancel and returns the previous screen")%>">&laquo; <%= get_lang("Previous")%></a>
193                              <a class="button submit" href="#" title="<%= get_lang("Save and returns the previous screen")%>"><%= get_lang("Save")%></a>
194                        </div>
195        </div>
196</form>
Note: See TracBrowser for help on using the repository browser.