diff -urN projectpier-0.8.0.2.orig/application/controllers/MilestoneController.class.php projectpier-0.8.0.2/application/controllers/MilestoneController.class.php
--- projectpier-0.8.0.2.orig/application/controllers/MilestoneController.class.php 2008-02-14 21:51:56.000000000 -0500
+++ projectpier-0.8.0.2/application/controllers/MilestoneController.class.php 2008-02-26 10:22:25.000000000 -0500
@@ -362,6 +362,31 @@
$this->redirectToReferer($milestone->getViewUrl());
} // open
+ /**
+ * Show calendar view milestone page
+ *
+ * @access public
+ * @param void
+ * @return null
+ */
+ function calendar() {
+ $this->addHelper('textile');
+
+ $project = active_project();
+ $id = get_id();
+ if (strlen($id) == 0) {
+ $id = gmdate('Ym');
+ }
+ if (preg_match('/^(\d{4})(\d{2})$/', $id, $matches)) {
+ tpl_assign('year', $matches[1]);
+ tpl_assign('month', $matches[2]);
+ } else {
+ flash_error(lang('id missing'));
+ $this->redirectToReferer(get_url('milestone'));
+ }
+ tpl_assign('milestones', $project->getMilestones());
+ } // calendar
+
} // MilestoneController
?>
diff -urN projectpier-0.8.0.2.orig/application/views/milestone/calendar.php projectpier-0.8.0.2/application/views/milestone/calendar.php
--- projectpier-0.8.0.2.orig/application/views/milestone/calendar.php 1969-12-31 19:00:00.000000000 -0500
+++ projectpier-0.8.0.2/application/views/milestone/calendar.php 2008-02-26 12:24:42.000000000 -0500
@@ -0,0 +1,120 @@
+getName()))
+ ));
+ if (ProjectMilestone::canAdd(logged_user(), active_project())) {
+ add_page_action(lang('add milestone'), get_url('milestone', 'add'));
+ } // if
+ add_stylesheet_to_page('project/calendar.css');
+
+?>
+
+
+
+
+getDueDate();
+ if ($due->getYear() != $year or $due->getMonth() != $month) {
+ continue;
+ }
+ $calendar[$due->getDay()][] = $milestone;
+ }
+ } // if
+ $thisMonth = gmmktime(0, 0, 0, $month, 1, $year);
+ $prevMonth = strtotime('-1 month', $thisMonth);
+ $nextMonth = strtotime('+1 month', $thisMonth);
+ $daysInMonth = gmdate('d', strtotime('+1 month -1 day', $thisMonth));
+ $daysInWeek = 7;
+ $firstDayOfMonth = gmdate('w', $month_time);
+?>
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+ | |
+
+
+
+
+
+%s'."\n",
+ get_url("milestone", "view", $milestone->getId()),
+ clean($milestone->getName()));
+ }
+?>
+ |
+
+
+
+
+
+ | |
+
+
+
+
+
+
+
+
+
+
diff -urN projectpier-0.8.0.2.orig/application/views/milestone/index.php projectpier-0.8.0.2/application/views/milestone/index.php
--- projectpier-0.8.0.2.orig/application/views/milestone/index.php 2008-02-09 20:45:08.000000000 -0500
+++ projectpier-0.8.0.2/application/views/milestone/index.php 2008-02-26 10:03:03.000000000 -0500
@@ -6,6 +6,7 @@
if (ProjectMilestone::canAdd(logged_user(), active_project())) {
add_page_action(lang('add milestone'), get_url('milestone', 'add'));
} // if
+ add_page_action(lang('view calendar'), get_url('milestone', 'calendar'));
?>
diff -urN projectpier-0.8.0.2.orig/language/en_us/actions.php projectpier-0.8.0.2/language/en_us/actions.php
--- projectpier-0.8.0.2.orig/language/en_us/actions.php 2008-02-17 00:12:58.000000000 -0500
+++ projectpier-0.8.0.2/language/en_us/actions.php 2008-02-26 09:50:49.000000000 -0500
@@ -63,6 +63,7 @@
'add milestone' => 'Add milestone',
'edit milestone' => 'Edit milestone',
'delete milestone' => 'Delete milestone',
+ 'view calendar' => 'View calendar',
// People
'update people' => 'Update',
diff -urN projectpier-0.8.0.2.orig/language/en_us/errors.php projectpier-0.8.0.2/language/en_us/errors.php
--- projectpier-0.8.0.2.orig/language/en_us/errors.php 2008-02-09 20:45:08.000000000 -0500
+++ projectpier-0.8.0.2/language/en_us/errors.php 2008-02-26 10:16:52.000000000 -0500
@@ -12,6 +12,7 @@
// General
'invalid email address' => 'Email address format is not valid',
+ 'id missing' => 'required id value is missing',
// Company validation errors
'company name required' => 'Company / organization name is required',
diff -urN projectpier-0.8.0.2.orig/language/en_us/general.php projectpier-0.8.0.2/language/en_us/general.php
--- projectpier-0.8.0.2.orig/language/en_us/general.php 2008-02-09 20:45:08.000000000 -0500
+++ projectpier-0.8.0.2/language/en_us/general.php 2008-02-26 10:49:32.000000000 -0500
@@ -117,6 +117,14 @@
'month 10' => 'October',
'month 11' => 'November',
'month 12' => 'December',
+
+ 'dow 1' => 'Monday',
+ 'dow 2' => 'Tuesday',
+ 'dow 3' => 'Wednesday',
+ 'dow 4' => 'Thursday',
+ 'dow 5' => 'Friday',
+ 'dow 6' => 'Saturday',
+ 'dow 7' => 'Sunday',
); // array
?>
diff -urN projectpier-0.8.0.2.orig/public/assets/themes/default/stylesheets/project/calendar.css projectpier-0.8.0.2/public/assets/themes/default/stylesheets/project/calendar.css
--- projectpier-0.8.0.2.orig/public/assets/themes/default/stylesheets/project/calendar.css 1969-12-31 19:00:00.000000000 -0500
+++ projectpier-0.8.0.2/public/assets/themes/default/stylesheets/project/calendar.css 2008-02-26 12:26:07.000000000 -0500
@@ -0,0 +1,17 @@
+.calendar .date {
+ padding: 2px;
+ background-color: #d9e8ff;
+ font-weight: bold;
+}
+
+.calendar .month-nav {
+ font-weight: bold;
+}
+
+.calendar .month-nav .prev-month {
+ float: left;
+}
+
+.calendar .month-nav .next-month {
+ float: right;
+}