source: sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/calendar_list.ejs @ 6797

Revision 6797, 7.0 KB checked in by acoutinho, 12 years ago (diff)

Ticket #2966 - primeiras implementacoes de tarefas aninhamento de equipo

Line 
1<%
2    var signatures = {'calendar': [], 'taskGroup': [], 'sharedCalendar': []};
3    for(var i = 0; i < data.signatures.length; i++)
4    {
5        if(data.signatures[i].calendar.type == 1){
6            signatures['taskGroup'].push(data.signatures[i]);
7        }else{
8            signatures[data.signatures[i].isOwner == 1 ? 'calendar' : 'sharedCalendar'].push(data.signatures[i]);   
9        }
10    }
11%>
12
13<div class="all-list-calendars">
14
15    <div class="my-groups-task">
16        <a title='Grupos de tarefas' class="title-my-calendars" aria-expanded='false' role='button' tabindex='0'>Grupos de tarefas</a>
17        <span class="status-list ui-icon ui-icon-triangle-1-s"></span>
18        <a href="#" class="button new new-calendar">Novo Grupo</a>
19        <ul class="list-calendars my-list-calendars">
20            <% for (var i=0; i < signatures['taskGroup'].length; i++) {%>
21            <li class="list-calendars-item list-calendars-item-<%= signatures['taskGroup'][i].calendar.id %>" title="<%= signatures['taskGroup'][i].calendar.name %>">
22
23                <div>
24                    <input class="calendar-view" type="checkbox" name="" value="<%= signatures['taskGroup'][i].calendar.id %>" checked="checked"/>
25                    <label><%= signatures['taskGroup'][i].calendar.name %></label>
26
27                </div>
28                <a class="cal-list-options-btn my-cal-list-options-btn-<%= signatures['taskGroup'][i].calendar.id %>" style="background-color:#<%=signatures['taskGroup'][i].backgroundColor%>; border-color:#<%= signatures['taskGroup'][i].borderColor%>;">
29                    <img src="../prototype/modules/calendar/img/arrow_down.png" width="10" height="10" class="cal-list-img"/>
30                </a>
31
32
33                <div class="cal-list-options my-cal-list-options-<%= signatures['taskGroup'][i].calendar.id %> hidden">
34                    <ul>
35                        <li><a href="#" onclick="add_tab_configure_calendar(<%= signatures['taskGroup'][i].calendar.id%>);">Configurações</a></li>
36                        <li><a href="#" onclick="show_modal_import_export(0, <%= signatures['taskGroup'][i].calendar.id%>);">Importar</a></li>
37                        <li><a href="#" onclick="show_modal_import_export(1, <%= signatures['taskGroup'][i].calendar.id%>);">Exportar</a></li>
38                        <li><a href="#" onclick="show_modal_shared(<%= signatures['taskGroup'][i].calendar.id%>);">Compartilhar agenda</a></li>
39                        <li><a href="#" onclick="remove_calendar();">Remover agenda</a></li>
40                    </ul>
41
42                </div>
43            </li>
44            <%}%>
45
46        </ul>
47    </div>
48
49    <div class="my-calendars">
50        <a title='Minhas agendas' class="title-my-calendars" aria-expanded='false' role='button' tabindex='0'>Minhas agendas</a>
51        <span class="status-list ui-icon ui-icon-triangle-1-s"></span>
52        <a href="#" class="button new new-calendar">Nova Agenda</a>
53        <ul class="list-calendars my-list-calendars">
54            <% for (var i=0; i < signatures.calendar.length; i++) {%>
55            <li class="list-calendars-item list-calendars-item-<%= signatures['calendar'][i].calendar.id %>" title="<%= signatures['calendar'][i].calendar.name %>">
56
57                <div>
58                    <input class="calendar-view" type="checkbox" name="" value="<%= signatures['calendar'][i].calendar.id %>" checked="checked"/>
59                    <label><%= signatures['calendar'][i].calendar.name %></label>
60
61                </div>
62                <a class="cal-list-options-btn my-cal-list-options-btn-<%= signatures['calendar'][i].calendar.id %>" style="background-color:#<%=signatures['calendar'][i].backgroundColor%>; border-color:#<%= signatures['calendar'][i].borderColor%>;">
63                    <img src="../prototype/modules/calendar/img/arrow_down.png" width="10" height="10" class="cal-list-img"/>
64                </a>
65
66
67                <div class="cal-list-options my-cal-list-options-<%= signatures['calendar'][i].calendar.id %> hidden">
68                    <ul>
69                        <li><a href="#" onclick="add_tab_configure_calendar(<%= signatures['calendar'][i].calendar.id%>);">Configurações</a></li>
70                        <li><a href="#" onclick="show_modal_import_export(0, <%= signatures['calendar'][i].calendar.id%>);">Importar</a></li>
71                        <li><a href="#" onclick="show_modal_import_export(1, <%= signatures['calendar'][i].calendar.id%>);">Exportar</a></li>
72                        <li><a href="#" onclick="show_modal_shared(<%= signatures['calendar'][i].calendar.id%>);">Compartilhar agenda</a></li>
73                        <li><a href="#" onclick="remove_calendar();">Remover agenda</a></li>
74                    </ul>
75
76                </div>
77            </li>
78            <%}%>
79
80        </ul>
81    </div>
82
83    <div class="signed-calendars">
84        <a title='Agendas assinadas' class="title-signed-calendars" aria-expanded='false' role='button' tabindex='0'>Agendas assinadas</a>                     
85        <span class="status-list-shared ui-icon ui-icon-triangle-1-s"></span>
86        <a href="#" class="button new new-calendar-shared tiny">Nova Agenda</a>
87
88        <ul class="list-calendars signed-list-calendars">
89            <% for (var i=0; i < signatures['sharedCalendar'].length; i++) {%>
90                <li class="list-calendars-item list-calendars-item-<%= signatures['sharedCalendar'][i].calendar.id %>" title="<%= signatures['sharedCalendar'][i].calendar.name %>">
91                 <div>
92                            <input class="calendar-view" type="checkbox" name="" value="<%= signatures['sharedCalendar'][i].calendar.id %>" checked="checked"/>
93                            <label><%= signatures['sharedCalendar'][i].calendar.name %></label>
94                         </div>
95                <a class="cal-list-options-btn my-cal-list-options-btn-<%= signatures['sharedCalendar'][i].calendar.id %>" style="background-color:#<%=signatures['sharedCalendar'][i].backgroundColor%>; border-color:#<%= signatures['sharedCalendar'][i].borderColor%>;">
96                    <img src="../prototype/modules/calendar/img/arrow_down.png" width="10" height="10" class="cal-list-img"/></a>
97                <div class="cal-list-options my-cal-list-options-<%= signatures['sharedCalendar'][i].calendar.id  %> hidden">
98                    <ul>
99                        <li><a href="#" onclick="add_tab_configure_calendar(<%= signatures['sharedCalendar'][i].calendar.id %>);">Configurações</a></li>
100                        <li><a href="#" onclick="show_modal_import_export(0, <%= signatures['sharedCalendar'][i].calendar.id %>);">Importar</a></li>
101                        <li><a href="#" onclick="show_modal_import_export(1, <%= signatures['sharedCalendar'][i].calendar.id %>);">Exportar</a></li>
102                        <%if(!signatures['sharedCalendar'][i].permission.acl['required']){%>
103                            <li><a href="#" onclick="cancel_signatures['sharedCalendar'](<%= signatures['sharedCalendar'][i].id %>);">Cancelar assinatura</a></li>
104                        <%}%>
105                    </ul>
106
107                </div>
108
109            </li>
110            <%}%>
111        </ul>
112    </div>
113</div>
Note: See TracBrowser for help on using the repository browser.