Changeset 7797 for branches


Ignore:
Timestamp:
01/29/13 14:05:33 (6 years ago)
Author:
douglas
Message:

Ticket #3322 - Inconsistência com ícones e telas de edição no Expresso Calendar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/prototype/modules/calendar/schedules.php

    r7702 r7797  
    3131                .'calendar_object.range_end as "rangeEnd", calendar_object.last_update as "lastUpdate", ' 
    3232                .'calendar_object.dtstamp as "dtstamp", calendar_object.sequence as "sequence", ' 
     33                .'count(calendar_task_to_activity_object.id) as "tasks", ' 
    3334                .'calendar_object.tzid as "timezone" ,calendar_to_calendar_object.calendar_id as ' 
    34                 .'calendar FROM calendar_to_calendar_object , calendar_object ' 
     35                .'calendar FROM calendar_object left join calendar_task_to_activity_object on ( calendar_object.id = calendar_task_to_activity_object.calendar_object_activity_id  ), calendar_to_calendar_object ' 
    3536                .'WHERE ( calendar_to_calendar_object.calendar_id IN (\'' . implode('\',\'', $calendars) . '\')) ' 
    3637                .'AND calendar_to_calendar_object.calendar_object_id = calendar_object.id ' 
     
    5354                .'AND calendar_object.dtstart NOT IN (SELECT calendar_repeat_occurrence.occurrence from calendar_repeat_occurrence, ' 
    5455                .'calendar_repeat where (calendar_repeat_occurrence.repeat_id = calendar_repeat.id) ' 
    55                 .'AND (calendar_repeat.object_id = calendar_object.id))'; 
     56                .'AND (calendar_repeat.object_id = calendar_object.id)) group by calendar_object.id, calendar_to_calendar_object.calendar_id'; 
    5657 
    5758        $params = Controller::service('PostgreSQL')->execResultSql($sql.$where); 
     
    7374            .'calendar_object.range_end as "rangeEnd", calendar_object.last_update as "lastUpdate", ' 
    7475            .'calendar_object.dtstamp as "dtstamp", calendar_object.sequence as "sequence", ' 
     76            .'count(calendar_task_to_activity_object.id) as "tasks", ' 
    7577            .'calendar_object.tzid as "timezone" ,calendar_to_calendar_object.calendar_id as ' 
    76             .'calendar FROM calendar_to_calendar_object , calendar_object ' 
     78            .'calendar FROM calendar_object left join calendar_task_to_activity_object on ( calendar_object.id = calendar_task_to_activity_object.calendar_object_activity_id  ), calendar_to_calendar_object ' 
    7779            .'WHERE ( calendar_to_calendar_object.calendar_id IN (\'' . implode('\',\'', $calendars) . '\')) ' 
    7880            .'AND calendar_to_calendar_object.calendar_object_id = calendar_object.id ' 
     
    8082 
    8183 
    82             $where = 'AND (((upper("summary") like upper(\'%'.$summary.'%\') OR upper("description") like upper(\'%'.$description.'%\')))) ORDER BY dtstart LIMIT '.$limit.'  OFFSET '.$offset.' '; 
     84            $where = 'AND (((upper("summary") like upper(\'%'.$summary.'%\') OR upper("description") like upper(\'%'.$description.'%\')))) group by calendar_object.id, calendar_to_calendar_object.calendar_id ORDER BY dtstart LIMIT '.$limit.'  OFFSET '.$offset.' '; 
    8385            $params = Controller::service('PostgreSQL')->execResultSql($sql.$where); 
    8486 
     
    137139                    $attend = $attend[0]; 
    138140 
    139                 $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o")) ? 1 : 0; 
     141                $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") || $attend['isOrganizer'] == '1') ? 1 : 0; 
    140142 
    141143            }else{ 
     
    144146 
    145147            } 
     148            if( $v['type'] == 2 && $v['tasks'] > 0) 
     149                $result[$i]['type'] = 3; 
    146150        } 
    147151 
Note: See TracChangeset for help on using the changeset viewer.