changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / action / calendarlist.php
1 <?php
2
3 /*
4
5 Displays all calendar entries for a page as an action plugin. 
6
7 Requires the subpages plugin.
8
9 by AndyFundinger
10
11 */
12
13 $ewiki_plugins["action"]['calendarlist'] = "ewiki_action_calendar_list";
14 $ewiki_t["en"]["NOCALENDAR"] = "There are no calendar entries for this page.";          
15
16
17 function ewiki_action_calendar_list($id, $data, $action) {
18   $pages=ewiki_subpage_list($id,CALENDAR_NAME_SEP);
19   
20   foreach($pages as $pageId=>$uu){
21     if(! ewiki_isCalendarId($pageId)){
22       unset($pages[$pageId]);
23     }
24   }
25   
26   if(0==count($pages)){
27     return(ewiki_t("NOCALENDAR"));
28   }else{
29     //ksort($pages);
30     $o = '<div class="calendar_list"><small>'.ewiki_t('CALENDERFOR')." $id:</small><br />";
31     $o .= ewiki_list_pages($pages)."</div>\n";   
32   }
33   
34   return($o);
35 }
36
37 ?>