mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-05 21:09:52 +01:00
week template
This commit is contained in:
parent
cec8e1be2e
commit
638971e167
@ -14,7 +14,9 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
if (isset($friendly) && $friendly==1){
|
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_calendar_class" => True, "enable_nextmatchs_class" => True, "enable_template_class" => True);
|
||||||
|
|
||||||
|
if (isset($friendly) && (int)$friendly==1){
|
||||||
$phpgw_info["flags"]["noheader"] = True;
|
$phpgw_info["flags"]["noheader"] = True;
|
||||||
$phpgw_info["flags"]["nonavbar"] = True;
|
$phpgw_info["flags"]["nonavbar"] = True;
|
||||||
$phpgw_info["flags"]["nocalendarheader"] = True;
|
$phpgw_info["flags"]["nocalendarheader"] = True;
|
||||||
@ -22,7 +24,6 @@
|
|||||||
$friendly = 0;
|
$friendly = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_calendar_class" => True, "enable_nextmatchs_class" => True, "enable_template_class" => True);
|
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
$view = "day";
|
$view = "day";
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<!-- $Id$ -->
|
||||||
<!-- BEGIN day -->
|
<!-- BEGIN day -->
|
||||||
{printer_friendly}
|
{printer_friendly}
|
||||||
<table border="0" width="100%">
|
<table border="0" width="100%">
|
||||||
|
39
calendar/templates/default/week.tpl
Executable file
39
calendar/templates/default/week.tpl
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
<!-- $Id$ -->
|
||||||
|
<!-- BEGIN week -->
|
||||||
|
{printer_friendly}
|
||||||
|
<head>
|
||||||
|
<style type="text/css">
|
||||||
|
.tablecell {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<table border=0 width=100%>
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="top">
|
||||||
|
{small_calendar_prev}
|
||||||
|
</td>
|
||||||
|
<td align="left">
|
||||||
|
{prev_week_link}
|
||||||
|
</td>
|
||||||
|
<td align="center" valign="top">
|
||||||
|
{small_calendar_this}
|
||||||
|
<font size="+2" color="{bg_text"}">
|
||||||
|
<b>{week_identifier}</b>
|
||||||
|
</font>
|
||||||
|
<font size="+1" color="{bg_text}"><br>
|
||||||
|
{username}
|
||||||
|
</font>
|
||||||
|
</td>
|
||||||
|
<td align="right">
|
||||||
|
{next_week_link}
|
||||||
|
</td>
|
||||||
|
<td align="right" valign="top">
|
||||||
|
{small_calendar_next}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{week_display}
|
||||||
|
{print}
|
||||||
|
<!-- END week -->
|
@ -13,12 +13,13 @@
|
|||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_calendar_class" => True, "enable_nextmatchs_class" => True);
|
||||||
if (isset($friendly) && $friendly){
|
if (isset($friendly) && $friendly){
|
||||||
$phpgw_info["flags"]["noheader"] = True;
|
$phpgw_info["flags"]["noheader"] = True;
|
||||||
|
$phpgw_info["flags"]["nonavbar"] = True;
|
||||||
} else {
|
} else {
|
||||||
$friendly = 0;
|
$friendly = 0;
|
||||||
}
|
}
|
||||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_calendar_class" => True, "enable_nextmatchs_class" => True);
|
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
if(!isset($phpgw_info["user"]["preferences"]["calendar"]["weekdaystarts"]))
|
if(!isset($phpgw_info["user"]["preferences"]["calendar"]["weekdaystarts"]))
|
||||||
@ -56,75 +57,53 @@
|
|||||||
}
|
}
|
||||||
$first = $phpgw->calendar->splitdate($phpgw->calendar->get_sunday_before($thisyear, $thismonth, $thisday) + $start);
|
$first = $phpgw->calendar->splitdate($phpgw->calendar->get_sunday_before($thisyear, $thismonth, $thisday) + $start);
|
||||||
$last = $phpgw->calendar->splitdate($first["raw"] + 518400);
|
$last = $phpgw->calendar->splitdate($first["raw"] + 518400);
|
||||||
|
$phpgw->template->set_file(array("week" => "week.tpl"));
|
||||||
|
|
||||||
|
$phpgw->template->set_block("week");
|
||||||
|
|
||||||
if ($friendly) {
|
if ($friendly) {
|
||||||
echo "<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">";
|
$phpgw->template->set_var("printer_friendly","<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">");
|
||||||
$view = "week";
|
} else {
|
||||||
|
$phpgw->template->set_var("printer_friendly","");
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<head>
|
$phpgw->template->set_var("bg_text",$phpgw_info["theme"]["bg_text"]);
|
||||||
<style type="text/css">
|
|
||||||
.tablecell {
|
$phpgw->template->set_var("small_calendar_prev",$phpgw->calendar->pretty_small_calendar($thisday,$prevmonth["month"],$prevmonth["year"],"day.php"));
|
||||||
width: 80px;
|
if (!$friendly) {
|
||||||
height: 80px;
|
$phpgw->template->set_var("prev_week_link","<a href=\"".$phpgw->link("week.php","year=".$prev["year"]."&month=".$prev["month"]."&day=".$prev["day"])."\"><<</a>");
|
||||||
|
} else {
|
||||||
|
$phpgw->template->set_var("prev_week_link","<<");
|
||||||
}
|
}
|
||||||
</style>
|
$phpgw->template->set_var("small_calendar_this",$phpgw->calendar->pretty_small_calendar($thisday,$thismonth,$thisyear,"day.php"));
|
||||||
</head>
|
|
||||||
<table border=0 width=100%>
|
$week_id = lang(strftime("%B",$first["raw"]))." ".$first["day"];
|
||||||
<tr>
|
if($first["month"] <> $last["month"] && $first["year"] <> $last["year"]) $week_id .= ", ".$first["year"];
|
||||||
<?php
|
$week_id .= " - ";
|
||||||
echo "<td align=\"left\" valign=\"top\">";
|
if($first["month"] <> $last["month"]) $week_id .= lang(strftime("%B",$last["raw"]))." ";
|
||||||
echo $phpgw->calendar->pretty_small_calendar($thisday,$prevmonth["month"],$prevmonth["year"],"day.php");
|
$week_id .= $last["day"].", ".$last["year"];
|
||||||
echo "</td>";
|
|
||||||
echo "<td align=\"left\">";
|
$phpgw->template->set_var("week_identifier",$week_id);
|
||||||
if (!$friendly)
|
$phpgw->template->set_var("username",$phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]));
|
||||||
echo "<a href=\"".$phpgw->link("week.php","year=".$prev["year"]."&month=".$prev["month"]."&day=".$prev["day"])."\">";
|
|
||||||
echo "<<";
|
|
||||||
if(!friendly) echo "</a>";
|
|
||||||
echo "</td>";
|
|
||||||
echo "<td align=\"center\" valign=\"top\">";
|
|
||||||
echo $phpgw->calendar->pretty_small_calendar($thisday,$thismonth,$thisyear,"day.php");
|
|
||||||
?>
|
|
||||||
<font size="+2" color="<?php echo $phpgw_info["theme"]["bg_text"]; ?>"><b>
|
|
||||||
<?php
|
|
||||||
echo lang(strftime("%B",$first["raw"]))." ".$first["day"];
|
|
||||||
if($first["month"] <> $last["month"] && $first["year"] <> $last["year"]) echo ", ".$first["year"];
|
|
||||||
echo " - ";
|
|
||||||
if($first["month"] <> $last["month"]) echo lang(strftime("%B",$last["raw"]))." ";
|
|
||||||
echo $last["day"].", ".$last["year"];
|
|
||||||
?>
|
|
||||||
</b></font>
|
|
||||||
<font size="+1" color="<?php echo $phpgw_info["theme"]["bg_text"]; ?>">
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
echo $phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]);
|
|
||||||
?>
|
|
||||||
</font></td>
|
|
||||||
<?php
|
|
||||||
echo "<td align=\"right\">";
|
|
||||||
if (!$friendly)
|
|
||||||
echo "<a href=\"".$phpgw->link("week.php","year=".$next["year"]."&month=".$next["month"]."&day=".$next["day"])."\">";
|
|
||||||
echo ">>";
|
|
||||||
if(!friendly) echo "</a>";
|
|
||||||
echo "</td>";
|
|
||||||
echo "<td align=\"right\" valign=\"top\">";
|
|
||||||
echo $phpgw->calendar->pretty_small_calendar($thisday,$nextmonth["month"],$nextmonth["year"],"day.php");
|
|
||||||
echo "</td>";
|
|
||||||
?>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?php
|
|
||||||
echo $phpgw->calendar->display_large_week($thisday,$thismonth,$thisyear,true);
|
|
||||||
|
|
||||||
if (!$friendly) {
|
if (!$friendly) {
|
||||||
$param = "";
|
$phpgw->template->set_var("next_week_link","<a href=\"".$phpgw->link("week.php","year=".$next["year"]."&month=".$next["month"]."&day=".$next["day"])."\">>></a>");
|
||||||
if ($thisyear)
|
} else {
|
||||||
$param .= "year=$thisyear&month=$thismonth&";
|
$phpgw->template->set_var("next_week_link",">>");
|
||||||
|
}
|
||||||
|
$phpgw->template->set_var("small_calendar_next",$phpgw->calendar->pretty_small_calendar($thisday,$nextmonth["month"],$nextmonth["year"],"day.php"));
|
||||||
|
$phpgw->template->set_var("week_display",$phpgw->calendar->display_large_week($thisday,$thismonth,$thisyear,true));
|
||||||
|
|
||||||
$param .= "friendly=1";
|
if (!$friendly) {
|
||||||
echo "<a href=\"".$phpgw->link($PHP_SELF,$param)."\" target=\"cal_printer_friendly\" onMouseOver=\"window.status='"
|
$param = "year=".$now["year"]."&month=".$now["month"]."&friendly=1\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window."
|
||||||
.lang("Generate printer-friendly version")."'\">[" . lang("Printer Friendly") . "]</a>";
|
. "status = '" . lang("Generate printer-friendly version"). "'";
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->template->set_var("print","<a href=\"".$phpgw->link($PHP_SELF,$param)."\">[". lang("Printer Friendly") . "]</A>");
|
||||||
|
$phpgw->template->parse("out","week");
|
||||||
|
$phpgw->template->pparse("out","week");
|
||||||
|
$phpgw->common->phpgw_footer();
|
||||||
|
} else {
|
||||||
|
$phpgw->template->set_var("print","");
|
||||||
|
$phpgw->template->parse("out","week");
|
||||||
|
$phpgw->template->pparse("out","week");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user