function pager_navigation_remote($pager, $uri, $options = array())
{
    $navigation = '';
    $options = _parse_attributes($options);
    if (!isset($options['update'])) {
        return null;
    }
    $update = $options['update'];
    $loading = isset($options['loading']) ? $options['loading'] : '';
    $complete = isset($options['complete']) ? $options['complete'] : '';
    if ($pager->haveToPaginate()) {
        $uri .= (preg_match('/\\?/', $uri) ? '&' : '?') . 'page=';
        $navigation .= link_to_remote(image_tag('/images/icons/first.png', array('align' => 'absmiddle', 'alt' => __('primero'), 'title' => __('primero'))), array('update' => $update, 'url' => $uri . '1', 'loading' => $loading, 'complete' => $complete));
        $navigation .= link_to_remote(image_tag('/images/icons/previous.png', array('align' => 'absmiddle', 'alt' => __('previo'), 'title' => __('previo'))), array('update' => $update, 'url' => $uri . $pager->getPreviousPage(), 'loading' => $loading, 'complete' => $complete));
        // Pages one by one
        $links = array();
        foreach ($pager->getLinks() as $page) {
            if ($page == $pager->getPage()) {
                $links[] = $page;
            } else {
                $links[] = link_to_remote($page, array('update' => $update, 'url' => $uri . $page, 'loading' => $loading, 'complete' => $complete));
            }
        }
        $navigation .= join('  ', $links);
        $navigation .= link_to_remote(image_tag('/images/icons/next.png', array('align' => 'absmiddle', 'alt' => __('siguiente'), 'title' => __('siguiente'))), array('update' => $update, 'url' => $uri . $pager->getNextPage(), 'loading' => $loading, 'complete' => $complete));
        $navigation .= link_to_remote(image_tag('/images/icons/last.png', array('align' => 'absmiddle', 'alt' => __('Ășltimo'), 'title' => __('Ășltimo'))), array('update' => $update, 'url' => $uri . $pager->getLastPage(), 'loading' => $loading, 'complete' => $complete));
    }
    return $navigation;
}
function link_to_remote_pane($text, $url, $update = 'feedback', $html_options = '')
{
  return link_to_remote($text, array(
      'url'     => $url, 
      'update'  => $update,
      'loading' => "Element.addClassName(document.getElementsByTagName('html')[0], 'waiting');",
      'success' => "Element.removeClassName(document.getElementsByTagName('html')[0], 'waiting');",
    ), $html_options);
}
Example #3
0
function link_to_publish($event)
{
    if ($event->getPublished()) {
        $publish = "Published";
    } else {
        $publish = "Publish";
    }
    return link_to_remote($publish, array('url' => 'event/publish?id=' . $event->getId(), 'update' => array('success' => 'publish'), 'loading' => "Element.show('published_indicator')", 'complete' => "Element.hide('published_indicator');" . visual_effect('highlight', 'publish_button')));
}
Example #4
0
function link_to_add_new_comment($name, $record, $comment = null)
{
    use_helper('Javascript');
    $params = array();
    $params['update'] = $comment && $comment->getId() ? 'add_new_comment_form_holder_' . $comment->getId() : 'add_new_comment_form_holder';
    $params['url'] = '@cscomments_comments_add';
    $comment_id = $comment ? $comment->getId() : null;
    $params['with'] = "'comment_id=" . $comment_id . "&model=" . get_class($record) . "&record_id=" . $record->getId() . "&return_uri=" . urlencode(sfContext::getInstance()->getRequest()->getUri()) . "'";
    return link_to_remote($name, $params);
}
function link_to_user_interested($user, $question)
{
    if ($user->isAuthenticated()) {
        $interested = InterestPeer::retrieveByPk($question->getId(), $user->getSubscriberId());
        if ($interested) {
            // already interested
            return __('interested!');
        } else {
            // didn't declare interest yet
            return link_to_remote(__('interested?'), array('url' => 'user/interested?id=' . $question->getId(), 'update' => array('success' => 'block_' . $question->getId()), 'loading' => "Element.show('indicator')", 'complete' => "Element.hide('indicator');" . visual_effect('pulsate', 'mark_' . $question->getId())));
        }
    } else {
        return link_to_login(__('interested?'));
    }
}
Example #6
0
function link_to_report_answer($answer, $user)
{
    use_helper('Javascript');
    $text = '[' . __('report to moderator') . ']';
    if ($user->isAuthenticated()) {
        $has_already_reported_answer = ReportAnswerPeer::retrieveByPk($answer->getId(), $user->getSubscriberId());
        if ($has_already_reported_answer) {
            // already spam for this user
            return '[' . __('reported as spam') . ']';
        } else {
            return link_to_remote($text, array('url' => '@user_report_answer?id=' . $answer->getId(), 'update' => array('success' => 'report_answer_' . $answer->getId()), 'loading' => "Element.show('indicator')", 'complete' => "Element.hide('indicator');" . visual_effect('highlight', 'report_answer_' . $answer->getId())));
        }
    } else {
        return link_to_login($text);
    }
}
/**
 * Return the HTML code for an unordered list showing opinions that can be voted
 * If the user has already voted, then a message appears
 * 
 * @param  BaseObject  $object   Propel object instance to vote
 * @param  string      $domid    unique css identifier for the block (div) containing the voter tool
 * @param  string      $message  a message string to be displayed in the voting-message block
 * @param  array       $options  Array of HTML options to apply on the HTML list
 * @return string
 **/
