6.0.0-git
2019-03-20

[#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 2008-12-16 (3746 days ago)
Due
Updated 2008-12-22 (3740 days ago)
Assigned
Resolved 2008-12-22 (3740 days ago)
Milestone
Patch No

History
2008-12-22 03:09:25 Chuck Hagenbuch State ⇒ No Feedback
 
2008-12-16 15:06:35 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);

    }

  }

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