summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-09 12:52:21 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-09 12:52:21 +0100
commite9e885da98b0cc7b949d5f2f34abcdfbbf75e60c (patch)
treef41c673c575946ffcff90ed4d9d616d9c654995c /user_guide_src
parent2af226fed018552cad3bdccd17f6be37873e0022 (diff)
parent2e914b7dc6acaf2938fac4c332ff682a033b93d7 (diff)
Merge pull request #2802 from marcossffilho/develop
Calendar Updates
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst7
-rw-r--r--user_guide_src/source/libraries/calendar.rst41
2 files changed, 31 insertions, 17 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 22c6d8f02..c186781d1 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -187,7 +187,7 @@ Release Date: Not Released
- Server version checking is now done via ``mysqli::$server_info`` instead of running an SQL query.
- Added persistent connections support for PHP >= 5.3.
- Added support for ``backup()`` in :doc:`Database Utilities <database/utilities>`.
- - Changed methods ``trans_begin()``, ``trans_commit()`` and ``trans_rollback()`` to use the PHP API instead of sending queries.
+ - Changed methods ``trans_begin()``, ``trans_commit()`` and ``trans_rollback()`` to use the PHP API instead of sending queries.
- Improved support of the PDO driver, including:
@@ -281,6 +281,11 @@ Release Date: Not Released
- Added **file_ext_tolower** config setting.
- Added **mod_mime_fix** option to disable suffixing multiple file extensions with an underscore.
+ - :doc:`Calendar library <libraries/calendar>` changes include:
+
+ - Added configuration to generate days of other months instead of blank cells.
+ - Auto set *next_prev_url* if it is empty and *show_prev_next* is set to TRUE.
+
- :doc:`Cart library <libraries/cart>` changes include:
- ``insert()`` now auto-increments quantity for an item when inserted twice instead of resetting it, this is the default behaviour of large e-commerce sites.
diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst
index 3964db25e..e24ee80b8 100644
--- a/user_guide_src/source/libraries/calendar.rst
+++ b/user_guide_src/source/libraries/calendar.rst
@@ -86,21 +86,23 @@ The above code would start the calendar on saturday, use the "long"
month heading, and the "short" day names. More information regarding
preferences below.
-====================== =========== =============================================== ===================================================================
-Preference Default Options Description
-====================== =========== =============================================== ===================================================================
-**template** None None A string containing your calendar template.
- See the template section below.
-**local_time** time() None A Unix timestamp corresponding to the current time.
-**start_day** sunday Any week day (sunday, monday, tuesday, etc.) Sets the day of the week the calendar should start on.
-**month_type** long long, short Determines what version of the month name to use in the header.
- long = January, short = Jan.
-**day_type** abr long, short, abr Determines what version of the weekday names to use in
- the column headers. long = Sunday, short = Sun, abr = Su.
-**show_next_prev** FALSE TRUE/FALSE (boolean) Determines whether to display links allowing you to toggle
- to next/previous months. See information on this feature below.
-**next_prev_url** None A URL Sets the basepath used in the next/previous calendar links.
-====================== =========== =============================================== ===================================================================
+====================== ================= =============================================== ===================================================================
+Preference Default Options Description
+====================== ================= =============================================== ===================================================================
+**template** None None A string containing your calendar template.
+ See the template section below.
+**local_time** time() None A Unix timestamp corresponding to the current time.
+**start_day** sunday Any week day (sunday, monday, tuesday, etc.) Sets the day of the week the calendar should start on.
+**month_type** long long, short Determines what version of the month name to use in the header.
+ long = January, short = Jan.
+**day_type** abr long, short, abr Determines what version of the weekday names to use in
+ the column headers. long = Sunday, short = Sun, abr = Su.
+**show_next_prev** FALSE TRUE/FALSE (boolean) Determines whether to display links allowing you to toggle
+ to next/previous months. See information on this feature below.
+**next_prev_url** controller/method A URL Sets the basepath used in the next/previous calendar links.
+**show_other_days** FALSE TRUE/FALSE (boolean) Determines whether to display days of other months that share the
+ first or last week of the calendar month.
+====================== ================= =============================================== ===================================================================
Showing Next/Previous Month Links
@@ -123,7 +125,8 @@ You'll notice a few things about the above example:
- You must set the "show_next_prev" to TRUE.
- You must supply the URL to the controller containing your calendar in
- the "next_prev_url" preference.
+ the "next_prev_url" preference. If you don't, it will be set to the current
+ *controller/method*.
- You must supply the "year" and "month" to the calendar generating
function via the URI segments where they appear (Note: The calendar
class automatically adds the year/month to the base URL you
@@ -154,6 +157,8 @@ pair of pseudo-variables as shown here::
{cal_row_start}<tr>{/cal_row_start}
{cal_cell_start}<td>{/cal_cell_start}
+ {cal_cell_start_today}<td>{/cal_cell_start_today}
+ {cal_cell_start_other}<td class="other-month">{/cal_cell_start_other}
{cal_cell_content}<a href="{content}">{day}</a>{/cal_cell_content}
{cal_cell_content_today}<div class="highlight"><a href="{content}">{day}</a></div>{/cal_cell_content_today}
@@ -163,7 +168,11 @@ pair of pseudo-variables as shown here::
{cal_cell_blank}&nbsp;{/cal_cell_blank}
+ {cal_cell_other}{day}{cal_cel_other}
+
{cal_cell_end}</td>{/cal_cell_end}
+ {cal_cell_end_today}</td>{/cal_cell_end_today}
+ {cal_cell_end_other}</td>{/cal_cell_end_other}
{cal_row_end}</tr>{/cal_row_end}
{table_close}</table>{/table_close}