diff options
| author | Hash9 <hash9@users.sourceforge.net> | 2006-02-02 14:39:47 +0000 |
|---|---|---|
| committer | Hash9 <hash9@users.sourceforge.net> | 2006-02-02 14:39:47 +0000 |
| commit | a06df5176d1c67d91fa2e5a2f3b5e2bbcfcf7773 (patch) | |
| tree | 3763e7e558327d602983f651671cf228141cdfa4 | |
| parent | 1f622e8ba676f2aeeda1a3571eec3990652b2a80 (diff) | |
| download | calendar-a06df5176d1c67d91fa2e5a2f3b5e2bbcfcf7773.tar.gz calendar-a06df5176d1c67d91fa2e5a2f3b5e2bbcfcf7773.tar.bz2 calendar-a06df5176d1c67d91fa2e5a2f3b5e2bbcfcf7773.zip | |
add the (default) option to sort by event date
| -rw-r--r-- | Calendar.php | 3 | ||||
| -rw-r--r-- | index.php | 4 | ||||
| -rw-r--r-- | templates/calendar_nav_inc.tpl | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/Calendar.php b/Calendar.php index c4de0de..7bf8a88 100644 --- a/Calendar.php +++ b/Calendar.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.31 2006/01/14 19:56:42 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.32 2006/02/02 14:39:46 hash9 Exp $ * @package calendar */ @@ -47,6 +47,7 @@ class Calendar extends LibertyContent { $item['timestamp'] = $item[$pListHash['calendar_sort_mode']] + $offset; $item['created'] = $item['created'] + $offset; $item['last_modified'] = $item['last_modified'] + $offset; + $item['event_time'] = $item['event_time'] + $offset; $dstart = $this->mDate->gmmktime( 0, 0, 0, $this->mDate->date( "m", $item['timestamp'], true ), $this->mDate->date( "d", $item['timestamp'], true ), $this->mDate->date( "Y", $item['timestamp'], true ) ); $ret[$dstart][] = $item; } @@ -1,6 +1,6 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.37 2006/01/10 21:19:49 squareing Exp $ +// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.38 2006/02/02 14:39:46 hash9 Exp $ // Copyright( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. @@ -66,7 +66,7 @@ $gBitSmarty->assign_by_ref( 'calDay', $calDay = $gCalendar->buildDay( $_SESSION[ if( $_SESSION['calendar']['content_type_guid'] ) { $listHash = $_SESSION['calendar']; $listHash['user_id'] = !empty( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : NULL; - $listHash['sort_mode'] = !empty( $_REQUEST['sort_mode'] ) ? $_REQUEST['sort_mode'] : 'last_modified_asc'; + $listHash['sort_mode'] = !empty( $_REQUEST['sort_mode'] ) ? $_REQUEST['sort_mode'] : 'event_time_asc'; $listHash['offset'] = 0; $listHash['max_records'] = 500; $bitEvents = $gCalendar->getList( $listHash ); diff --git a/templates/calendar_nav_inc.tpl b/templates/calendar_nav_inc.tpl index 92e0390..915a335 100644 --- a/templates/calendar_nav_inc.tpl +++ b/templates/calendar_nav_inc.tpl @@ -6,7 +6,8 @@ <li>{smartlink ititle="Only my items" user_id=$gBitUser->mUserId sort_mode=$smarty.request.sort_mode}</li> {/if} <li>{smartlink ititle="Creation date" isort="created"}</li> - <li>{smartlink ititle="Modification date" idefault=1 isort="last_modified"}</li> + <li>{smartlink ititle="Modification date" isort="last_modified"}</li> + <li>{smartlink ititle="Event time" idefault=1 isort="event_time"}</li> </ul> </div> @@ -19,6 +20,7 @@ <td> <div> {form method="get" id="f"} + <input type="hidden" id="sort_mode" name="sort_mode" value="{$smarty.request.sort_mode}" /> <input type="hidden" id="todate" name="todate" value="{$navigation.focus_date|cal_date_format:"%B %e, %Y %H:%M %Z"}" /> <span class="highlight" style="cursor:pointer;" title="{tr}Date Selector{/tr}" id="datrigger">{$navigation.focus_date|bit_long_date}</span> <small>« {tr}click to navigate{/tr}</small> @@ -27,7 +29,7 @@ <script type="text/javascript">//<