source: sandbox/webservice/restclient_new/templates/resources.ejs @ 7808

Revision 7808, 2.1 KB checked in by alexandrecorreia, 11 years ago (diff)

Ticket #2507 - Criado um novo cliente REST para teste/documentação no Expresso.

  • Property svn:executable set to *
Line 
1<% for(var i in resources){ %>
2        <h3><%=(resources[i].rest)%></h3>
3        <div id="sub_<%=resources[i].id%>">
4
5                <% for( var j= 0; j < resources[i].method.length; j++ ){ %>
6                        <!-- Form de envio -->
7                        <h3><%=resources[i].method[j]%></h3>
8                        <div>
9                                <h4><%=resources[i].description%></h4>
10                                       
11                                        <% if( typeof(resources[i].params) == "object" ){ %>
12
13                                                <table class="parameters">
14                                                        <thead>
15                                                                <tr>
16                                                                        <th>Par&acirc;metro</th>
17                                                                        <th>Valor</th>
18                                                                        <th>Tipo</th>
19                                                                        <th style="text-align: center;">Obrigat&oacute;rio</th>
20                                                                        <th>Descri&ccedil;&atilde;o</th>
21                                                                </tr>
22                                                        </thead>
23                                                        <tbody>
24                                                                <% for( var l in resources[i].params ){ %>
25                                                                        <tr>
26                                                                                <td><%=l%></td>
27                                                                                <td>
28                                                                                        <input type="<%=resources[i].params[l][0]%>" <%=resources[i].params[l][1]%> value="<%=resources[i].params[l][4]%>" id="<%=resources[i].id%>_<%=l%>">
29                                                                                </td>
30                                                                                <td><%=resources[i].params[l][2]%></td>
31                                                                                <% if(resources[i].params[l][3] == true) { %>
32                                                                                        <td align="center"><font style="font-weight:bold;color:red">X</font></td>
33                                                                                <% } else { %>
34                                                                                        <td align="center">&nbsp;</td>
35                                                                                <% } %>
36                                                                                <td><%=resources[i].params[l][5]%></td>
37                                                                        </tr>
38                                                                <% } %>
39                                                        </tbody>
40                                                </table>
41                                        <% } else { %>
42
43                                                <div style="margin-bottom:10px;">
44                                                        <span>Este m&eacute;todo n&atilde;o necessita de par&acirc;metros adicionais</span>     
45                                                </div>
46
47                                        <% } %>
48                               
49                                <button onclick="<%=resources[i].click%>">Testar</button>
50                               
51                                <!-- Parametros Enviados -->
52                                <div id="param_<%=resources[i].id%>" style="display:none; margin-top:10px;">
53                                        <h3>Par&acirc;metros enviados</h3>
54                                        <div>
55                                                Parametros enviados
56                                        </div>
57                                </div>
58
59                                <!-- Resposta de Erro -->
60                                <div id="error_<%=resources[i].id%>" style="display:none; margin-top:10px;">
61                                        <h3>Erros</h3>
62                                        <div>
63                                                Erros encontrados
64                                        </div>
65                                </div>
66
67                                <!-- Resposta do Metodo -->
68                                <div id="return_<%=resources[i].id%>" style="display:none">
69                                        <h3>Resposta do M&eacute;todo</h3>
70                                        <div>
71                                                Retorno
72                                        </div>
73                                </div>
74
75                        </div>
76                <% } %>
77        </div>
78<% } %>
Note: See TracBrowser for help on using the repository browser.