6.0.0-beta1
7/4/25

[#7785] Sidebyside: create an Event into a specific calendar
Summary Sidebyside: create an Event into a specific calendar
Queue Kronolith
Queue Version 2.3
Type Enhancement
State No Feedback
Priority 1. Low
Owners
Requester patrick.abiven (at) apitech (dot) fr
Created 12/16/2008 (6044 days ago)
Due
Updated 12/22/2008 (6038 days ago)
Assigned
Resolved 12/22/2008 (6038 days ago)
Milestone
Patch No

History
12/22/2008 03:09:25 AM Chuck Hagenbuch State ⇒ No Feedback
 
12/16/2008 03:08:26 PM Chuck Hagenbuch Comment #4 Reply to this comment
12/16/2008 03:06:35 PM patrick (dot) abiven (at) apitech (dot) fr Comment #3 Reply to this comment
Since you've got it worked out, could you please upload a patch?
In lib/Views/Day.php, line 100 and line 276, I add the following code:



            if ($this->_sidebyside

            &&  count($this->_currentCalendars) == 1) {



                foreach( $this->_currentCalendars as $cid => $cal) {

                    if ($cid != Kronolith::getDefaultCalendar(PERMS_EDIT)) {

                       $newEventUrl = Util::addParameter($newEventUrl,

                                                         'calendar', $cid);

                    }

                }

            }



In template/week/head.inc line 30, I add the following code:

if ( $this->_sidebyside

   && count($this->_currentCalendars) == 1)

{

  foreach($this->_currentCalendars as $cid => $cal)

  {

    if ( $cid != Kronolith::getDefaultCalendar(PERMS_EDIT) )

    {

      $addurl = Util::addParameter($addurl, 'calendar', $cid);

    }

  }

}
12/16/2008 02:47:41 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Since you've got it worked out, could you please upload a patch?
12/16/2008 01:53:48 PM patrick (dot) abiven (at) apitech (dot) fr Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Sidebyside: create an Event into a specific calendar
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
State ⇒ New
Reply to this comment
Hello

When the preference 'side_by_side' in active, from the Day and Week 
view, the 'Create a New Event' button always redirects to the default 
calendar (event when a distinct calendar is displayed).



If there is only one calendar displayed, it would be great if the new 
event dialog box could be initialized with this specific calendar.



This can be done by changing 2 files:

- lib/Views/Day.php

- templates/Week/head.inc

by adding a test on side_by_side and count(_currentCalendars) and then 
add the 'calendar' argument to the url.

Regards

Patrick

Saved Queries