Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/task_quick_add.ejs
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/task_quick_add.ejs	(revision 6797)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/task_quick_add.ejs	(revision 6876)
@@ -1,5 +1,5 @@
 <div class="add-simple-task">
 
-	<input type="text" class="task" name="title" value=""/>
+	<input type="text" class="task" name="summary" value=""/>
 	<textarea name="description" class="task"></textarea>
 
Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/availability_map.ejs
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/availability_map.ejs	(revision 5636)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/availability_map.ejs	(revision 6876)
@@ -1,4 +1,4 @@
-<fieldset id="availability_map" class="tab-level2">
-	<div id="new_event_map" class="map" style="width : 100%;">
+<fieldset class="tab-level2">
+	<div class="map_disponibility" style="width : 100%;">
 	</div>
 </fieldset>
Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/task_add.ejs
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/task_add.ejs	(revision 6811)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/task_add.ejs	(revision 6876)
@@ -1,28 +1,28 @@
 <div title="Criar Tarefa" class="div-addtask content">
-    <form method="POST" action="<%=(data.event.acl.organization || data.event.acl.write) ?  "schedulable:detail" : "schedulable:preview"%>" class="form-addevent content">
+    <form method="POST" action="schedulable:task" class="form-addtask content">
 
 	<fieldset id="calendar_addtask_details1">
 		<legend class="hidden">Detalhes da tarefa</legend>
 		<p class="input-group">
-			<input type="text" class="h1" name="summary" <%=(data.event.acl.organization || data.event.acl.write) ? '' : 'disabled="disabled"' %> value="<%= (data.event.summary) ? data.event.summary : '' %>"/>
-			<% if( data.event.id ){ %>
-				<input type="hidden" class="id-event" name="idEvent" value="<%= data.event.id %>"/>
-			<% } %>
-                        <% if( data.event.id && data.event.calendar ){ %>
-				<input type="hidden" class="last-calendar" name="lastCalendar" value="<%= data.event.calendar %>"/>
-			<% } %>
+		    <input type="text" class="h1" name="summary" value="<%= (data.task.summary) ? data.task.summary : '' %>"/>
+		    <% if( data.task.id ){ %>
+			    <input type="hidden" class="id-task" name="idTask" value="<%= data.task.id %>"/>
+		    <% } %>
+		    <% if( data.task.id && data.task.group ){ %>
+    			<input type="hidden" class="last-group" name="lastGroup" value="<%= data.task.group %>"/>
+		    <% } %>
 		</p>
 		<p class="input-group date-info">
-			<input type="text" class="date start-date" value="<%= (data.event.startDate) ? data.event.startDate : '' %>" <%=(data.event.acl.organization || data.event.acl.write) ? '' : 'disabled="disabled"' %> name="startDate" />
-			<input type="text" class="time start-time<%= (data.event.allDay) ? ' hidden' : '' %>" value="<%= (data.event.startHour) ? data.event.startHour : '' %>" <%= (data.event.acl.organization || data.event.acl.write) ? '' : 'disabled="disabled"' %> name="startHour" /> 
+			<input type="text" class="date start-date" value="<%= (data.task.startDate) ? data.task.startDate : '' %>" name="startDate" />
+			<input type="text" class="time start-time<%= (data.task.allDay) ? ' hidden' : '' %>" value="<%= (data.task.startHour) ? data.task.startHour : '' %>" name="startHour" /> 
 			<span>até</span>
-			<input type="text" class="date end-date" value="<%= (data.event.endDate) ? data.event.endDate : '' %>" <%= (data.event.acl.organization || data.event.acl.write) ? '' : 'disabled="disabled"' %> name="endDate" />
-			<input type="text" class="time end-time<%= (data.event.allDay) ? ' hidden' : '' %>" value="<%= (data.event.endHour) ? data.event.endHour : '' %>" <%=(data.event.acl.organization || data.event.acl.write) ? '' : 'disabled="disabled"' %> name="endHour" />
+			<input type="text" class="date end-date" value="<%= (data.task.endDate) ? data.task.endDate : '' %>" name="endDate" />
+			<input type="text" class="time end-time<%= (data.task.allDay) ? ' hidden' : '' %>" value="<%= (data.task.endHour) ? data.task.endHour : '' %>" name="endHour" />
 
 				<span class="previsao-termino">Previsão término:</span>
