Changeset 1481
- Timestamp:
- 03/17/10 20:35:56 (4 months ago)
- bzr:base-revision:
- svn-v4:a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk:1468
- bzr:committer:
- cawanpink <cawan.nuhaa@gmail.com
- bzr:file-ids:
app/models/decision.php 1@a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk%2Fapp%2Fmodels%2Fdecision.php
app/vendors/shells/cron.php 165@a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk%2Fapp%2Fvendors%2Fshells%2Fcron.php
app/vendors/shells/install.php 121@a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk%2Fapp%2Fvendors%2Fshells%2Finstall.php
app/views/decisions/printminutes.ctp 1261@a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk%2Fapp%2Fviews%2Fdecisions%2Fprintminutes.ctp
app/views/elements/minutes/display_minute_item.ctp 1065@a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk%2Fapp%2Fviews%2Felements%2Fminutes%2Fdisplay_minute_item.ctp
app/views/meetings/view.ctp 1@a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk%2Fapp%2Fviews%2Fmeetings%2Fview.ctp
app/webroot/css/lpp.css lpp.css-20100317124049-npqgre7m9b6395pp-1
app/webroot/css/minutes.css 437@a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk%2Fapp%2Fwebroot%2Fcss%2Fminutes.css- bzr:mapping-version:
- v4
- bzr:repository-uuid:
- a8d4ffef-5c3f-4892-ae7f-56d30e424451
- bzr:revision-id:
- cawan.nuhaa@gmail.com-20100317124058-z035t0a8006fm0gi
- bzr:revno:
- 1186
- bzr:revprop:branch-nick:
- trunk
- bzr:root:
- trunk
- bzr:text-parents:
app/models/decision.php svn-v4:a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk:1454
app/vendors/shells/cron.php svn-v4:a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk:1452
app/vendors/shells/install.php cawan.nuhaa@gmail.com-20100125100755-0nw3v5o8bf00wbhp
app/views/decisions/printminutes.ctp svn-v4:a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk:1391
app/views/elements/minutes/display_minute_item.ctp svn-v4:a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk:1394
app/views/meetings/view.ctp svn-v4:a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk:1436
app/webroot/css/minutes.css svn-v4:a8d4ffef-5c3f-4892-ae7f-56d30e424451:trunk:1393- bzr:timestamp:
- 2010-03-17 20:40:58.806999922 +0800
- bzr:user-agent:
- bzr2.1.0+bzr-svn1.0.2
- svn:original-date:
- 2010-03-17T12:40:58.807000Z
- Location:
- trunk/app
- Files:
-
- 1 added
- 7 modified
-
models/decision.php (modified) (2 diffs)
-
vendors/shells/cron.php (modified) (2 diffs)
-
vendors/shells/install.php (modified) (2 diffs)
-
views/decisions/printminutes.ctp (modified) (4 diffs)
-
views/elements/minutes/display_minute_item.ctp (modified) (2 diffs)
-
views/meetings/view.ctp (modified) (1 diff)
-
webroot/css/lpp.css (added)
-
webroot/css/minutes.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/models/decision.php
r1454 r1481 959 959 960 960 961 function getArrows($levels, $meetingid){962 $level_array = array('up'=>1, 'down'=>1);963 $new_key = $new_level = $new_level_key = array();964 $total_result = count($levels);965 $i = $ii = $a = 1;966 $mainsum = 0;967 968 if ( count($levels) > 0 ) {969 foreach ($levels as $key => $level) { array_push($new_key, $key); }970 971 foreach ($levels as $level) {972 if ( $level == 0 ) { $mainsum++; }973 }974 foreach($levels as $key => $level ){975 $pre = $next = 99;976 $key_value = array_search($key, $new_key);977 $current = $levels[$key];978 if ( $key_value > 0 ) {979 $pre = $levels[$new_key[$key_value-1]];980 }981 if ( $i < $total_result ) {982 $next = $levels[$new_key[$key_value+1]];983 }984 if ( $pre == 99 && $next == 99 ) {985 $a = 4;986 } else {987 988 if ( $ii < $mainsum ) {989 if ( $pre == 99 ) {990 $a = 2;991 }992 993 if ( $next == 99 ) {994 $a = 3;995 }996 997 if ( $current > $pre ) {998 $parent = $this->getparentnode($new_key[$key_value]);999 $parent = $parent['Decision']['id'];1000 $numberofchild = $this->treeparent($parent, $meetingid);1001 if ( $numberofchild > 1 ) {1002 $a = 2;1003 } else {1004 $a = 4;1005 } 1006 } else {1007 if ( $current > $next ) {1008 $a = 3;1009 }1010 }1011 1012 } else {1013 1014 if ( $current != 0) {1015 $parent = $this->getparentnode($new_key[$key_value]);1016 $parent = $parent['Decision']['id'];1017 $numberofchild = $this->treeparent($parent, $meetingid);1018 if ( $numberofchild > 1 ) {1019 if ( $current > $pre ) {1020 $a = 2;1021 }1022 if ( $next == 99 || ($current > $next) ) {1023 $a = 3;1024 }1025 } else {1026 $a = 4;1027 }1028 } else {1029 $a = 3;1030 }1031 }1032 }1033 1034 $level_array = array('up'=>1, 'down'=>1);1035 if ( $a == 2 ) { $level_array = array('up'=>0, 'down'=>1); }1036 if ( $a == 3 ) { $level_array = array('up'=>1, 'down'=>0); }1037 if ( $a == 4 ) { $level_array = array('up'=>0, 'down'=>0); }1038 array_push($new_level_key, $key);1039 array_push($new_level, $level_array);1040 if ( $current == 0 ) {1041 $ii++;1042 }1043 $i++;1044 $a = 1;1045 }1046 return array_combine($new_level_key, $new_level);1047 } else {1048 return NULL;1049 }1050 1051 1052 }1053 1054 1055 function treeparent($parent, $meetingid){1056 $numberofchild = 0;1057 if ( $parent ) {1058 $child = $this->query("SELECT lft, rght FROM decisions WHERE id=".$parent);1059 $lft = $child[0]['decisions']['lft'];1060 $rght = $child[0]['decisions']['rght'];1061 $diff = $rght - $lft;1062 1063 if ( $diff > 1 ) {1064 $childlists = $this->query("SELECT count(id) as total FROM decisions WHERE meeting_id =".$meetingid." AND deleted = 0 AND lft > ".$lft." AND rght <=".$rght );1065 $numberofchild = $childlists[0][0]['total'];1066 }1067 }1068 return $numberofchild;1069 }961 function getArrows($levels, $meetingid){ 962 $level_array = array('up'=>1, 'down'=>1); 963 $new_key = $new_level = $new_level_key = array(); 964 $total_result = count($levels); 965 $i = $ii = $a = 1; 966 $mainsum = 0; 967 968 if ( count($levels) > 0 ) { 969 foreach ($levels as $key => $level) { array_push($new_key, $key); } 970 971 foreach ($levels as $level) { 972 if ( $level == 0 ) { $mainsum++; } 973 } 974 foreach($levels as $key => $level ){ 975 $pre = $next = 99; 976 $key_value = array_search($key, $new_key); 977 $current = $levels[$key]; 978 if ( $key_value > 0 ) { 979 $pre = $levels[$new_key[$key_value-1]]; 980 } 981 if ( $i < $total_result ) { 982 $next = $levels[$new_key[$key_value+1]]; 983 } 984 if ( $pre == 99 && $next == 99 ) { 985 $a = 4; 986 } else { 987 988 if ( $ii < $mainsum ) { 989 if ( $pre == 99 ) { 990 $a = 2; 991 } 992 993 if ( $next == 99 ) { 994 $a = 3; 995 } 996 997 if ( $current > $pre ) { 998 $parent = $this->getparentnode($new_key[$key_value]); 999 $parent = $parent['Decision']['id']; 1000 $numberofchild = $this->treeparent($parent, $meetingid); 1001 if ( $numberofchild > 1 ) { 1002 $a = 2; 1003 } else { 1004 $a = 4; 1005 } 1006 } else { 1007 if ( $current > $next ) { 1008 $a = 3; 1009 } 1010 } 1011 1012 } else { 1013 1014 if ( $current != 0) { 1015 $parent = $this->getparentnode($new_key[$key_value]); 1016 $parent = $parent['Decision']['id']; 1017 $numberofchild = $this->treeparent($parent, $meetingid); 1018 if ( $numberofchild > 1 ) { 1019 if ( $current > $pre ) { 1020 $a = 2; 1021 } 1022 if ( $next == 99 || ($current > $next) ) { 1023 $a = 3; 1024 } 1025 } else { 1026 $a = 4; 1027 } 1028 } else { 1029 $a = 3; 1030 } 1031 } 1032 } 1033 1034 $level_array = array('up'=>1, 'down'=>1); 1035 if ( $a == 2 ) { $level_array = array('up'=>0, 'down'=>1); } 1036 if ( $a == 3 ) { $level_array = array('up'=>1, 'down'=>0); } 1037 if ( $a == 4 ) { $level_array = array('up'=>0, 'down'=>0); } 1038 array_push($new_level_key, $key); 1039 array_push($new_level, $level_array); 1040 if ( $current == 0 ) { 1041 $ii++; 1042 } 1043 $i++; 1044 $a = 1; 1045 } 1046 return array_combine($new_level_key, $new_level); 1047 } else { 1048 return NULL; 1049 } 1050 1051 1052 } 1053 1054 1055 function treeparent($parent, $meetingid){ 1056 $numberofchild = 0; 1057 if ( $parent ) { 1058 $child = $this->query("SELECT lft, rght FROM decisions WHERE id=".$parent); 1059 $lft = $child[0]['decisions']['lft']; 1060 $rght = $child[0]['decisions']['rght']; 1061 $diff = $rght - $lft; 1062 1063 if ( $diff > 1 ) { 1064 $childlists = $this->query("SELECT count(id) as total FROM decisions WHERE meeting_id =".$meetingid." AND deleted = 0 AND lft > ".$lft." AND rght <=".$rght ); 1065 $numberofchild = $childlists[0][0]['total']; 1066 } 1067 } 1068 return $numberofchild; 1069 } 1070 1070 1071 1071 function checkMinuteType($committee){ … … 1086 1086 1087 1087 function changetoHTML($invitees){ 1088 $inviteeList = "<span class='textbold'>Attendance List:</span><div id='minutestable' >"; 1088 $inviteeList = ''; 1089 $inviteeList.= "<table cellpadding='2' cellspacing='2' class='att_list'>"; 1090 $i = 1; 1089 1091 foreach ( $invitees as $invitee ) { 1090 $inviteeList .= "- ".$invitee['User']['name']."<br />"; 1091 } 1092 $inviteeList .= "</div><br>"; 1092 $inviteeList .= "<tr><td class='number'>".$i++.".</td><td class='name'>".$invitee['User']['name']."</td></tr>"; 1093 //$inviteeList .= "<tr><td> </td><td class='post'>post</td></tr>"; 1094 } 1095 $inviteeList .= "</table>"; 1093 1096 return $inviteeList; 1094 1097 } 1095 1096 function getMeetingId($decisionID) {1097 $MeetingID = $this->query("SELECT meeting_id, lft, rght, parent_id FROM decisions WHERE id =".$decisionID);1098 return $MeetingID[0]['decisions'];1099 }1100 1101 1102 function DecisionMoveDown($DecisionId) {1103 $detail = $this->getdetails($DecisionId);1104 $DownRecord = $this->query("SELECT id, lft, rght FROM decisions WHERE deleted=0 AND meeting_id=".$detail['meeting_id']." AND lft>".$detail['rght']." ORDER BY lft ASC");1105 $DownRecord = $DownRecord[0]['decisions'];1106 1107 if ( $DownRecord['id'] ) {1108 //using moveup to move up the record1109 $this->DecisionMoveUp($DownRecord['id']);1110 }1111 1112 } 1113 1114 function DecisionMoveUp($DecisionId){1115 $detail = $this->getdetails($DecisionId);1116 $UpRecord = $this->query("SELECT id, lft, rght FROM decisions WHERE deleted=0 AND meeting_id=".$detail['meeting_id']." AND rght<".$detail['lft']." ORDER BY rght DESC LIMIT 1");1117 $UpRecord = $UpRecord[0]['decisions'];1118 $betweens = $this->query("SELECT id FROM decisions WHERE rght < ".$detail['lft']." AND rght > ".$UpRecord['rght']." ORDER BY lft ASC");1119 $MinReq = $detail['lft']-$UpRecord['lft'];1120 $AddReq = ( $detail['rght'] - $MinReq + 1 ) - $UpRecord['lft'];1121 $uplists = $this->TreeListing($detail['lft'], $detail['rght'], $detail['meeting_id']);1122 $downlists = $this->TreeListing($UpRecord['lft'], $UpRecord['rght'], $detail['meeting_id'] );1123 1124 foreach ( $uplists as $uplist ) {1125 $this->UpdateMoveUp($uplist['decisions']['id'], $MinReq);1126 }1127 1128 foreach ($downlists as $downlist ) {1129 $this->UpdateMoveDown($downlist['decisions']['id'], $AddReq);1130 }1131 1132 foreach ( $betweens as $between ) {1133 $this->UpdateMoveDown($between['decisions']['id'], $AddReq);1134 }1135 }1136 1137 function TreeListing($lft, $rght, $meeting_id) {1138 return $this->query("SELECT id FROM decisions WHERE deleted=0 AND lft>=".$lft." AND rght<=".$rght." AND meeting_id=".$meeting_id." ORDER BY lft");1139 }1140 1141 function getdetails($DecisionId) {1142 $details = $this->query("SELECT meeting_id, lft, rght FROM decisions WHERE deleted=0 AND id=".$DecisionId);1143 return $details[0]['decisions'];1144 }1145 1146 function UpdateMoveUp($id,$total) {1147 $this->query("UPDATE decisions SET lft=lft-".$total.", rght=rght-".$total." WHERE id=".$id, false);1148 }1149 1150 function UpdateMoveDown($id, $total) {1151 $this->query("UPDATE decisions SET lft=lft+".$total.", rght=rght+".$total." WHERE id=".$id, false);1152 }1098 1099 function getMeetingId($decisionID) { 1100 $MeetingID = $this->query("SELECT meeting_id, lft, rght, parent_id FROM decisions WHERE id =".$decisionID); 1101 return $MeetingID[0]['decisions']; 1102 } 1103 1104 1105 function DecisionMoveDown($DecisionId) { 1106 $detail = $this->getdetails($DecisionId); 1107 $DownRecord = $this->query("SELECT id, lft, rght FROM decisions WHERE deleted=0 AND meeting_id=".$detail['meeting_id']." AND lft>".$detail['rght']." ORDER BY lft ASC"); 1108 $DownRecord = $DownRecord[0]['decisions']; 1109 1110 if ( $DownRecord['id'] ) { 1111 //using moveup to move up the record 1112 $this->DecisionMoveUp($DownRecord['id']); 1113 } 1114 1115 } 1116 1117 function DecisionMoveUp($DecisionId){ 1118 $detail = $this->getdetails($DecisionId); 1119 $UpRecord = $this->query("SELECT id, lft, rght FROM decisions WHERE deleted=0 AND meeting_id=".$detail['meeting_id']." AND rght<".$detail['lft']." ORDER BY rght DESC LIMIT 1"); 1120 $UpRecord = $UpRecord[0]['decisions']; 1121 $betweens = $this->query("SELECT id FROM decisions WHERE rght < ".$detail['lft']." AND rght > ".$UpRecord['rght']." ORDER BY lft ASC"); 1122 $MinReq = $detail['lft']-$UpRecord['lft']; 1123 $AddReq = ( $detail['rght'] - $MinReq + 1 ) - $UpRecord['lft']; 1124 $uplists = $this->TreeListing($detail['lft'], $detail['rght'], $detail['meeting_id']); 1125 $downlists = $this->TreeListing($UpRecord['lft'], $UpRecord['rght'], $detail['meeting_id'] ); 1126 1127 foreach ( $uplists as $uplist ) { 1128 $this->UpdateMoveUp($uplist['decisions']['id'], $MinReq); 1129 } 1130 1131 foreach ($downlists as $downlist ) { 1132 $this->UpdateMoveDown($downlist['decisions']['id'], $AddReq); 1133 } 1134 1135 foreach ( $betweens as $between ) { 1136 $this->UpdateMoveDown($between['decisions']['id'], $AddReq); 1137 } 1138 } 1139 1140 function TreeListing($lft, $rght, $meeting_id) { 1141 return $this->query("SELECT id FROM decisions WHERE deleted=0 AND lft>=".$lft." AND rght<=".$rght." AND meeting_id=".$meeting_id." ORDER BY lft"); 1142 } 1143 1144 function getdetails($DecisionId) { 1145 $details = $this->query("SELECT meeting_id, lft, rght FROM decisions WHERE deleted=0 AND id=".$DecisionId); 1146 return $details[0]['decisions']; 1147 } 1148 1149 function UpdateMoveUp($id,$total) { 1150 $this->query("UPDATE decisions SET lft=lft-".$total.", rght=rght-".$total." WHERE id=".$id, false); 1151 } 1152 1153 function UpdateMoveDown($id, $total) { 1154 $this->query("UPDATE decisions SET lft=lft+".$total.", rght=rght+".$total." WHERE id=".$id, false); 1155 } 1153 1156 1154 1157 /* -
trunk/app/vendors/shells/cron.php
r1452 r1481 11 11 $this->emails(); 12 12 } 13 14 function mail() { 15 $this->out("Executing Mail command"); 16 /* 17 $this->SwiftMailer->instance->smtpType = 'ssl'; 18 $this->SwiftMailer->instance->smtpHost = 'smtp.gmail.com'; 19 $this->SwiftMailer->instance->smtpPort = 587; 20 $this->SwiftMailer->instance->smtpUsername = 'admin@cawanpink.net'; 21 $this->SwiftMailer->instance->smtpPassword = 'ivoryrabbit40'; 22 */ 23 //$this->SwiftMailer->instance->smtpType = 'ssl'; 24 $this->SwiftMailer->instance->smtpHost = 'mail.msaworldwide.com.my'; 25 $this->SwiftMailer->instance->smtpPort = 26; 26 $this->SwiftMailer->instance->smtpUsername = 'nuhaa+msaworldwide.com.my'; 27 $this->SwiftMailer->instance->smtpPassword = 'nuhaa123'; 13 28 29 $this->SwiftMailer->instance->sendAs = 'html'; 30 $this->SwiftMailer->instance->from = 'my_email@gmail.com'; 31 $this->SwiftMailer->instance->fromName = 'TEST'; 32 $this->SwiftMailer->instance->to = array( 33 'my_email@gmail.com' => 'recepient 1', 34 'receiver@bad-domain.org' => 'recepient 2' 35 ); 36 $this->SwiftMailer->instance->setTimeout = 30; 37 38 $this->SwiftMailer->set('message', 'Smack my mailer shell'); 39 $this->SwiftMailer->instance->registerPlugin('LoggerPlugin', new Swift_Plugins_Loggers_EchoLogger()); 40 41 try { 42 if(!$this->SwiftMailer->instance->send('im_excited', 'My subject')) { 43 foreach($this->SwiftMailer->instance->postErrors as $failed_send_to) { 44 $this->log("Failed to send email to: $failed_send_to"); 45 $this->out("Failed to send email to: $failed_send_to"); 46 } 47 } 48 } 49 catch(Exception $e) { 50 $this->log("Failed to send email: ".$e->getMessage()); 51 $this->out("Failed to send email: ".$e->getMessage()); 52 } 53 $this->out("Finished Mail command"); 54 } 55 14 56 function emails(){ 15 57 $this->out("Executing Mail command"); … … 29 71 switch (Configure::read('email_method')){ 30 72 case 'smtp': 73 //$this->SwiftMailer->instance->smtpType = 'tls'; 31 74 $this->SwiftMailer->instance->smtpHost = Configure::read('smtp_host'); 32 75 $this->SwiftMailer->instance->smtpPort = Configure::read('smtp_port'); -
trunk/app/vendors/shells/install.php
r1449 r1481 275 275 App::import('Model','Minutetype'); 276 276 $minutetypes=array( 277 array('MAMPU',"[%summary]<br/>[%minutes]<br/>[%signature]<br/>[%attendance]"), 278 array('OSCC',"[%summary]<br/>[%attendance]<br/>[%minutes]<br/>[%signature]"), 277 array('MAMPU',"[%summary]<br/>[%minutes]<br/>[%signature]<br/>[%attendance]",'mampu'), 278 array('OSCC',"[%summary]<br/>[%attendance]<br/>[%minutes]<br/>[%signature]",'oscc'), 279 array('Lembaga Pertubuhan Peladang',"[%summary]<br/>[%attendance]<br/>[%minutes]<br/>[%signature]",'lpp'), 279 280 ); 280 281 $this->Minutetype=& new Minutetype(null); … … 285 286 $data['type']=$type[0]; 286 287 $data['format']=$type[1]; 288 $data['code']=$type[2]; 287 289 $this->Minutetype->create(); 288 290 $this->Minutetype->save($data); -
trunk/app/views/decisions/printminutes.ctp
r1391 r1481 1 1 <?php 2 2 echo $html->css($minuteType['code'],'stylesheet',array(),false); 3 ?> 4 <div id="minutes_container"> 3 5 6 <div class="minutes_status"> 7 <?php 4 8 if ($minutes_approved ) { 5 echo __('Minutes status'). ': '.__('Approved',true);9 echo __('Minutes status').": <span class='minutes_status_approved'>".__('Approved',true)."</span>"; 6 10 } else { 7 echo __('Minutes status'). ': '.__('Pending approval',true);11 echo __('Minutes status').": <span class='minutes_status_pending'>".__('Pending approval',true)."</span>"; 8 12 if ($chairperson) { 9 13 echo "<div class='approve_minutes'>"; … … 12 16 } 13 17 } 14 18 ?> 19 </div> 20 <?php 15 21 16 22 $title = (!empty($pengerusis))?strtotitle($pangkat).' '.strtotitle($pengerusis['User']['name']).', '.$pengerusis['User']['job_title']:' '; 17 $summary = '<h2>Meeting\'s Minute<br/>'.$meeting['Meeting']['meeting_title'].' '.$meeting['Meeting']['meeting_num'].'</h2> 18 <center> 19 <table border="0" width="600" cellpadding="2" align="center" class="header"> 23 $summary = 24 '<div class="minutes_summary"> 25 <h2 class="title">'.__('Minutes',true).'<br/>'.$meeting['Meeting']['meeting_title'].'<br/>'.$meeting['Meeting']['meeting_num'].'</h2> 26 27 <table cellpadding="2" align="center" class="header"> 20 28 <tr> 21 29 <td align="left" valign="top" width="30%">Date</td> … … 44 52 </tr> 45 53 </table> 46 </center> 47 <p class="line"> </p> 48 <br/>'; 54 </div> 55 '; 49 56 50 57 51 $minutes = '<div id="minutestable">'.$this->element("minutes/displayminutes",array("decisions"=>$decisions,"meetingid"=>$meetingid)).'</div><br>'; 52 $attendance = $invitees; 58 $minutes = '<div id="minutestable">'.$this->element("minutes/displayminutes",array("decisions"=>$decisions,"meetingid"=>$meetingid)).'</div>'; 59 60 $attendance = '<div id="att"><h3 class="att_title">'.__("Attendance List",true).':</h3>'; 61 $attendance.= $invitees.'</div>'; 62 53 63 $signature = '<div id="minutestable"><p class="signature">Signature:<br><br><br>---------------------------------</p></div>'; 54 64 55 $phrase = $minuteType['format'];65 $phrase = '<div id="minutes_wrap">'.$minuteType['format'].'</div>'; 56 66 $source = array("[%summary]", "[%attendance]", "[%minutes]", "[%signatures]"); 57 67 $list = array($summary, $attendance, $minutes, $signature); … … 60 70 echo $newphrase; 61 71 ?> 62 72 </div> -
trunk/app/views/elements/minutes/display_minute_item.ctp
r1394 r1481 1 1 <table cellspacing='0' cellpadding='0' class='minuteitem' id='minuteitem_<?php echo $node;?>' width='100%'> 2 2 <tr> 3 <td width='30' valign="top" ><?php echo $numbering[0];?></td>3 <td width='30' valign="top" class="minuteitem_number"><?php echo $numbering[0];?></td> 4 4 <td width='10'></td> 5 <td colspan='2' valign="top" >6 <?php7 $decision_id = $decision['Decision']['id'];8 if ( isset($report) != 1 ) {9 echo "<div >";10 if ( $arrows[$decision_id]['up'] == 1 ) {11 echo $html->link($html->image('icons/go-up.png'),array('committee'=>$dcommittee['Committee']['short_name'],'controller'=>'decisions','action'=>'promote2','id'=>$decision_id),null,null,false);12 } else {13 echo $html->image('icons/blank.png');14 }15 if ( $arrows[$decision_id]['down'] == 1 ) { 16 echo $html->link($html->image('icons/go-down.png'),array('committee'=>$dcommittee['Committee']['short_name'],'controller'=>'decisions','action'=>'demote2','id'=>$decision_id),null,null,false);17 } 18 echo "<div>"; 19 }20 ?>21 <?php if ( isset($report) != 1 ) { ?>22 <div id='displayminute_<?php echo $node;?>'>23 <?php } ?>24 <?php echo $decision['Decision']['description'];?>25 <?php if ( isset($report) != 1 ) { ?>26 </div>27 <?php } ?>28 <?php29 if (isset($decision['0'])) {30 $num_attach = count($decision['0']);31 echo "<span class='attachment'>Attachment:</span> ";32 for ($i=0;$i<$num_attach;$i++) {33 echo "<span id='att2".$decision['0'][$i]['id']."'><a href='../../../".$decision['0'][$i]['file']."'>".$decision['0'][$i]['filename']."</a></span>";34 if ($i < $num_attach-1) {35 echo ", ";36 }37 }38 }39 ?>5 <td colspan='2' valign="top" class="minuteitem_item"> 6 <?php 7 $decision_id = $decision['Decision']['id']; 8 if ( isset($report) != 1 ) { 9 echo "<div >"; 10 if ( $arrows[$decision_id]['up'] == 1 ) { 11 echo $html->link($html->image('icons/go-up.png'),array('committee'=>$dcommittee['Committee']['short_name'],'controller'=>'decisions','action'=>'promote2','id'=>$decision_id),null,null,false); 12 } else { 13 echo $html->image('icons/blank.png'); 14 } 15 if ( $arrows[$decision_id]['down'] == 1 ) { 16 echo $html->link($html->image('icons/go-down.png'),array('committee'=>$dcommittee['Committee']['short_name'],'controller'=>'decisions','action'=>'demote2','id'=>$decision_id),null,null,false); 17 } 18 echo "<div>"; 19 } 20 ?> 21 <?php if ( isset($report) != 1 ) { ?> 22 <div id='displayminute_<?php echo $node;?>'> 23 <?php } ?> 24 <?php echo $decision['Decision']['description'];?> 25 <?php if ( isset($report) != 1 ) { ?> 26 </div> 27 <?php } ?> 28 <?php 29 if (isset($decision['0'])) { 30 $num_attach = count($decision['0']); 31 echo "<span class='attachment'>Attachment:</span> "; 32 for ($i=0;$i<$num_attach;$i++) { 33 echo "<span id='att2".$decision['0'][$i]['id']."'><a href='../../../".$decision['0'][$i]['file']."'>".$decision['0'][$i]['filename']."</a></span>"; 34 if ($i < $num_attach-1) { 35 echo ", "; 36 } 37 } 38 } 39 ?> 40 40 </td> 41 41 </tr> … … 44 44 <td> </td> 45 45 <td> 46 <?php47 if ( isset($report) != 1 ) {48 ?>49 <div id='displayform_<?php echo $node;?>'>50 <?php echo $this->element('minutes/decision_links',array('node'=>$node,'meetingid'=>$meetingid,'id'=>$decision['Decision']['id'])); ?>51 </div>52 <?php53 }54 ?>46 <?php 47 if ( isset($report) != 1 ) { 48 ?> 49 <div id='displayform_<?php echo $node;?>'> 50 <?php echo $this->element('minutes/decision_links',array('node'=>$node,'meetingid'=>$meetingid,'id'=>$decision['Decision']['id'])); ?> 51 </div> 52 <?php 53 } 54 ?> 55 55 </td> 56 <td class=' actionby'>56 <td class='minuteitem_actionby'> 57 57 <?php 58 58 $new_userlist = isset($decision['Decision']['Userlist'][0])?$decision['Decision']['Userlist'][0]:false; 59 59 $new_grouplist = isset($decision['Decision']['Grouplist'][0])?$decision['Decision']['Grouplist'][0]:false; 60 60 if ( $new_userlist || $new_grouplist ) { 61 $num_userlist = count($new_userlist);62 $num_grouplist = count($new_grouplist);63 echo "<span class='actionby'>Action By</span> ";64 if ( $num_userlist > 0 ) {65 for ($i=0;$i<$num_userlist;$i++) {66 echo $new_userlist[$i];67 if ($i < $num_userlist-1 ||($i==$num_userlist-1 && $num_grouplist >0)) {68 echo ", ";69 }70 }71 }72 if ( $num_grouplist > 0 ) {73 for ($i=0;$i<$num_grouplist;$i++) {74 echo $new_grouplist[$i];75 if ($i < $num_grouplist-1) {76 echo ", ";77 } 78 }79 }80 echo " - <span class='due'>Due</span> ".$decision['Decision']['deadline'];81 } else {82 echo "<span class='information'>Information</span> ";83 }61 $num_userlist = count($new_userlist); 62 $num_grouplist = count($new_grouplist); 63 echo "<span class='actionby'>".__('Action By',true)."</span> "; 64 if ( $num_userlist > 0 ) { 65 for ($i=0;$i<$num_userlist;$i++) { 66 echo "<span class='name'>".$new_userlist[$i]."</span> "; 67 if ($i < $num_userlist-1 ||($i==$num_userlist-1 && $num_grouplist >0)) { 68 echo ", "; 69 } 70 } 71 } 72 if ( $num_grouplist > 0 ) { 73 for ($i=0;$i<$num_grouplist;$i++) { 74 echo "<span class='name'>".$new_grouplist[$i]."</span> "; 75 if ($i < $num_grouplist-1) { 76 echo ", "; 77 } 78 } 79 } 80 echo "<span class='due'>".__('Due',true)."</span> <span class='duedate'>".$decision['Decision']['deadline']."</span>"; 81 } else { 82 echo "<span class='information'>".__('Information',true)."</span> "; 83 } 84 84 ?> 85 85 </td> 86 86 </tr> 87 87 </table> 88 <?php 89 if ( isset($report) != 1 ) { 90 ?> 88 91 <p class="hr_line" > </p> 92 <?php 93 } 94 ?> -
trunk/app/views/meetings/view.ctp
r1436 r1481 46 46 echo ' [ '.$html->link(__('View Minutes', true), array('committee'=>$dcommittee['Committee']['short_name'],'action'=>'minutes',$meeting['Meeting']['id']), array('target'=>'_blank')).'] '; 47 47 echo ' [ '.$html->link(__("View Report",true),array('committee'=>$dcommittee['Committee']['short_name'],'controller'=>'reports','action'=>'meeting','id'=>$meeting['Meeting']['id']),array('target'=>'_blank')).' ] '; 48 echo ' [ '.$html->link(__("Print Minutes",true),array('committee'=>$dcommittee['Committee']['short_name'],'controller'=>'decisions','action'=>'printminutes','id'=>$meeting['Meeting']['id']) ).' ]';48 echo ' [ '.$html->link(__("Print Minutes",true),array('committee'=>$dcommittee['Committee']['short_name'],'controller'=>'decisions','action'=>'printminutes','id'=>$meeting['Meeting']['id']),array('target'=>'_blank')).' ]'; 49 49 } else if (!$secretariat[$meeting['Meeting']['id']] || !$minutes_approved) { 50 50 __('Not yet approved by the chairperson'); -
trunk/app/webroot/css/minutes.css
r1393 r1481 57 57 div.minute_form div.formbox .form {margin: 10px;} 58 58 59 60 div#minutestable { 61 62 } 63 div#minutestable .minuteitem_number{ 64 65 } 66 div#minutestable .minuteitem_item{ 67 padding-bottom: 10px; 68 } 69 div#minutestable .minuteitem_actionby{ 70 text-align:right; 71 padding-bottom: 10px; 72 } 73 div#minutestable .minuteitem_actionby .actionby{ 74 font-weight: bold; 75 } 76 div#minutestable .minuteitem_actionby .name{ 77 78 } 79 div#minutestable .minuteitem_actionby .due{ 80 font-weight: bold; 81 } 82 div#minutestable .minuteitem_actionby .duedate{ 83 84 } 85 div#minutestable .minuteitem_actionby .information{ 86 87 } 88 div#minutestable .minuteitem_actionby .attachment{ 89 90 } 91 92 59 93 span.textbold{ 60 font-weight: bold;94 font-weight: bold; 61 95 } 62 96 63 97 p.hr_line{ 64 border-top-style: solid;65 border-width: 1px;98 border-top-style: solid; 99 border-width: 1px; 66 100 } 67 101 68 span.attachment, span.actionby, span.due, span.information{69 font-weight: bold;70 }71 102
