summaryrefslogtreecommitdiffstats
path: root/system/libraries/Calendar.php
diff options
context:
space:
mode:
authorWes Baker <wes@wesbaker.com>2012-05-07 22:49:33 +0200
committerWes Baker <wes@wesbaker.com>2012-05-07 22:49:33 +0200
commitd348135ed2131e5fa41dfa0ea7254d2f6759f3e0 (patch)
tree14cfc61c47686b895acd9e49b45c559d311195cc /system/libraries/Calendar.php
parentbb2c83bddbf51c42815be3de60eab24fd87ae392 (diff)
parentd207c9218531afe666168c1f5f59abd1bc19a8aa (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Conflicts: system/core/Security.php
Diffstat (limited to 'system/libraries/Calendar.php')
-rw-r--r--system/libraries/Calendar.php92
1 files changed, 69 insertions, 23 deletions
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index b6f145d95..4db754f5e 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -38,14 +38,60 @@
*/
class CI_Calendar {
+ /**
+ * Reference to CodeIgniter instance
+ *
+ * @var object
+ */
protected $CI;
- public $lang;
+
+ /**
+ * Current local time
+ *
+ * @var int
+ */
public $local_time;
+
+ /**
+ * Calendar layout template
+ *
+ * @var string
+ */
public $template = '';
+
+ /**
+ * Day of the week to start the calendar on
+ *
+ * @var string
+ */
public $start_day = 'sunday';
+
+ /**
+ * How to display months
+ *
+ * @var string
+ */
public $month_type = 'long';
+
+ /**
+ * How to display names of days
+ *
+ * @var string
+ */
public $day_type = 'abr';
+
+ /**
+ * Whether to show next/prev month links
+ *
+ * @var bool
+ */
public $show_next_prev = FALSE;
+
+ /**
+ * Url base to use for next/prev month links
+ *
+ * @var bool
+ */
public $next_prev_url = '';
/**
@@ -403,28 +449,28 @@ class CI_Calendar {
public function default_template()
{
return array (
- 'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',
- 'heading_row_start' => '<tr>',
- 'heading_previous_cell' => '<th><a href="{previous_url}">&lt;&lt;</a></th>',
- 'heading_title_cell' => '<th colspan="{colspan}">{heading}</th>',
- 'heading_next_cell' => '<th><a href="{next_url}">&gt;&gt;</a></th>',
- 'heading_row_end' => '</tr>',
- 'week_row_start' => '<tr>',
- 'week_day_cell' => '<td>{week_day}</td>',
- 'week_row_end' => '</tr>',
- 'cal_row_start' => '<tr>',
- 'cal_cell_start' => '<td>',
- 'cal_cell_start_today' => '<td>',
- 'cal_cell_content' => '<a href="{content}">{day}</a>',
- 'cal_cell_content_today' => '<a href="{content}"><strong>{day}</strong></a>',
- 'cal_cell_no_content' => '{day}',
- 'cal_cell_no_content_today' => '<strong>{day}</strong>',
- 'cal_cell_blank' => '&nbsp;',
- 'cal_cell_end' => '</td>',
- 'cal_cell_end_today' => '</td>',
- 'cal_row_end' => '</tr>',
- 'table_close' => '</table>'
- );
+ 'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',
+ 'heading_row_start' => '<tr>',
+ 'heading_previous_cell' => '<th><a href="{previous_url}">&lt;&lt;</a></th>',
+ 'heading_title_cell' => '<th colspan="{colspan}">{heading}</th>',
+ 'heading_next_cell' => '<th><a href="{next_url}">&gt;&gt;</a></th>',
+ 'heading_row_end' => '</tr>',
+ 'week_row_start' => '<tr>',
+ 'week_day_cell' => '<td>{week_day}</td>',
+ 'week_row_end' => '</tr>',
+ 'cal_row_start' => '<tr>',
+ 'cal_cell_start' => '<td>',
+ 'cal_cell_start_today' => '<td>',
+ 'cal_cell_content' => '<a href="{content}">{day}</a>',
+ 'cal_cell_content_today' => '<a href="{content}"><strong>{day}</strong></a>',
+ 'cal_cell_no_content' => '{day}',
+ 'cal_cell_no_content_today' => '<strong>{day}</strong>',
+ 'cal_cell_blank' => '&nbsp;',
+ 'cal_cell_end' => '</td>',
+ 'cal_cell_end_today' => '</td>',
+ 'cal_row_end' => '</tr>',
+ 'table_close' => '</table>'
+ );
}
// --------------------------------------------------------------------