function depp_voter($object, $domid = 'depp-voter-block', $message = '', $options = array())
{
    if (is_null($object)) {
        sfLogger::getInstance()->debug('A NULL object cannot be voted');
        return '';
    }
    $user_id = deppPropelActAsVotableBehaviorToolkit::getUserId();
    // anonymous votes
    if ((is_null($user_id) || $user_id == '') && !$object->allowsAnonymousVoting()) {
        return __('Anonymous voting is not allowed') . ", " . __('please') . " " . link_to('login', '/login');
    }
    try {
        $voting_range = $object->getVotingRange();
        $options = _parse_attributes($options);
        if (!isset($options['id'])) {
            $options = array_merge($options, array('id' => 'voting-items'));
        }
        if ($object instanceof sfOutputEscaperObjectDecorator) {
            $object_class = get_class($object->getRawValue());
        } else {
            $object_class = get_class($object);
        }
        $object_id = $object->getReferenceKey();
        $token = deppPropelActAsVotableBehaviorToolkit::addTokenToSession($object_class, $object_id);
        // already voted
        if ($object->hasBeenVotedByUser($user_id)) {
            $message .= " " . link_to_remote(__('Take your vote back'), array('url' => sprintf('deppVoting/unvote?domid=%s&token=%s', $domid, $token), 'update' => $domid, 'script' => true, 'complete' => visual_effect('appear', $domid) . visual_effect('highlight', $domid)));
        }
        $list_content = '';
        for ($i = -1 * $voting_range; $i <= $voting_range; $i++) {
            if ($i == 0 && !$object->allowsNeutralPosition()) {
                continue;
            }
            $text = sprintf("[%d]", $i);
            $label = sprintf(__('Vote %d!'), $i);
            if ($object->hasBeenVotedByUser($user_id) && $object->getUserVoting($user_id) == $i) {
                $list_content .= content_tag('li', $text);
            } else {
                $list_content .= '  <li>' . link_to_remote($text, array('url' => sprintf('deppVoting/vote?domid=%s&token=%s&voting=%d', $domid, $token, $i), 'update' => $domid, 'script' => true, 'complete' => visual_effect('appear', $domid) . visual_effect('highlight', $domid)), array('title' => $label)) . '</li>';
            }
        }
        $results = get_component('deppVoting', 'votingDetails', array('object' => $object));
        return content_tag('ul', $list_content, $options) . content_tag('div', $message, array('id' => 'voting-message')) . content_tag('div', $results, array('id' => 'voting-results'));
    } catch (Exception $e) {
        sfLogger::getInstance()->err('Exception catched from sf_rater helper: ' . $e->getMessage());
    }
}
/**
 * Return the HTML code for a unordered list showing rating stars
 * 
 * @param  BaseObject  $object  Propel object instance
 * @param  array       $options        Array of HTML options to apply on the HTML list
 * @throws sfPropelActAsRatableException
 * @return string
 **/
