Results 1 to 9 of 9

Thread: Status of Calendar Meetings

  1. #1
    kblackwell is offline Sugar Community Member
    Join Date
    Jul 2008
    Posts
    69

    Default Status of Calendar Meetings

    Our sales manager asked me to look into adding a feature on the calendar.

    When a person is going on a sales call, they post it on the calendar. He views all the users through the shared calendar feature. These are some of changes he asked me to look into.

    1. Currently in the calendar, there's only 3 status. Planned, Held, and not held. He would like to remove held and replace it with 2 additional drop boxes. Held - Moving ahead and Held - closed.

    2. Another feature he requested is when he's looking at the shared view, he would like to see if it's possible to color the meeting based on the status of the meeting.

    Is any of that possible by default or do I need to put on my programming hat?

    Thanks

  2. #2
    clint's Avatar
    clint is offline Sugar Team Member | Forums Lead Moderator
    Join Date
    Aug 2004
    Location
    Silicon Valley
    Posts
    2,120

    Default Re: Status of Calendar Meetings

    Quote Originally Posted by kblackwell
    1. Currently in the calendar, there's only 3 status. Planned, Held, and not held. He would like to remove held and replace it with 2 additional drop boxes. Held - Moving ahead and Held - closed.

    2. Another feature he requested is when he's looking at the shared view, he would like to see if it's possible to color the meeting based on the status of the meeting.
    #1 is simple. Just change the dropdown values using Studio (accessed from the Admin screen).

    #2 would require some coding.
    Sugar Developer Zone - developer resources | Sugar University - user and admin training
    Sugar Docs - user and admin documentation |
    Sugar Bug Tracker - Enter or view bugs
    SugarForge- open source modules, themes, lang packs | SugarExchange - commercial extensions

    Clint Oram
    Chief Technology Officer and Co-founder
    SugarCRM

  3. #3
    kblackwell is offline Sugar Community Member
    Join Date
    Jul 2008
    Posts
    69

    Default Re: Status of Calendar Meetings

    If anyone need this in the future, this is what you need to do to color the calendar.

    This is for the standard user calendar.

    switch ($app_list_strings['meeting_status_dom'][$act->sugar_bean->status]) {
    case "Planned":
    //echo "bgcolor=\"#ffffff\"";
    break;
    case "Held - Moving Forward":
    $color = "style=\"background-color:green\"";
    break;
    case "Held - Status Quo":
    $color = "style=\"background-color:yellow\"";
    break;
    case "Held - No Action":
    $color = "style=\"background-color:red\"";
    break;
    case "Not - Held":
    break;
    }

    Than add this to this line

    before

    <td width="100%" ><a ' . $extra . ' href="index.php?module=Meetings&action=DetailView& record=' .

    after

    <td width="100%" ' . $color . '><a ' . $extra . ' href="index.php?module=Meetings&action=DetailView& record=' .

    To do it on the shared calendar

    if(empty($act->sugar_bean->name)) {
    echo "<td width=\"100%\">".
    $timedate->to_display_time($act->sugar_bean->time_start, true, false);
    echo "</td></tr>";
    } else {
    //Added BG color to shared Calendar
    //echo "finder";
    //echo ($app_list_strings['meeting_status_dom'][$act->sugar_bean->status]);
    //echo "finder2";

    echo "<td ";
    switch ($app_list_strings['meeting_status_dom'][$act->sugar_bean->status]) {
    case "Planned":
    //echo "bgcolor=\"#ffffff\"";
    break;
    case "Held - Moving Forward":
    echo "style=\"background-color:green\"";
    break;
    case "Held - Status Quo":
    echo "style=\"background-color:yellow\"";
    break;
    case "Held - No Action":
    echo "style=\"background-color:red\"";
    break;
    case "Not - Held":
    break;

    }
    //echo "<td width=\"100%\">
    echo " width=\"100%\">
    <a href=\"index.php?module=Meetings&action=DetailView &record=".
    $act->sugar_bean->id."\">".
    $app_list_strings['meeting_status_dom'][$act->sugar_bean->status].":".
    $act->sugar_bean->name."<br>(".
    $timedate->to_display_time($act->sugar_bean->time_start, true, false).")
    </a>";


    That worked for me.

  4. #4
    titobustillo is offline Sugar Community Member
    Join Date
    Jan 2010
    Posts
    56

    Default Re: Status of Calendar Meetings

    But...which file must be edited? Thanks

  5. #5
    kblackwell is offline Sugar Community Member
    Join Date
    Jul 2008
    Posts
    69

    Default Re: Status of Calendar Meetings

    templates_calendar.php

  6. #6
    titobustillo is offline Sugar Community Member
    Join Date
    Jan 2010
    Posts
    56

    Default Re: Status of Calendar Meetings

    Hi Kblackwell,

    Where I must to write the code in Template file to standard view ?? Thanks again

  7. #7
    blablaz is offline Senior Member
    Join Date
    Jan 2011
    Posts
    25

    Default Re: Status of Calendar Meetings

    Same question as above, where does this code go inside template_calendar.php ??

    Thanks in advance!

  8. #8
    blablaz is offline Senior Member
    Join Date
    Jan 2011
    Posts
    25

    Default Re: Status of Calendar Meetings

    Ok all figured out. These are the steps to follow:

    -------------SugarCRM 6.1---------------

    File: ****/modules/Calendar/templates/template_calendar.php

    There are 2 things to do to to be able to color the meetings depending on their status:
    - Create a $color variable with different values depending on the status.
    -Use the $color variable in the call to show the calendar:

    ------------------------------------------------------------------------------
    1st :
    In line 143 (right after else { $meetingStatus = ''; } ) , you need to add the following code:

    PHP Code:
    switch ($app_list_strings['meeting_status_dom'][$act->sugar_bean->status]) {
                            case 
    "Planned":
                            
    $color "style=\"background-color:red\"";
                            break;
                            case 
    "Held":
                            
    $color "style=\"background-color:green\"";
                            break;
                            case 
    "Not Held":
                            
    $color "style=\"background-color:grey\"";
                            break;
                            } 

    2nd :
    In line 155 we need to make a little modification to add the $color variable we created:
    PHP Code:
    <td width="100%" '.$color.' ><' . $extra . ' href="index.php?module=Meetings&action=DetailView&record=' . 

  9. #9
    titobustillo is offline Sugar Community Member
    Join Date
    Jan 2010
    Posts
    56

    Default Re: Status of Calendar Meetings

    Thanks, thanks, thanks!!! It works like a charm..just what I need.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. No past meetings shown in calendar
    By cenforsberg in forum Help
    Replies: 0
    Last Post: 2007-03-16, 03:15 PM
  2. calendar not showing "todays" meetings
    By cameron in forum Downloads
    Replies: 1
    Last Post: 2006-04-04, 10:25 AM
  3. Replies: 0
    Last Post: 2005-09-24, 10:27 PM
  4. Replies: 2
    Last Post: 2005-04-16, 07:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •