Sfoglia il codice sorgente

Minor fix in the admin agenda

Julio Montoya 13 anni fa
parent
commit
c042a88f9a
2 ha cambiato i file con 11 aggiunte e 8 eliminazioni
  1. 3 1
      main/calendar/agenda_js.php
  2. 8 7
      main/template/default/agenda/month.tpl

+ 3 - 1
main/calendar/agenda_js.php

@@ -73,7 +73,9 @@ $tpl->assign('button_text', 		json_encode(array(	'today'	=> get_lang('Today'),
 														'day'	=> get_lang('Day'))));
 
 if (api_is_allowed_to_edit(false,true) OR (api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous()) && api_is_allowed_to_session_edit(false,true)) {
-	$actions = display_courseadmin_links();
+    if ($type == 'course') {
+        $actions = display_courseadmin_links();
+    }
 
 	$tpl->assign('actions', $actions);
 }

+ 8 - 7
main/template/default/agenda/month.tpl

@@ -173,12 +173,13 @@ $(document).ready(function() {
 					var end_date 	= Math.round(calEvent.end.getTime() / 1000);				
 				}
 				
-				$('#visible_to_input').hide();
-				$('#visible_to_read_only').show();				
-				$('#add_as_announcement_div').hide();
-				
-				$("#visible_to_read_only_users").html(calEvent.sent_to);
-				
+				$('#visible_to_input').hide();                
+                $('#add_as_announcement_div').hide();
+                			
+                {if $type != 'admin'}
+                    $('#visible_to_read_only').show();
+                    $("#visible_to_read_only_users").html(calEvent.sent_to);
+				{/if}
 				$('#color_calendar').html('{$type_label}');
 				$('#color_calendar').addClass('label_tag');
 								
@@ -218,7 +219,7 @@ $(document).ready(function() {
 									calEvent.title 			= $("#title").val();
 									calEvent.start 			= calEvent.start;
 									calEvent.end 			= calEvent.end;									
-									calEvent.allDay 		= calEvent.allDay;
+									calEvent.allDay         = calEvent.allDay;
 									calEvent.description 	= $("#content").val();
 																	
 									calendar.fullCalendar('updateEvent',