function sf_rater($object, $options = array())
{
    if (is_null($object)) {
        sfLogger::getInstance()->debug('A NULL object cannot be rated');
    }
    if (!isset($options['star-width'])) {
        $star_width = sfConfig::get('app_rating_star_width', 25);
    } else {
        $star_width = $options['star-width'];
        unset($options['star-width']);
    }
    try {
        $max_rating = $object->getMaxRating();
        $actual_rating = $object->getRating();
        $bar_width = $actual_rating * $star_width;
        $options = _parse_attributes($options);
        if (!isset($options['class'])) {
            $options = array_merge($options, array('class' => 'star-rating'));
        }
        if (!isset($options['style']) or !preg_match('/width:/i', $options['style'])) {
            $full_bar_width = $max_rating * $star_width;
            $options = array_merge($options, array('style' => 'width:' . $full_bar_width . 'px'));
        }
        if ($object instanceof sfOutputEscaperObjectDecorator) {
            $object_class = get_class($object->getRawValue());
        } else {
            $object_class = get_class($object);
        }
        $object_id = $object->getReferenceKey();
        $token = sfPropelActAsRatableBehaviorToolkit::addTokenToSession($object_class, $object_id);
        $msg_domid = sprintf('rating_message_%s', $token);
        $bar_domid = sprintf('current_rating_%s', $token);
        $list_content = '  <li class="current-rating" id="' . $bar_domid . '" style="width:' . $bar_width . 'px;">';
        $list_content .= sprintf(__('Currently rated %d star(s) on %d'), $object->getRating(), $max_rating);
        $list_content .= '  </li>';
        for ($i = 1; $i <= $max_rating; $i++) {
            $label = sprintf(__('Rate it %d stars'), $i);
            $list_content .= '  <li>' . link_to_remote($label, array('url' => sprintf('sfRating/rate?token=%s&rating=%d&star_width=%d', $token, $i, $star_width), 'update' => $msg_domid, 'script' => true, 'complete' => visual_effect('appear', $msg_domid) . visual_effect('highlight', $msg_domid)), array('class' => 'r' . $i . 'stars', 'title' => $label)) . '</li>';
        }
        return content_tag('ul', $list_content, $options) . content_tag('div', null, array('id' => $msg_domid));
    } catch (Exception $e) {
        sfLogger::getInstance()->err('Exception catched from sf_rater helper: ' . $e->getMessage());
    }
}
Example #9
0
function list_people($object, $method, $type, $obj_type, $outside = false)
{
    $list = "";
    $people = call_user_func(array($object, $method));
    $list .= "<ul>\n";
    foreach ($people as $person) {
        if (strtolower($person->getPersonType()->getName()) == strtolower($type)) {
            $list .= "<li>\n";
            $list .= $person->getName();
            $list .= "&nbsp;" . $person->getEmail();
            $list .= "&nbsp;" . $person->getPhone();
            if (!$outside) {
                $list .= "&nbsp;" . link_to_remote(image_tag('delete', array('alt' => 'delete')), array('url' => $obj_type . '/deletePerson?id=' . $person->getId(), 'update' => array('success' => $obj_type . '_' . myTools::stripText($type))));
            }
            $list .= "</li>\n";
        }
    }
    $list .= "</ul>\n";
    return $list;
}
Example #10
0
                ?>
							<p id="row_<?php 
                echo $locate->getId();
                ?>
