diff --git a/calendar/templates/default/list.tpl b/calendar/templates/default/list.tpl new file mode 100755 index 0000000000..2cd316afdc --- /dev/null +++ b/calendar/templates/default/list.tpl @@ -0,0 +1,8 @@ + + +
+{edit} {delete} +
" . lang("Description") . ": | " - . "$description | "; + if (nl2br($cal_info->description)) { + $phpgw->template->set_var("field",lang("Description")); + $phpgw->template->set_var("data",nl2br($cal_info->description)); + $phpgw->template->parse("output","list",True); } -?> + $phpgw->template->set_var("field",lang("Date")); + $phpgw->template->set_var("data",$phpgw->common->show_date(mktime(0,0,0,$cal_info->month,$cal_info->day,$cal_info->year),"l, F d, Y")); + $phpgw->template->parse("output","list",True); -
: | -db->f(1)); ?> | -
: | -db->f(2)); ?> | -
" . lang("Duration") . ": | " - . $phpgw->db->f(5) . " " . lang("minutes") . " |
: | -db->f(6)]; ?> | -" . lang("Created by") . ": | \n"; + $phpgw->template->set_var("field",lang("Created by")); + $phpgw->template->set_var("data","link("timematrix.php","participants=".$cal_info->owner."&date=".$cal_info->year.$cal_info->month.$cal_info->day) + ."\">".$phpgw->common->grab_owner_name($cal_info->owner).""); + $phpgw->template->parse("output","list",True); - echo "" . $phpgw->db->f(11) . " " . $phpgw->db->f(12) . " | \n"; -?> -
: | -db->f(3)) . " " . display_time($phpgw->db->f(4)); - ?> | -
" . lang("Groups") . ": | ".$cal_groups." |
: | -db->query("SELECT webcal_entry_user.cal_login, accounts.account_lastname, "
- . "accounts.account_firstname, webcal_entry_user.cal_status "
- . "FROM webcal_entry_user, accounts WHERE webcal_entry_user."
- . "cal_id='$id' AND webcal_entry_user.cal_login = accounts."
- . "account_id");
-
- $first = 1;
- while ($phpgw->db->next_record()) {
- if ($first)
- $first = 0;
- else
- echo " "; - if (strlen($phpgw->db->f(1)) > 0) - echo $phpgw->db->f(1) . ", " . $phpgw->db->f(2); - else - echo $phpgw->db->f(0); + if($cal_info->groups) { + $cal_groups = explode(",",$phpgw->accounts->convert_str_to_names_access($cal_info->groups)); + $cal_grps = ""; + for($i=1;$i<=count($cal_groups);$i++) { + if($i>1) $cal_grps .= " "; + $cal_grps .= $cal_groups[$i]; } -?> - |
-
: | -- db->query("SELECT * from webcal_entry_repeats WHERE cal_id=$id"); - $phpgw->db->next_record(); - if (substr($phpgw->db->f(5),0,1) == 'y') - $t_repeat_days = lang("Sunday "); - if (substr($phpgw->db->f(5),1,1) == 'y') - $t_repeat_days .= lang("Monday "); - if (substr($phpgw->db->f(5),2,1) == 'y') - $t_repeat_days .= lang("Tuesday "); - if (substr($phpgw->db->f(5),3,1) == 'y') - $t_repeat_days .= lang("Wednesday "); - if (substr($phpgw->db->f(5),4,1) == 'y') - $t_repeat_days .= lang("Thursday "); - if (substr($phpgw->db->f(5),5,1) == 'y') - $t_repeat_days .= lang("Friday "); - if (substr($phpgw->db->f(5),6,1) == 'y') - $t_repeat_days .= lang("Saturday "); - - echo $phpgw->db->f(2) . " ("; - if ($phpgw->db->f(3)) - echo "ends: " . $phpgw->db->f(3) . ", "; - if ($phpgw->db->f(2) == 'weekly') - echo lang("days repeated") . ": " . $t_repeat_days . ", "; - - echo lang("frequency") . ": " . $phpgw->db->f(4) . ")"; - - ?> - - |
-
-link("edit_entry.php","id=$id") . "\">"
- . lang("Edit") . "
\nlink("delete.php","id=$id") . "\" onClick=\"return confirm('"
- . lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.") . "');\">" . lang("Delete") . "
\n";
+ $phpgw->template->set_var("field",lang("Groups"));
+ $phpgw->template->set_var("data",$cal_grps);
+ $phpgw->template->parse("output","list",True);
}
-?>
-participants);$i++) {
+ if($i) $str .= "
";
+ $str .= $phpgw->common->grab_owner_name($cal_info->participants[$i]);
+ }
+ $phpgw->template->set_var("field",lang("Participants"));
+ $phpgw->template->set_var("data",$str);
+ $phpgw->template->parse("output","list",True);
+
+// Repeated Events
+ $str = $cal_info->rpt_type;
+ if($str <> "none" || ($cal_info->rpt_end_month && $cal_info->rpt_end_day && $cal_info->rpt_end_year)) {
+ $str .= " (";
+ if($cal_info->rpt_end_month && $cal_info->rpt_end_day && $cal_info->rpt_end_year)
+ $str .= lang("ends").": ".$phpgw->common->show_date(mktime(0,0,0,$cal_info->rpt_end_month,$cal_info->rpt_end_day,$cal_info->rpt_end_year),"l, F d, Y")." ";
+ if($cal_info->rpt_type == "weekly") {
+ if ($cal_info->rpt_sun)
+ $repeat_days = add_day($repeat_days,lang("Sunday "));
+ if ($cal_info->rpt_mon)
+ $repeat_days = add_day($repeat_days,lang("Monday "));
+ if ($cal_info->rpt_tue)
+ $repeat_days = add_day($repeat_days,lang("Tuesay "));
+ if ($cal_info->rpt_wed)
+ $repeat_days = add_day($repeat_days,lang("Wednesday "));
+ if ($cal_info->rpt_thu)
+ $repeat_days = add_day($repeat_days,lang("Thursday "));
+ if ($cal_info->rpt_fri)
+ $repeat_days = add_day($repeat_days,lang("Friday "));
+ if ($cal_info->rpt_sat)
+ $repeat_days = add_day($repeat_days,lang("Saturday "));
+ $str .= lang("days repeated").": ".$repeat_days;
+ }
+ if($cal_info->rpt_freq) $str .= lang("frequency")." ".$cal_info->rpt_freq;
+ $str .= ")";
+
+ $phpgw->template->set_var("field",lang("Repetition"));
+ $phpgw->template->set_var("data",$str);
+ $phpgw->template->parse("output","list",True);
+ }
+
+ if ($is_my_event) {
+ $phpgw->template->set_var("edit","link("edit_entry.php","id=$id")."\">".lang("Edit")."");
+ $phpgw->template->set_var("delete","link("delete.php","id=$id")."\" onClick=\"return confirm('".lang("Are you sure\\nyou want to\\ndelete this entry ?\\n\\nThis will delete\\nthis entry for all users.")."');\">".lang("Delete")."");
+ } else {
+ $phpgw->template->set_var("edit","");
+ $phpgw->template->set_var("delete","");
+ }
+ $phpgw->template->pparse("out","view_end");
$phpgw->common->phpgw_footer();
?>
-