-				<input type="text" class="date date-previsao">
-				<input type="text" class="time time-previsao">
-
-				<a href="#" class="calendar_addevent_details_lnk_timezone <%=((!data.event.acl.organization || !data.event.acl.write) && (data.event.id)) ? "hidden" : '' %>">Fuso horário</a>
+				<input type="text" name="dueDate" class="date date-previsao" value="<%= data.task.dueDate %>">
+				<input type="text" name="dueTime" class="time time-previsao" value="<%= data.task.dueTime %>">
+
+				<a href="#" class="calendar_addtask_details_lnk_timezone">Fuso horário</a>
 			
 			
@@ -30,11 +30,9 @@
 			<select name="timezone" class="hidden calendar-addtask-details-txt-timezone">
 				<option value="">- None selected -</option>
-				<% for( var tzId in data.event.timezones ){ %>
-				  <option value="<%= tzId %>" <%= data.timezone === tzId ? 'selected="selected"' : '' %>><%= tzId + ' (' + data.event.timezones[ tzId ] + ')' %></option>
+				<% for( var tzId in data.task.timezones ){ %>
+				  <option value="<%= tzId %>" <%= data.timezone === tzId ? 'selected="selected"' : '' %>><%= tzId + ' (' + data.task.timezones[ tzId ] + ')' %></option>
 				<% } %>
 			</select>
-			
-			<a class="button suggestion-hours small <%=(data.event.acl.organization || data.event.acl.write || !data.event.isAttendee) ? "hidden" : '' %>" href="#">Sugerir horário</a>
-			
+
 		</p>
 				
@@ -49,22 +47,26 @@
 		
 		<p class="input-group task-type">
-			<input type="checkbox" name="allDay" value="true" <%= (data.event.acl.organization || data.event.acl.write) ? '' : 'disabled="disabled"' %> <%= (data.event.allDay) ? 'checked="checked"' : '' %>/>
+			<input type="checkbox" name="allDay" value="true" <%= (data.task.allDay) ? 'checked="checked"' : '' %>/>
 			<label for="allDay">Dia inteiro</label>
 <!--
 			<input type="checkbox" class="button-repeat" />
-			<label for="calendar_addevent_details_chk_repeat">Repetir</label>-->
+			<label for="calendar_addtask_details_chk_repeat">Repetir</label>-->
 		</p>
 		<div class="subitem">
-				% Conclusão: <input type="number" class="done" value="1"> 
-				<span class="span_done"><input type="checkbox" class="button-repeat" /> Completo<span>
-				<select style="margin: 0 0 0 20px;">
-					<option>Desenvolvimento</option>
-				</select>
-				<span style="margin:0 0 0 20px;">Prioridade<span> 
-				<select>
-					<option>Alta</option>
-					<option selected="selected">Média</option>
-					<option>Baixa</option>
-				</select>
+				% Conclusão: <input type="number" name="percentage" class="done" value="<%= data.task.percentage %>"> 
+				<span style="margin:0 0 0 5px;">Status:<span> 
+                <select name="taskStatus" style="margin: 0 0 0 5px;">
+                    <option <%= (data.task.taskStatus == '1') ? 'selected="selected"' : '' %> value="1">Sem ações</option>
+                    <option <%= (data.task.taskStatus == '2') ? 'selected="selected"' : '' %> value="2">Em Processo</option>
+                    <option <%= (data.task.taskStatus == '3') ? 'selected="selected"' : '' %> value="3">Finalizada</option>
+					<option <%= (data.task.taskStatus == '4') ? 'selected="selected"' : '' %> value="4">Cancelada</option>
+				</select>
+				<span style="margin:0 0 0 5px;">Prioridade<span> 
+				<select name="priority">
+					<option <%= (data.task.priority == '1') ? 'selected="selected"' : '' %> value="1">Alta</option>
+					<option <%= (data.task.priority == '2') ? 'selected="selected"' : '' %> value="2">Normal</option>
+					<option <%= (data.task.priority == '3') ? 'selected="selected"' : '' %> value="3">Baixa</option>
+				</select>
+                <span class="span_done"><img src="../prototype/modules/calendar/img/empty-status.png"/> Completo<span>
 		</div>
 	</fieldset>
@@ -78,50 +80,27 @@
 	</ul>
 	<fieldset id="calendar_addtask_details2" class="tab-level2">
-		<legend class="hidden">Detalhes do evento</legend>
+		<legend class="hidden">Detalhes da tarefa</legend>
 
 		<p class="input-group">
 			<label for="calendar_addtask_details_txtarea_description" class="for-textarea" >Descrição</label>
-			<textarea name="description" <%= (data.event.acl.organization || data.event.acl.write) ? '' : 'disabled="disabled"' %> ><%=(data.event) ? data.event.description : '' %></textarea>
+			<textarea name="description"><%=(data.task) ? data.task.description : '' %></textarea>
 		</p>
 
 		<p class="input-group">
 			<label for="calendar_addtask_details_slt_cal">Grupo</label>
-				<select>
+				<select  name="group" >
 					<% 
-					  for (var i=0; i< data.event.calendars.length; i++) {
-					  console.log(data);
-					    if(data.event.calendars[i].id != data.event.calendar && Calendar.signatureOf[data.event.calendars[i].id].isOwner != '1' && (!Calendar.signatureOf[data.event.calendars[i].id].permission.acl.write) )
-						continue;
+					  for (var i=0; i< data.task.groups.length; i++) {
 					%>
-					      <option value="<%= data.event.calendars[i].id %>" <%= data.event.calendars[i].id == data.event.calendar ? 'selected="selected"':'' %>>
-					      <%= data.event.calendars[i].name %>
+					      <option value="<%= data.task.groups[i].id %>" <%= data.task.groups[i].id == data.task.group ? 'selected="selected"':'' %>>
+					      <%= data.task.groups[i].name %>
 					      </option>
 					<% } %>
 				</select>
-			<!--<select name="calendar" >
-			<% 
-			  for (var i=0; i< data.event.calendars.length; i++) {
-			    if(data.event.calendars[i].id != data.event.calendar && Calendar.signatureOf[data.event.calendars[i].id].isOwner != '1' && !Calendar.signatureOf[data.event.calendars[i].id].permission.acl.write)
-				continue;
-			%>
-			      <option value="<%= data.event.calendars[i].id %>" <%= data.event.calendars[i].id == data.event.calendar ? 'selected="selected"':'' %>>
-			      <%= data.event.calendars[i].name %>
-			      </option>
-			<% } %>
-			</select>
-		-->
 		</p>
 		
 		<fieldset class="hidden">
 			<legend class="hidden">Publicidade</legend>
-			<!--
-			<p class="input-group">
-				<label class="input-group">Mostrar-me como</label>
-				<input type="radio" checked="checked"/>
-				<label for="calendar_addevent_details_rdo_status1">Dispon?vel</label>
-				<input type="radio"/>
-				<label for="calendar_addevent_details_rdo_status2">Ocupado</label>
-			</p>
-			-->
+
 			<p class="input-group">
 				<label class="input-group">Privacidade</label>
@@ -142,5 +121,5 @@
 		<legend class="hidden">Lembretes</legend>
 		
-		<p class="default-alarm-event <%= (!data.event.id && data.event.alarms) ? '' : 'hidden'%>">
+		<p class="default-alarm-task <%= (!data.task.id && data.task.alarms) ? '' : 'hidden'%>">
 			<input type="checkbox" name="defaultAlarm" value="true" checked="checked"/>
 			<label class="input-default-alarm" for="defautAlarm">Usar alarmes padrões</label>
@@ -148,23 +127,23 @@
 	
 		<ul class="task-alarms-list">
-			<% if (data.event && data.event.alarms) {
-				for (var i=0; i< data.event.alarms.length; i++) {
+			<% if (data.task && data.task.alarms) {
+				for (var i=0; i< data.task.alarms.length; i++) {
 			%>
 			<li class="input-group">
 				<label>Avisar-me por </label>
 				<select name="alarmType[]">
-                                    <option value="alert" <%= data.event.alarms[i].type=='alert' ? 'selected="selected"':'' %>>Alerta</option>
-                                    <option value="mail" <%= data.event.alarms[i].type=='mail' ? 'selected="selected"':'' %>>E-mail</option>
-                                    <!--<option value="sms" <%= data.event.alarms[i].type=='sms' ? 'selected="selected"':'' %>>SMS</option>-->
-				</select>
-				<input type="text" name="alarmTime[]" class="number input-small" value="<%= data.event.alarms[i].time %>"/>
+                    <option value="alert" <%= data.task.alarms[i].type=='alert' ? 'selected="selected"':'' %>>Alerta</option>
+                    <option value="mail" <%= data.task.alarms[i].type=='mail' ? 'selected="selected"':'' %>>E-mail</option>
+                    <!--<option value="sms" <%= data.task.alarms[i].type=='sms' ? 'selected="selected"':'' %>>SMS</option>-->
+				</select>
+				<input type="text" name="alarmTime[]" class="number input-small" value="<%= data.task.alarms[i].time %>"/>
 				<select name="alarmUnit[]">
-					<option value="m" <%= data.event.alarms[i].unit=='m' ? 'selected="selected"':'' %>>Minutos</option>
-					<option value="h" <%= data.event.alarms[i].unit=='h' ? 'selected="selected"':'' %>>Horas</option>
-					<option value="d" <%= data.event.alarms[i].unit=='d' ? 'selected="selected"':'' %>>Dias</option>
-				</select>
-				<input type="hidden" name="alarmId[]" value="<%=data.event.useAlarmDefault ? '' : data.event.alarms[i].id%>" />
-				<input type="hidden" name="isDefaultAlarm[]" value="<%=data.event.useAlarmDefault ? 1 : 0%>" />
-				<label> antes de cada evento.</label>
+					<option value="m" <%= data.task.alarms[i].unit=='m' ? 'selected="selected"':'' %>>Minutos</option>
+					<option value="h" <%= data.task.alarms[i].unit=='h' ? 'selected="selected"':'' %>>Horas</option>
+					<option value="d" <%= data.task.alarms[i].unit=='d' ? 'selected="selected"':'' %>>Dias</option>
+				</select>
+				<input type="hidden" name="alarmId[]" value="<%=data.task.useAlarmDefault ? '' : data.task.alarms[i].id%>" />
+				<input type="hidden" name="isDefaultAlarm[]" value="<%=data.task.useAlarmDefault ? 1 : 0%>" />
+				<label> antes de cada tasko.</label>
 				<a class="button remove tiny"></a>
 			</li>
@@ -193,10 +172,10 @@
 
 			<div class="child-bottom">
-				<% for(var i=0; i<15; i++){ %>
-					<div class="child-bottom-each">
-						<div class="date-hour"><span>17/05 - 23:43</span></div>
-						<div class="organization"><span>thiago da silva sauro</span></div>
-					</div>
-				<% } %>
+			    <% for(var i=0; i< data.task.historic.length; i++){ %>
+				<div class="child-bottom-each">
+				    <div class="date-hour"><span><%= data.task.historic[i].date %></span></div>
+				    <div class="organization"><span><%= data.task.historic[i].description %></span></div>
+				</div>
+			    <% } %>
 			</div>
 
@@ -205,7 +184,7 @@
 
 	<fieldset class="attachment-list hidden">
-             <%if(data.event && data.event.attachments){
-                for (var i=0; i< data.event.attachments.length; i++) {%>
-                    <input type="hidden" name="fileId[]" value="<%=data.event.attachments[i].id%>"/>
+             <%if(data.task && data.task.attachments){
+                for (var i=0; i< data.task.attachments.length; i++) {%>
+                    <input type="hidden" name="fileId[]" value="<%=data.task.attachments[i].id%>"/>
                 <%}
             }%>
@@ -219,37 +198,32 @@
         <div class="row fileupload-buttonbar-task">
             <div class="button-files-upload">
-                <!-- The fileinput-button span is used to style the file input field as button -->
-                <%if(data.event.acl.organization || data.event.acl.write){%>
-		    <span class="button btn-success fileinput-button">
+                <!-- The fileinput-button span is used to style the file input field as button --> 
+		      <span class="button btn-success fileinput-button">
                     <span><i class="icon-plus icon-white"></i> Adicionar</span>
                     <input type="file" name="files[]" multiple>
                 </span>
-				<%}%>
-				<%if(data.event.acl.organization || data.event.acl.write){%>
-					<button type="button" class="button btn-danger delete">
-						<i class="icon-trash icon-white"></i> Remover Todos
-					</button>
-				<%}%>
+				<button type="button" class="button btn-danger delete">
+					<i class="icon-trash icon-white"></i> Remover Todos
+				</button>
             </div>
             <div id="fileupload-progress"></div>
             <div class="files-list">
                <ul class="attachments-list">
-			   <%if(data.event && data.event.attachments){
-					for (var i=0; i< data.event.attachments.length; i++) {
-					%>
-						<p class="input-group arquive-info">
-							<label class="lbl-archive-nome">Nome:</label>
-							<span class="archive-nome"><%=data.event.attachments[i].name%></span>
-							
-							<label class="lbl-archive-size">Tamanho:</label>
-							<span class="archive-size"><%=data.event.attachments[i].size%></span>
-							<a href="../prototype/getArchive.php?attachment=<%=data.event.attachments[i].id%>" class="button tiny upload downlaod-archive">Download</a>
-							<%if(data.event.acl.organization || data.event.acl.write){%>
-								<span class="button close tiny upload edit delete-upload" title="Deletar">Deletar</span>
-							<%}%>
-							<input type="hidden" name="fileId[]" value="<%=data.event.attachments[i].id%>"/>
-						</p>
-					<%}
-				}%>
+				<%
+                    for (var i=0; i< data.task.attachments.length; i++) {
+				%>
+					<p class="input-group arquive-info">
+						<label class="lbl-archive-nome">Nome:</label>
+						<span class="archive-nome"><%=data.task.attachments[i].name%></span>
+						
+						<label class="lbl-archive-size">Tamanho:</label>
+						<span class="archive-size"><%=data.task.attachments[i].size%></span>
+						<a href="../prototype/getArchive.php?attachment=<%=data.task.attachments[i].id%>" class="button tiny upload downlaod-archive">Download</a>
+						
+						<span class="button close tiny upload edit delete-upload" title="Deletar">Deletar</span>
+						
+						<input type="hidden" name="fileId[]" value="<%=data.task.attachments[i].id%>"/>
+					</p>
+				<%}%>
 			   
 			   
@@ -263,10 +237,10 @@
 </div>
 	<form action="../prototype/modules/calendar/export.php" method="GET" class="form-export content">
-		<input type="hidden" class="id-task" name="task" value="<%= data.event.id %>"/>
+		<input type="hidden" class="id-task" name="task" value="<%= data.task.id %>"/>
 	</form>
-<!--	<div id="calendar_addevent_addattendee"></div>-->
+<!--	<div id="calendar_addtask_addattendee"></div>-->
 
     <div title="" class="menu-container footer-container menu-addtask">
-	    <% if (data.event.id) { %>
+	    <% if (data.task.id) { %>
 			<a title="Exportar" class="button export" href="#">Exportar</a>
 			<a title="Excluir" class="button delete" href="#">Excluir</a>
Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/participants_add_itemlist.ejs
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/participants_add_itemlist.ejs	(revision 6203)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/participants_add_itemlist.ejs	(revision 6876)
@@ -2,8 +2,8 @@
 	<div style="overflow:hidden; width:100%; display:table;">
 		<div class="attendee-options">
-			<%if( !data[0].isDirty && (data[0].acl.organization || data[0].acl.write || data[0].acl.inviteGuests) ){%>
+			<%if( (!data[0].isDirty && data[0].notEvent) || (!data[0].isDirty && data[0].acl && (data[0].acl.organization || data[0].acl.write || data[0].acl.inviteGuests))){%>
 				<a href="#" class="button delegate attendee-options-button-delegate new">Delegar participação a este participante</a>
 			<%}%>
-			<%if(data[0].acl.organization || data[0].acl.write){%>
+			<%if(!data[0].noEvent && data[0].acl && (data[0].acl.organization || data[0].acl.write)){%>
 				<a class="button edit attendee-options-button-edit new">Editar permissões</a>
 			<%}%>
@@ -14,5 +14,7 @@
 		<input type="hidden" name="attendee[]" value="<%= data[0].id %>">
 		<input type="hidden" name="attendeeType[]" value="<%=data[0].isExternal%>">
-		<input type="hidden" name="attendeeAcl[]" value="r">
+		<%if(!data[0].noEvent){%>
+            <input type="hidden" name="attendeeAcl[]" value="r">
+        <%}%>
 		<input type="hidden" name="delegatedFrom[]" value="0">
 		<label title="<%= data[0].name ? data[0].name : '' %>" class="name"><%= data[0].name ? data[0].name : '' %></label>
@@ -20,4 +22,3 @@
 
 	</div>
-	
 </li>
Index: sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/attendees_task.ejs
===================================================================
--- sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/attendees_task.ejs	(revision 6876)
+++ sandbox/2.4.2-expresso1/prototype/modules/calendar/templates/attendees_task.ejs	(revision 6876)
@@ -0,0 +1,168 @@
+    <%var iconStatus = ['','ui-icon-check', 'ui-icon-radio-off', 'ui-icon-close', 'ui-icon-help', 'ui-icon-transferthick-e-w', 'ui-icon-contact']
+      var legendStatus = ['','Confirmado','Tentativa','Cancelado','Sem Resposta','Delegado', 'Participante']
+    %>
+    <dl class="block-attendee-list attendees-list">
+        <dt class="me"><%= data.task.me.user ? data.task.me.user.name : data.task.me.name %></dt>
+        <dd class="me">
+            <select class="status" name="status">
+                <%if(!data.task.delegatedFrom[data.task.me.id]){%>
+                    <option value="1" <%= data.task.status=='1' ? 'selected="selected"':'' %>>Eu vou</option>
+                        <option value="3" <%= data.task.status=='3' ? 'selected="selected"':'' %>>Eu nÃ£o vou</option>
+                        <option value="2" <%= data.task.status=='2' ? 'selected="selected"':'' %>>Talvez</option>
+                        <option class="hidden" value="5">Delegado</option>
+                <%}else{%>
+                    <option value="5" 'selected="selected"'>Delegado</option>
+                <%}%>
+            </select>
+
+            <fieldset class="add-attendee-options-read">
+                <a href="#" class="button participant-delegate add-attendee-options-button">Delegar participaÃ§Ã£o a um novo participante</a>
+            </fieldset>
+
+            <p class="input-group request-update <%=data.task.delegatedFrom[data.task.me.id] ? '' : "hidden"%>">
+                <input type="checkbox" name="receiveNotification" value="true" <%=data.task.me.receiveNotification =='1' ? 'checked="checked"' : ''%>/>
+                <label for="request-update">Receber atualizaÃ§Ãµes</label>
+            </p>
+            
+            <input type="hidden" name="delegatedFrom[]" value="<%=data.task.me.delegatedFrom%>">
+            <input type="hidden" name="attendee[]" value="<%=data.task.me.id%>">
+            <input type="hidden" name="attendeeType[]" value="0">            
+        </dd>
+
+        <dt class="attendee-list">Convidados</dt>
+        <dd class="attendee-list">
+            <ul class="attendee-list">
+                <label for="attendee" title="<%=  data.task.me.user ? data.task.me.user.mail : data.task.me.mail %>" class="mail hidden"></label>
+                
+                <li class="organizer <%= data.task.me.id == data.task.organizer.id ? "hidden" : "" %>"> 
+                    <div style="overflow:hidden; width:100%; display:table;">
+                        <span class="space-status ui-icon <%=iconStatus[data.task.organizer.status]%>" title="<%=legendStatus[data.task.organizer.status]%>"></span>
+                        <span class="space-special ui-icon ui-icon-person" title="Organizador"></span>
+                        
+                        <% if(data.task.me.id != data.task.organizer.id){%> 
+                            <input type="checkbox" value="<%= data.task.organizer.id %>" disabled="disabled">
+                            <input type="hidden" name="attendee[]" value="<%=data.task.organizer.id%>">
+                            <input type="hidden" name="attendeeType[]" value="0">
+                            <input type="hidden" name="delegatedFrom[]" value="<%=data.task.organizer.delegatedFrom%>">
+                        <%}%>
+                        <input type="hidden" name="attendee_organizer" value="<%=data.task.organizer.id%>">
+                        <label for="attendee_organizer" title="<%= data.task.organizer.name ? data.task.organizer.name: '' %>" class="name name-special"><%= data.task.organizer.name ? data.task.organizer.name : '' %></label>
+                        <label for="attendee_organizer" title="<%= data.task.organizer.mail ? data.task.organizer.mail: '' %>" class="mail name-special"><%= data.task.organizer.mail ? data.task.organizer.mail : '' %></label>
+                    </div>
+                </li>
+            <%if(!!data.task.delegatedFrom[data.task.me.id]){
+                var delegated_me = data.task.delegatedFrom[data.task.me.id]%>
+                <li class="me-delegated">
+                    <div style="overflow:hidden; width:100%; display:table;">
+                        <span class="space-status ui-icon <%=iconStatus[delegated_me.status]%>" title="<%=legendStatus[delegated_me.status]%>"></span>
+                        <span class="space-special ui-icon <%=iconStatus[5]%>" title="Delegado para"></span>
+                        <input type="checkbox" value="<%= delegated_me.id%>" disabled="disabled">
+                        <label for="me-delegated" title="<%= delegated_me.name ? delegated_me.name: '' %>" class="name name-special"><%= delegated_me.name ? delegated_me.name : '' %></label>
+                        <label for="me-delegated" title="<%= delegated_me.mail ? delegated_me.mail: '' %>" class="mail name-special"><%= delegated_me.mail ? delegated_me.mail : '' %></label>
+                    </div>
+                </li>
+            <%}%>
+            <% if (data.task && data.task.attendee.length > 0) {
+                for (var i=0; i< data.task.attendee.length; i++) {%>
+                    <li class="attendee"> 
+                        <div style="overflow:hidden; width:100%; display:table;">
+                            <%if(data.task.delegatedFrom[data.task.attendee[i].id]){%>
+                                <span class="open-delegate new ui-icon ui-icon-triangle-1-e"></span>
+                            <%}else{%>
+                                <span class="space-status ui-icon <%=iconStatus[data.task.attendee[i].status]%>" title="<%=legendStatus[data.task.attendee[i].status]%>"></span>
+                            <%}%>
+                            <span class="space-special ui-icon <%= !!data.task.delegatedFrom[data.task.attendee[i].id] ? iconStatus[5] : iconStatus[6]%>" title="<%=!!data.task.delegatedFrom[data.task.attendee[i].id] ? legendStatus[5] : legendStatus[6]%>"></span>
+
+                            <input type="checkbox" class="new" value="<%= data.task.attendee[i].id %>">
+
+                            <input type="hidden" name="attendee[]" value="<%=data.task.attendee[i].id%>">
+                            <input type="hidden" name="attendeeType[]" value="<%=data.task.attendee[i].isExternal%>">
+                            <input type="hidden" name="attendeeAcl[]" value="<%=data.task.attendee[i].acl%>">
+                            <input type="hidden" name="delegatedFrom[]" value="<%=data.task.attendee[i].delegatedFrom%>">
+                            <label title="<%= data.task.attendee[i].name ? data.task.attendee[i].name: '' %>" class="name <%= !!data.task.delegatedFrom[data.task.attendee[i].id] ? "name-special-delegated" : "name-special" %>"><%= data.task.attendee[i].name ? data.task.attendee[i].name : '' %></label>
+                            <label title="<%= data.task.attendee[i].mail ? data.task.attendee[i].mail : ''%>" class="mail <%= !!data.task.delegatedFrom[data.task.attendee[i].id] ? "name-special-delegated" : "name-special"%>"><%= data.task.attendee[i].mail ? data.task.attendee[i].mail : '' %></label>
+                            <span class="ui-icon ui-icon-close ui-corner-all ui-icon-float-right"></span>
+                        </div> 
+                        <div class="attendee-options">
+                            <a class="button close new">Remover</a>
+                        </div>
+
+
+                        <%if(!!data.task.delegatedFrom[data.task.attendee[i].id]){%>
+                            <%var attendee = data.task.delegatedFrom[data.task.attendee[i].id]%>
+                            <% while(attendee != 0){%>
+                                <div class="list-delegates hidden">
+                                    <div style="overflow:hidden; width:100%; display:table;">
+                                        <span class="status-delegate ui-icon <%=iconStatus[attendee.status]%>" title="<%=legendStatus[attendee.status]%>"></span>
+                                        <span class="space-special-delegated ui-icon <%= !!data.task.delegatedFrom[attendee.id] ? iconStatus[5] : iconStatus[6]%>" title="<%=!!data.task.delegatedFrom[attendee.id] ? legendStatus[5] : legendStatus[6]%>"></span>
+                                        <input type="hidden" name="attendee[]" value="<%=attendee.id%>">
+                                        <input type="hidden" name="attendeeType[]" value="<%=attendee.isExternal%>">
+                                        <input type="hidden" name="attendeeAcl[]" value="<%=attendee.acl%>">
+                                        <input type="hidden" name="delegatedFrom[]" value="<%=attendee.delegatedFrom%>">
+                                        <label title="<%= attendee.name ? attendee.name : '' %>" class="name <%=attendee.status == 5 ? "name-status-delegated-delegated" : "name-status-delegated-none"%>"><%= attendee.name ? attendee.name : '' %></label>
+                                        <label title="<%= attendee.mail ? attendee.mail : '' %>" class="mail <%=attendee.status == 5 ? "name-status-delegated-none" : "name-status-delegated-none"%>"><%= attendee.mail ? attendee.mail : '' %></label>
+                                        <span class="ui-icon ui-icon-close ui-corner-all ui-icon-float-right"></span>
+                                    </div> 
+                                </div>
+                                <%attendee = !!data.task.delegatedFrom[attendee.id] ? data.task.delegatedFrom[attendee.id] : 0%>
+                            <%}%>
+                        <%}%>
+                        
+
+                    </li>   
+                <%} 
+            } else if(data.task.me.id == data.task.organizer.id && !(data.task.attendee.length > 0) ) { %>
+                <li class="not-attendee">NÃ£o hÃ¡ outros participantes.</li>
+            <% } %>
+            </ul>
+        </dd>
+        <dd class="attendee-list-add">
+            <fieldset class="add-attendee-input input-field-rounded ui-corner-all">
+                <span class="ui-icon ui-icon-plus"></span>
+                <input class="plus" type="text" />
+            </fieldset>
+        </dd>
+        
+        <div class="ui-widget email-validation hidden">
+            <div style="padding: 0.2em 0.7em; margin-top: 5px;" class="ui-state-highlight ui-corner-all"> 
+                <p class="message">
+                    <span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span> 
+                    <label></label>
+                </p>
+            </div>
+        </div>
+        
+        <dd class="attendee-list-brief">
+        <% if (data.task && data.task.attendee.length > 0) { %>
+          <ul class="attendees-count">
+            <li><label>Sim:</label><%=data.task.statusParticipants.accepted%></li>
+            <li><label>NÃ£o:</label><%=data.task.statusParticipants.cancelled%></li>
+            <li><label>Talvez:</label><%=data.task.statusParticipants.tentative%></li>
+            <li><label>Aguardando:</label><%=data.task.statusParticipants.unanswered%></li>
+          </ul>     
+        <% } %>
+        <% if (data.task && data.task.sizeAttendeeLimit){%>
+        <ul class="attendees-count">
+            <li>Evento com muitos participantes, exibindo os 100 primeiros!</li>
+        </ul>
+        <% } %>
+        </dd>
+        
+    </dl>
+
+<dl class="block-add-attendee search">
+    <dt class="add-attendee search">Adicionar outros convidados</dt>
+    <dd class="add-attendee">
+        <fieldset class="block-add-attendee" title="Participantes">
+            <fieldset class="add-attendee-search search-field ui-corner-all">
+                <input class="search" type="text" />
+                <span class="ui-icon ui-icon-search"></span>
+            </fieldset>
+            <ul class="search-result-list ui-corner-all">
+
+            </ul>
+
+        </fieldset>
+    </dd>
+</dl>
+