" style="display:none;">.
								<?php 
                echo link_to_remote(__('detail'), array('url' => 'location/show?id=' . $locate->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green', 'style' => 'font-size:10px;'));
                ?>
								<?php 
                if ($can_edit) {
                    echo link_to_remote(__('edit'), array('url' => 'location/edit?id=' . $locate->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue', 'style' => 'font-size:10px;'));
                }
                ?>
								<?php 
                if ($can_remove) {
                    echo link_to_remote(__('delete'), array('url' => 'location/delete?id=' . $locate->getId(), 'confirm' => __('Are you sure?'), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'red', 'style' => 'font-size:10px;'));
                }
                ?>
							</p>
						</td>
                        <td><?php 
                echo $locate->getCampus() ? $locate->getCampus() : '-';
                ?>
</td>
                        <!--td><?php 
                #echo $locate->getDepartmentId()? $locate->getDepartment()->toString() : '-' ;
                ?>
</td-->
                        <td><?php 
                echo $locate->getCapacity() ? $locate->getCapacity() : '-';
                ?>
Example #11
0
    $i = 0;
    foreach ($pager->getResults() as $accal_activity) {
        ?>
					<tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
						<td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
						<td class='first'><?php 
        echo $accal_activity->getAcademicCalendar() ? link_to_remote($accal_activity->getAcademicCalendar()->toString(), array('url' => 'accal_activity/showByEmployee?id=' . $accal_activity->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white')) : '-';
        ?>
</td>
                        <td><?php 
        echo $accal_activity->getStart() ? $accal_activity->getStart('d-m-Y') . '&nbsp;&nbsp;s/d&nbsp;&nbsp;' . $accal_activity->getEnd('d-m-Y') : 'n/a';
        ?>
</td>
						<td><?php 
        echo $accal_activity->getActivityLength() ? $accal_activity->getActivityLength() : '-';
        ?>
&nbsp;&nbsp;Hari</td>
						<td><?php 
        echo $accal_activity->getActivityTypeId() ? $accal_activity->getActivityType()->toString() : '-';
        ?>
</td>
                        <td><?php 
Example #12
0
            $tleave = number_format($levels[$employee_leave->getAcademicCalendarId() . '#' . $employee_detail->getEmployeeLevelId()]);
        } elseif (array_key_exists($employee_leave->getAcademicCalendarId(), $accals)) {
            echo number_format($accals[$employee_leave->getAcademicCalendarId()]);
            $tleave = number_format($accals[$employee_leave->getAcademicCalendarId()]);
        } else {
            echo '-';
            $tleave = number_format(0);
        }
        ?>
&nbsp;<?php 
        echo __('Day');
        ?>
                                                    </td>
                                                    <td align="center" style="text-align:  center;">
                                                            <?php 
        echo link_to_remote($employee_leave->getTotalLength() . '&nbsp;Hari', array('url' => 'employee_leave_recapt/listLeave?employee_id=' . $employee_leave->getEmployeeId() . '&academic_calendar_id=' . $employee_leave->getAcademicCalendarId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white'));
        ?>
 
                                                    </td>
                                                    <td align="center" style="text-align:  center; font-weight: bold;">
                                                        <?php 
        if ($tleave > 0) {
            echo number_format($tleave - $employee_leave->getTotalLength());
        } else {
            echo number_format(0);
        }
        ?>
&nbsp;<?php 
        echo __('Day');
        ?>
                                                    </td>
Example #13
0
							</p>
						</td>
						<td><?php 
        echo $subject->getName();
        ?>
</td>
						<td><?php 
        echo $subject->getCredit();
        ?>
</td>
						<td><?php 
        echo $subject->getSubjectGroup() ? link_to_remote($subject->getSubjectGroup()->toString(), array('url' => 'subject_group/show?id=' . $subject->getSubjectGroupId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white')) : '-';
        ?>
</td>
						<td><?php 
        echo $subject->getDepartment() ? link_to_remote($subject->getDepartment()->toString(), array('url' => 'department/show?id=' . $subject->getDepartmentId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white')) : '-';
        ?>
</td>
					</tr>
				<?php 
    }
    ?>
			<?php 
}
?>
			</tbody>
		</table>
		<?php 
if ($pager->getNbResults() > 1) {
    echo include_partial('global/pager', array('position' => 'bottom', 'pager' => $pager, 'module' => 'Subject'));
}
Example #14
0
</label></td>
                    	<td width="2%" style="text-align:center; vertical-align:middle;" class='first'>:</td>
			<td style="vertical-align:middle;" class='first'>
				<p style="font-weight: bold;" class="detail">
				<?php 
$counselings = CounselingPeer::retrieveByPK($counseling->getId());
$tutors = array();
foreach ($counselings->getCounselingTutors() as $cr) {
    $c = new Criteria();
    $c->add(EmployeeDetailPeer::EMPLOYEE_ID, $cr->getEmployeeId());
    $employee_detail = EmployeeDetailPeer::doSelectOne($c);
    $tutors[] = $cr->getEmployee() ? '&middot; ' . $cr->getEmployee()->getName() . ' - ' . $employee_detail->getContactDetail() : '-';
}
echo join("<br>", $tutors);
?>
				</p>
			</td>
                </tr>

		<tr>
			<td style="vertical-align:middle; text-align: left;" colspan='6' class='first'>
				<div class="ja-typo-box box-rounded orange box-flash"><b>Harap Diperhatikan..!!</b><br>Untuk Nilai yang salah anda dapat langsung menghubungi Wali Kelas Terkait lewat No. Telepon / Contact diatas atau bisa menggunakan Fasilitas Komunikasi Kekolah dengan link berikut <b><?php 
echo link_to_remote('Contact', array('url' => 'student_email/create', 'update' => 'content', 'script' => 'true', 'before' => "this.blur(); showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white'));
?>
</b>. Dengan menyertakan bukti printout Nilai yang dirasa salah.</div>
			</td>
		</tr>			
	</tbody>
</table>
       
Example #15
0
        } elseif ($employee_detail->getGroups() == StaffType::GROUP_FOUND) {
            echo __('Pengurus');
        } elseif ($employee_detail->getGroups() == StaffType::GROUP_ORG) {
            echo __('Pembina');
        } elseif ($employee_detail->getGroups() == StaffType::GROUP_MISC) {
            echo __('Misc');
        } else {
            echo '-';
        }
    } else {
        echo '-';
    }
    ?>
                                                    </td>
                                                    <td style="text-align:center; vertical-align: middle;"><?php 
    echo link_to_remote(image_tag('hapus.png', 'title=Hapus'), array('url' => 'employee_report/deleteTemp?id=' . $temp->getId() . '&academic_calendar_id=' . $academic_calendar->getId() . '&department_id=' . $department->getId() . '&time=' . $time . '&time2=' . $time2 . '&tgl_cetak=' . $tgl_cetak . '&month_id1=' . $month1->getId() . '&month_id2=' . $month2->getId() . '&tgl_absen1=' . $tgl_absen1 . '&tgl_absen2=' . $tgl_absen2 . '&thn1=' . $thn1 . '&thn2=' . $thn2, 'confirm' => __('Are you sure?'), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"));
    ?>
</td> 
                                                </tr>
                                            <?php 
}
?>
                                        </tbody>
                                    </table>
                                </td></tr>
                        </table>  
                    </td>
                </tr>
            </table>
        </td></tr>
</table>
Example #16
0
        echo ' even';
    }
    ?>
">
							<?php 
    $c = new Criteria();
    $c->add(PaymentJournalPeer::PAYER_TYPE, PaymentJournal::PAYER_TYPE_STUDENT);
    $c->add(PaymentJournalPeer::PAYER, $student->getId());
    $c->add(PaymentJournalPeer::ACADEMIC_COST_ID, $ac_cost->getId());
    $c->add(PaymentJournalPeer::MONTH, $month->getId());
    $payment = PaymentJournalPeer::doSelectOne($c);
    ?>
                            <td nowrap="nowrap" style="vertical-align:middle; text-align: center;">
								<?php 
    if ($payment) {
        echo link_to_remote(image_tag('delete.gif', 'title=Pembayaran Batal'), array('url' => 'student_payment/deleteSpp?id=' . $payment->getId() . '&student_id=' . $student->getId(), 'confirm' => __('Anda Yakin Akan Membatalkan Pembayaran SPP Bulan&nbsp;') . $month->getName() . '&nbsp;?', 'update' => 'content', 'script' => 'true'));
    } else {
        echo checkbox_tag('months', $month->getId(), false, array('id' => 'months'));
    }
    ?>
                            </td>
							<td style="vertical-align:middle;"><?php 
    echo $month->getName() ? $month->getName() : 'n/a';
    ?>
</td>
						   	<td style="text-align:right; vertical-align:middle;"><?php 
    echo 'Rp. ' . format_number($ac_cost->getAmount());
    ?>
</td>
                            <td style="vertical-align: middle; text-align: center;"><?php 
    if ($payment) {
Example #17
0
                                                                                 <td><?php 
                echo $j;
                ?>
</td>
                                                                                 <td class='first'><?php 
                echo link_to_function($sub_comp->getDetail() ? $sub_comp->getDetail() : 'n/a', visual_effect('toggle_appear', 'row_' . $sub_comp->getId(), array('duration' => 0.5, 'onclick' => 'this.blur()')));
                ?>
                                                                                     <p id="row_<?php 
                echo $sub_comp->getId();
                ?>
" style="display:none;">.
                                                                                         <?php 
                echo link_to_remote(__('edit'), array('url' => 'subject_competency/editCompetency?subject_grading_id=' . $subject_grading->getId() . '&id=' . $sub_comp->getId(), 'update' => 'subject_list', 'script' => 'true', 'before' => "this.blur();showIndicator('subject_list', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
                ?>
                                                                                         <?php 
                echo link_to_remote(__('delete'), array('url' => 'subject_competency/deleteCompetency?subject_grading_id=' . $subject_grading->getId() . '&id=' . $sub_comp->getId(), 'confirm' => __('Are you sure?'), 'update' => 'subject_list', 'script' => 'true', 'before' => "this.blur();showIndicator('subject_list', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'red', 'style' => 'font-size:10px;'));
                ?>
                                                                                     </p>
                                                                                 </td>
                                                                             </tr> 
                                                                         <?php 
            }
            ?>
                                                                     <?php 
        }
        ?>
                                                                 <?php 
    }
    ?>
                                                             <?php 
}
Example #18
0
						<p id="row_<?php 
        echo $student->getId();
        ?>
" style="display: none;">.
      						<?php 
        echo link_to_remote(__('detail'), array('url' => 'scholar/show?id=' . $student->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
        ?>
    
							<?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'scholar/edit?id=' . $student->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
        }
        ?>
							<?php 
        if ($can_edit) {
            echo link_to_remote(__('ubah status'), array('url' => 'scholar/editStatus?id=' . $student->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'red'));
        }
        ?>
	
						</p>
					</td>
					<td><?php 
        echo $student->getCode2() ? $student->getCode2() : '-';
        ?>
</td>
					<td><?php 
        echo $student->getName();
        ?>
</td>
					<td><?php 
        echo $student->getAcademicCalendar() ? $student->getAcademicCalendar()->getDepartment()->toString() : '-';
Example #19
0
        ?>
							<p id="row_<?php 
        echo $subject_curr->getId();
        ?>
" style="display:none;">.
								<?php 
        echo link_to_remote(__('detail'), array('url' => 'subject/show?id=' . $subject_curr->getSubject()->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green'));
        ?>
								<?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'subject_curr/edit?id=' . $subject_curr->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
        }
        ?>
								<?php 
        if ($can_remove) {
            echo link_to_remote(__('delete'), array('url' => 'subject_curr/delete?id=' . $subject_curr->getId(), 'confirm' => __('Are you sure?'), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'red'));
        }
        ?>
							</p>
						</td>
						<td><?php 
        echo $subject_curr->getSubject()->getName();
        ?>
</td>
                        <td><?php 
        echo $subject_curr->getSubject()->getCredit();
        ?>
</td>
						<td><b><?php 
        echo $subject_curr->getSubject()->getSubjectGroup() ? $subject_curr->getSubject()->getSubjectGroup()->toString() : '-';
        ?>
Example #20
0
    foreach ($pager->getResults() as $payment_history) {
        ?>
					<tr class="list<?php 
        ++$i;
        if ($i % 2 == 0) {
            echo ' even';
        }
        ?>
">
						<td><?php 
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
						<td class='first'>
						<?php 
        echo $payment_history->getStudent() ? link_to_remote($payment_history->getStudent()->getCode(), array('url' => 'history_spp/showDetail?id=' . $payment_history->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white')) : '-';
        ?>
						</td>
						<td><?php 
        echo $payment_history->getStudent() ? $payment_history->getStudent()->getName() : '-';
        ?>
</td>
                        <td><?php 
        echo $payment_history->getStudent() ? $payment_history->getStudent()->getClassGroup()->toString() : '-';
        ?>
</td>
						<td><?php 
        echo $payment_history->getAcademicCalendar() ? $payment_history->getAcademicCalendar()->getDepartment()->toString() : '-';
        ?>
</td>
						<td><?php 
Example #21
0
</td>
                                    <td class='first'><?php 
        echo link_to_function(strlen($ng_reg_test_period->getName()) > 0 ? $ng_reg_test_period->getName() : 'n/a', visual_effect('toggle_appear', 'row_' . $ng_reg_period->getId(), array('onclick' => 'this.blur()')));
        ?>
                                        <p id="row_<?php 
        echo $ng_reg_period->getId();
        ?>
" style="display:none;">.
                                            <?php 
        if ($can_edit) {
            echo link_to_remote(__('edit'), array('url' => 'ng_reg_detail/editOther?id=' . $ng_reg_test_period->getId() . '&ng_reg_period_id=' . $ng_reg_period->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'blue'));
        }
        ?>
                                            <?php 
        if ($can_remove) {
            echo link_to_remote(__('delete'), array('url' => 'ng_reg_detail/deleteOther?id=' . $ng_reg_test_period->getId() . '&ng_reg_period_id=' . $ng_reg_period->getId(), 'confirm' => __('Are you sure? Other Data Related will be deleted'), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'red'));
        }
        ?>
                                        </p>
                                    </td>
                                    <td><?php 
        echo $ng_reg_test_period->getStart() ? DateToIndo($ng_reg_test_period->getStart()) : '-';
        ?>
</td>
                                    <td><?php 
        echo $ng_reg_test_period->getEnd() ? DateToIndo($ng_reg_test_period->getEnd()) : '-';
        ?>
</td>
                            </tr>
                        <?php 
    }
Example #22
0
</b></td>
                                                <td style="text-align: center; vertical-align: middle;">
                                                        <?php 
        echo link_to_remote(image_tag('agenda.png', 'title=Penilaian Per Siswa'), array('url' => 'rpt_score/listStudent?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId() . '&byEmployee=' . $byEmployee, 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"));
        ?>
</td>

                                                <td style="text-align: center; vertical-align: middle;">
                                                        <?php 
        echo link_to_remote(image_tag('nilai.png', 'title=Penilaian Per Mata Pelajaran'), array('url' => 'rpt_score/listSubject?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId() . '&byEmployee=' . $byEmployee, 'update' => 'content', 'script' => 'true', 'loading' => "showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white', 'title' => __('Riwayat Penilaian Keseluruhan')));
        ?>
</td>
                                                
                                                <td style="text-align: center; vertical-align: middle;">
                                                        <?php 
        echo link_to_remote(image_tag('absen.png', 'title=Rekap Penilaian'), array('url' => 'rpt_score/listRaport?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId() . '&byEmployee=' . $byEmployee, 'update' => 'content', 'script' => 'true', 'loading' => "showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"));
        ?>
</td>

                                        </tr>		                
                                        <?php 
    }
    ?>
                                <?php 
}
?>
                                </tbody >
                        </table>
                        <?php 
if ($pager->getNbResults() > 1) {
    echo include_partial('global/pager', array('position' => 'bottom', 'pager' => $pager, 'module' => 'Course'));
Example #23
0
&nbsp;&nbsp;Tidak Lulus Ujian Masuk</p>
										<?php 
} else {
    ?>
                            					<p class="success"><?php 
    echo image_tag('cross.png');
    ?>
&nbsp;&nbsp;Belum Mengikuti Ujian Masuk</p>
                            			<?php 
}
?>
                                		</td>
										<td>
                                		<ul style="display: block; margin: 0; padding: 3px 0.7em; text-decoration: none;">
											<li><?php 
echo link_to_remote(_('Biodata Calon Siswa'), array('url' => 'auth/detail?id=' . $applicant->getId(), 'update' => 'content', 'script' => 'true'), array('style' => 'color: black;'));
?>
</li>
                                    											
                                    		<?php 
if ($applicant->getStatus() == StudentDetail::GRADUATE) {
    ?>
                                    		<li><?php 
    echo link_to(__('Print Rincian Pembiayaan'), 'auth/graduateReceipt?id=' . $applicant->getId(), array('style' => 'color : red;'));
    ?>
</li>
                                    		<?php 
} else {
    echo '';
}
?>
Example #24
0
                			<?php 
        } elseif ($employee->getStaffTypeId() == 13 || $employee->getStaffTypeId() == 14) {
            ?>
                   	 			<?php 
            if ($counseling->getClassGroup()->getParent() == 70 || $counseling->getClassGroup()->getParent() == 85 || $counseling->getClassGroup()->getParent() == 117) {
                ?>
                    					<!-- Rekap Tryout Kepsek -->
                    					<td style="text-align: center;">
                            				<?php 
                echo link_to_remote(image_tag('absen.png', 'title=Rekap Penilaian Tryout'), array('url' => 'course_detail/listFullTryout?accal_id=' . $accal1->getId() . '&counseling_id=' . $counseling->getId() . '&grade_id=46', 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"));
                ?>
</td>
                                                 
                    					<td style="text-align: center;">
                            				<?php 
                echo link_to_remote(image_tag('absen.png', 'title=Rekap Penilaian Tryout'), array('url' => 'course_detail/listFullTryout?accal_id=' . $accal2->getId() . '&counseling_id=' . $counseling->getId() . '&grade_id=46', 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"));
                ?>
</td>
						<?php 
            } else {
                ?>
                        			<td style="text-align:center;"><?php 
                echo image_tag('delete.png');
                ?>
</td>
                        			<td style="text-align:center;"><?php 
                echo image_tag('delete.png');
                ?>
</td>    
						<?php 
            }
Example #25
0
if (isset($catalog) && $catalog->getId()) {
    ?>
	
                <p class="detail" style="font-weight: bold;">
                    <?php 
    $c = new Criteria();
    $c->add(CatalogVideoPeer::CATALOG_ID, $catalog->getId());
    $files = CatalogVideoPeer::doSelect($c);
    $count = CatalogVideoPeer::doCount($c);
    if ($files) {
        $file_dir = sfConfig::get('sf_data_dir') . DIRECTORY_SEPARATOR . 'video';
        $i = 0;
        foreach ($files as $file) {
            ++$i;
            echo $i . '.&nbsp;' . $file->getCover() . '&nbsp;';
            echo link_to_remote(image_tag('delete.gif', 'title=Hapus File Upload'), array('url' => 'collection/deleteVideo?id=' . $file->getId() . '&catalog_id=' . $catalog->getId(), 'confirm' => __('Are you sure?'), 'update' => 'content', 'script' => 'true')) . '<br>';
        }
    }
    ?>
	
                </p> 
                <?php 
}
?>

                <!-- 1st Time -->
                <div id='file_tag_2' style="display:none"><?php 
echo checkbox_tag('file_21');
?>
</div>
                <img id='file_label_2' width="672" height="315" style="display: none; margin-left: 10px;"/>
Example #26
0
            } else {
                echo "-";
            }
            ?>
                    
					<?php 
        } else {
            ?>
                    	<?php 
            if ($v_material_collection->getTotalColItem() != null) {
                $c = new Criteria();
                $c->add(VMaterialCatalogPeer::CAT_CATEGORY_ID, $v_material_collection->getCatCategoryId());
                $c->add(VMaterialCatalogPeer::PUBLISHED_YEAR, $v_material_collection->getPublishedYear());
                $copies = VMaterialCatalogPeer::doSelectOne($c);
                #echo $copies->getTotalCatalog() ;
                echo link_to_remote($copies->getTotalCatalog(), array('url' => 'rpt_acreditation/listCollection?filters[published_year]=' . $v_material_collection->getPublishedYear() . '&filters[cat_category_id]=' . $v_material_collection->getCatCategoryId(), 'update' => 'content', 'script' => 'true', 'loading' => "showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white', 'title' => __('Collection')));
            } else {
                echo "-";
            }
            ?>
                        
                    <?php 
        }
        ?>
    
                    </td>
				</tr>
		<?php 
    }
    ?>
		<?php 
Example #27
0
    <div class="login">
            <p style="text-align:left; width:90%; line-height: 15px; padding-top: 0px;"></p>
            <h2 class="contentheading"><b><?php 
echo $this->getContext()->getUser()->getAttribute('username_long', '', 'bo');
?>
</b></h2>
                    <?php 
$applicant = TestApplicantPeer::retrieveByPk($this->getContext()->getUser()->getAttribute('user_id', '', 'bo'));
$cls = ClassGroupPeer::retrieveByPk($applicant->getClassGroup1());
?>
            <p style="padding-top: 15px; line-height: 20px;">No. Pendaftaran Anda adalah <br><b><?php 
echo $applicant->getCode() ? $applicant->getCode() : '-';
?>
</b><br />
            Pilihan Kelas Anda adalah <br><b><?php 
echo $applicant->getClassGroup1() ? $cls->toString() . ' - ' . $cls->getParentName() : '-';
?>
</b><br /><br>
            <?php 
echo link_to_remote('Informasi Detail', array('url' => 'auth/test?id=' . $applicant->getId(), 'update' => 'content', 'script' => 'true'), array('class' => 'user_logout', 'title' => 'Detail Informasi'));
?>
<br />
            <?php 
echo link_to('Logout', '/auth/logout', 'class=user_logout title=keluar');
?>
</p>
    </div>
Example #28
0
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
					<td class='first'><?php 
        echo link_to_function(strlen($student->getCode()) > 0 ? $student->getCode() : 'n/a', visual_effect('toggle_appear', 'row_' . $student->getId(), array('onclick' => 'this.blur()')));
        ?>
					<p id="row_<?php 
        echo $student->getId();
        ?>
" style="display: none;">.
					<?php 
        echo link_to_remote(__('detail'), array('url' => 'subject_plan/showStudent?id=' . $student->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'green', 'style' => 'font-size:10px;'));
        ?>
					<br>
					. <?php 
        echo link_to_remote(__('student course'), array('url' => 'student_course/list?student_id=' . $student->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white', 'style' => 'font-size:10px;'));
        ?>
					</p>
					</td>
					<td><?php 
        echo $student->getName();
        ?>
</td>
					<td><?php 
        echo $student->getCurriculum() ? $student->getCurriculum()->toString() : '-';
        ?>
</td>
					<td><?php 
        echo $student->getAcademicCalendar() ? $student->getAcademicCalendar()->toString() : '-';
        ?>
</td>
Example #29
0
?>
</label><br/>
					<p class="detail"><?php 
echo $class_group->getCode();
?>
</p>
				</td></tr>
				<tr>
					<td >
						<label ><?php 
echo __('Parent');
?>
</label>
						<br/>
						<p class="detail"><?php 
echo $class_group->getParent() ? link_to_remote($class_group->getParentName(), array('url' => 'class_group/show?id=' . $class_group->getParent(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white')) : '-';
?>
</p>
					</td>
				</tr>
				<tr><td >
					<label ><?php 
echo __('Name');
?>
</label><br/>
					<p class="detail"><?php 
echo $class_group->getName();
?>
</p>
				</td></tr>
                <tr><td >
Example #30
0
                                                                            <td class="first">
                                                                                <?php 
        $c = new Criteria();
        $c->add(StudentDescPeer::STUDENT_ACCAL_ID, $specs[$student->getId()]);
        $c->add(StudentDescPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
        $c->add(StudentDescPeer::TERM, $grade_spec->getId());
        $student_descs = StudentDescPeer::doSelect($c);
        $student_spec = array();
        foreach ($student_descs as $student_desc) {
            $student_spec[$student_desc->getStudentAccalId()] = $student_desc->getNote();
        }
        echo array_key_exists($specs[$student->getId()], $student_spec) ? str_replace("\n", "<br/>", $student_spec[$specs[$student->getId()]]) : '-';
        ?>
                                                                            </td>
                                                                            <td><?php 
        echo array_key_exists($specs[$student->getId()], $student_spec) ? link_to_remote(image_tag('delete.gif', 'title=Hapus Penilaian'), array('url' => 'score_admin/deleteScore?stu_id=' . $specs[$student->getId()] . '&course_id=' . $course_schedule->getId() . '&grade_spec_id=' . $grade_spec->getId(), 'confirm' => __('Are you sure?'), 'update' => 'content', 'script' => 'true')) : '-';
        ?>
</td>
                                                                     </tr>
                                                                     <?php 
    }
    ?>
                                                                 <?php 
}
?>
                                                            </tbody>
                                                            </table>

                                                    </td></tr>
                                                    </table>