本文整理汇总了PHP中Layout::addPageTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::addPageTitle方法的具体用法?PHP Layout::addPageTitle怎么用?PHP Layout::addPageTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layout
的用法示例。
在下文中一共展示了Layout::addPageTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
public function show()
{
PHPWS_Core::initCoreClass('Form.php');
javascript('jquery');
javascript('modules/hms/assign_student');
$unassignCmd = CommandFactory::getCommand('UnassignStudent');
$form = new PHPWS_Form();
$unassignCmd->initForm($form);
$form->addText('username');
if (!is_null($this->student)) {
$form->setValue('username', $this->student->getUsername());
}
$form->addCssClass('username', 'form-control');
$form->setExtra('username', 'autofocus');
// Addition of "Unassignment Type"
$form->addDropBox('unassignment_type', array('-1' => 'Choose a reason...', UNASSIGN_ADMIN => 'Administrative', UNASSIGN_REASSIGN => 'Re-assign', UNASSIGN_CANCEL => 'Contract Cancellation', UNASSIGN_PRE_SPRING => 'Pre-spring room change', UNASSIGN_RELEASE => 'Contract Release'));
//$form->setMatch('unassignment_type', UNASSIGN_ADMIN);
$form->setLabel('unassignment_type', 'Unassignment Type: ');
$form->addCssClass('unassignment_type', 'form-control');
$form->addText('refund');
$form->setLabel('refund', 'Refund Percentage');
$form->setSize('refund', 4);
$form->setMaxSize('refund', 3);
$form->addCssClass('refund', 'form-control');
$form->addTextarea('note');
$form->setLabel('note', 'Note: ');
$form->addCssClass('note', 'form-control');
$tpl = $form->getTemplate();
$tpl['TERM'] = Term::getPrintableSelectedTerm();
Layout::addPageTitle("Unassign Student");
return PHPWS_Template::process($tpl, 'hms', 'admin/unassignStudent.tpl');
}
示例2: show
public function show()
{
PHPWS_Core::initModClass('hms', 'HMS_Util.php');
$tpl = array();
$tpl['TITLE'] = 'Edit Move-in Times';
$form = new PHPWS_Form();
$form->addDropBox('begin_day', HMS_Util::get_days());
$form->addCssClass('begin_day', 'form-control');
$form->addDropBox('begin_month', HMS_Util::get_months());
$form->addCssClass('begin_month', 'form-control');
$form->addDropBox('begin_year', HMS_Util::get_years_2yr());
$form->addCssClass('begin_year', 'form-control');
$form->addDropBox('begin_hour', HMS_Util::get_hours());
$form->addCssClass('begin_hour', 'form-control');
$form->addDropBox('end_day', HMS_Util::get_days());
$form->addCssClass('end_day', 'form-control');
$form->addDropBox('end_month', HMS_Util::get_months());
$form->addCssClass('end_month', 'form-control');
$form->addDropBox('end_year', HMS_Util::get_years_2yr());
$form->addCssClass('end_year', 'form-control');
$form->addDropBox('end_hour', HMS_Util::get_hours());
$form->addCssClass('end_hour', 'form-control');
$form->addSubmit('submit', 'Create');
$cmd = CommandFactory::getCommand('CreateMoveinTime');
$cmd->initForm($form);
$tpl['MOVEIN_TIME_PAGER'] = HMS_Movein_Time::get_movein_times_pager();
$form->mergeTemplate($tpl);
$tpl = $form->getTemplate();
Layout::addPageTitle("Move-in Times");
return PHPWS_Template::process($tpl, 'hms', 'admin/edit_movein_time.tpl');
}
示例3: show
public function show()
{
Layout::addPageTitle("View By RLC");
PHPWS_Core::initModClass('hms', 'RlcRosterPager.php');
$rosterPager = new RlcRosterPager($this->rlc);
return $rosterPager->get();
}
示例4: show
public function show()
{
$tpl = array();
$tpl['TERM'] = Term::toString($this->room->getTerm());
$tpl['TITLE'] = 'Add New Bed';
$tpl['HALL_NAME'] = $this->hall->getLink();
$tpl['FLOOR_NUMBER'] = $this->floor->getLink();
$tpl['ROOM_NUMBER'] = $this->room->getLink();
$tpl['ASSIGNED_TO'] = '<unassigned>';
$submitCmd = CommandFactory::getCommand('AddBed');
$submitCmd->setRoomId($this->room->id);
$tpl['HALL_ABBR'] = $this->hall->getBannerBuildingCode();
$form = new PHPWS_Form();
$submitCmd->initForm($form);
if (isset($this->bedLetter)) {
$form->addText('bed_letter', $this->bedLetter);
} else {
$form->addText('bed_letter', chr($this->room->get_number_of_beds() + 97));
}
$form->addCssClass('bed_letter', 'form-control');
if (isset($this->bedroomLabel)) {
$form->addText('bedroom_label', $this->bedroomLabel);
} else {
$form->addText('bedroom_label', 'a');
}
$form->addCssClass('bedroom_label', 'form-control');
if (isset($this->phoneNumber)) {
$form->addText('phone_number', $this->phoneNumber);
} else {
// Try to guess at the phone number
$beds = $this->room->get_beds();
if (sizeof($beds) > 0) {
$form->addText('phone_number', $beds[0]->phone_number);
} else {
$form->addText('phone_number');
}
}
$form->setMaxSize('phone_number', 4);
$form->setSize('phone_number', 5);
$form->addCssClass('phone_number', 'form-control');
if (isset($this->bannerId)) {
$form->addText('banner_id', $this->bannerId);
} else {
// try to guess a the banner ID
// Strip any text out of the room number, just get the numbers
$match = null;
preg_match("/[0-9]*/", $this->room->room_number, $match);
$roomNumber = $match[0];
$form->addText('banner_id', '0' . $roomNumber . ($this->room->get_number_of_beds() + 1));
}
$form->addCssClass('banner_id', 'form-control');
$form->addCheckBox('ra', 1);
$form->addCheckBox('ra_roommate', 1);
$form->addCheckBox('international_reserved', 1);
$form->mergeTemplate($tpl);
$tpl = $form->getTemplate();
Layout::addPageTitle("Add Bed");
// Reusing the edit bed template here
return PHPWS_Template::process($tpl, 'hms', 'admin/addBed.tpl');
}
示例5: show
public function show()
{
$form = new PHPWS_Form();
$this->submitCmd->initForm($form);
$form->dropElement('special_needs');
$form->addCheck('special_needs', array('physical_disability', 'psych_disability', 'medical_need', 'gender_need'));
$form->setLabel('special_needs', array('Physical disability', 'Psychological disability', 'Medical need', 'Transgender housing'));
$checked = array();
if (isset($this->specialNeeds['physical_disability'])) {
$checked[] = 'physical_disability';
}
if (isset($this->specialNeeds['psych_disability'])) {
$checked[] = 'psych_disability';
}
if (isset($this->specialNeeds['medical_need'])) {
$checked[] = 'medical_need';
}
if (isset($this->specialNeeds['gender_need'])) {
$checked[] = 'gender_need';
}
$form->setMatch('special_needs', $checked);
$form->addSubmit('submit', 'Continue');
Layout::addPageTitle("Special Needs Form");
return PHPWS_Template::process($form->getTemplate(), 'hms', 'student/special_needs.tpl');
}
示例6: show
public function show()
{
$tpl = array();
$tpl['TERM'] = Term::getPrintableSelectedTerm();
$form = new PHPWS_Form('roommate_group');
$submitCmd = CommandFactory::getCommand('CreateRoommateGroup');
$submitCmd->initForm($form);
if (isset($this->roommate1)) {
$form->addText('roommate1', $this->roommate1);
} else {
$form->addText('roommate1');
}
$form->addCssClass('roommate1', 'form-control');
$form->setExtra('roommate1', 'autofocus');
if (isset($this->roommate1)) {
$form->addText('roommate2', $this->roommate2);
} else {
$form->addText('roommate2');
}
$form->addCssClass('roommate2', 'form-control');
$form->mergeTemplate($tpl);
$tpl = $form->getTemplate();
Layout::addPageTitle("Create Roommate Group");
return PHPWS_Template::process($tpl, 'hms', 'admin/createRoommateGroup.tpl');
}
示例7: show
public function show()
{
$tpl = array();
if ($this->halls == NULL) {
NQ::simple('hms', hms\NotificationView::ERROR, 'There are no halls available for the selected term.');
$cmd = CommandFactory::getCommand('ShowAdminMaintenanceMenu');
$cmd->redirect();
}
$tpl['TITLE'] = $this->title;
$tpl['TERM'] = Term::getPrintableSelectedTerm();
javascript('jquery');
javascript('modules/hms/select_floor');
# Setup the form
$form = new PHPWS_Form();
$this->onSelectCmd->initForm($form);
$form->setMethod('get');
$form->addDropBox('residence_hall', $this->halls);
$form->setLabel('residence_hall', 'Residence hall');
$form->setMatch('residence_hall', 0);
$form->setClass('residence_hall', 'form-control');
$form->addDropBox('floor', array(0 => ''));
$form->setLabel('floor', 'Floor');
$form->setClass('floor', 'form-control');
$form->addSubmit('submit_button', 'Select');
$form->mergeTemplate($tpl);
$tpl = $form->getTemplate();
Layout::addPageTitle("Select Floor");
return PHPWS_Template::process($tpl, 'hms', 'admin/select_floor.tpl');
}
示例8: show
public function show()
{
$tpl = array();
$tpl['LOGOUT_LINK'] = PHPWS_Text::secureLink(_('Log Out'), 'users', array('action' => 'user', 'command' => 'logout'));
Layout::addPageTitle("Contact");
return PHPWS_Template::process($tpl, 'hms', 'student/contact_form_thankyou.tpl');
}
示例9: show
public function show()
{
Layout::addPageTitle("Hall Notification Edit");
$tpl = array();
$submitCmd = CommandFactory::getCommand('ReviewHallNotificationMessage');
$form = new PHPWS_Form('email_content');
$submitCmd->initForm($form);
if (Current_User::allow('hms', 'anonymous_notifications')) {
$form->addCheck('anonymous');
$form->setMatch('anonymous', $this->anonymous);
$form->setLabel('anonymous', 'Send Anonymously');
}
$form->addText('subject', !is_null($this->subject) ? $this->subject : '');
$form->setLabel('subject', 'Subject');
$form->addCssClass('subject', 'form-control');
$form->setSize('subject', 35);
$form->setExtra('subject', 'autofocus');
$form->addTextarea('body', !is_null($this->body) ? $this->body : '');
$form->addCssClass('body', 'form-control');
$form->setLabel('body', 'Message:');
if (!empty($this->halls)) {
$form->addHidden('hall', $this->halls);
}
if (!empty($this->floors)) {
$form->addHidden('floor', $this->floors);
}
return PHPWS_Template::process($form->getTemplate(), 'hms', 'admin/hall_notification_email_page.tpl');
}
示例10: execute
/**
* Shows the requested report's HTML output.
*
* @param CommandContext $context
* @throws InvalidArgumentExection
*/
public function execute(CommandContext $context)
{
if (!Current_User::allow('hms', 'reports')) {
PHPWS_Core::initModClass('hms', 'exception/PermissionException.php');
throw new PermissionException('You do no have permission to run reports.');
}
$reportId = $context->get('reportId');
if (!isset($reportId) || is_null($reportId)) {
throw new InvalidArgumentExection('Missing report id.');
}
// Instantiate the report controller with the requested report id
PHPWS_Core::initModClass('hms', 'ReportFactory.php');
$report = ReportFactory::getReportById($reportId);
Layout::addPageTitle($report->getFriendlyName());
$detailCmd = CommandFactory::getCommand('ShowReportDetail');
$detailCmd->setReportClass($report->getClass());
$content = '<div> ' . $detailCmd->getLink('« back') . ' </div>';
$content .= file_get_contents($report->getHtmlOutputFilename());
if ($content === FALSE) {
NQ::simple('hms', hms\NotificationView::ERROR, 'Could not open report file.');
PHPWS_Error::log('Could not open report file ' . $report->getCsvOutputFilename(), 'hms');
$reportCmd = CommandFactory::getCommand('ShowReportDetail');
$reportCmd->setReportClass($report->getClass());
$reportCmd->redirect();
}
$context->setContent($content);
}
示例11: show
public function show()
{
$tpl = array();
$tpl['TERM'] = Term::getPrintableSelectedTerm();
$tpl['NAME'] = $this->student->getFullName();
$tpl['LOCATION'] = $this->assignment->where_am_i();
$submitCmd = CommandFactory::getCommand('AssignStudent');
$submitCmd->setUsername($this->student->getUsername());
$submitCmd->setRoom($this->room);
$submitCmd->setBed($this->bed);
$submitCmd->setMealPlan($this->mealPlan);
$submitCmd->setMoveConfirmed("true");
$submitCmd->setAssignmentType($this->assignmentType);
$submitCmd->setNotes($this->notes);
$form = new PHPWS_Form();
$submitCmd->initForm($form);
$form->addSubmit('submit', 'Confirm Move');
$form->setClass('submit', 'btn btn-danger');
$form->mergeTemplate($tpl);
$tpl = $form->getTemplate();
if (!empty($_SERVER['HTTP_REFERER'])) {
$tpl['BACK'] = $_SERVER['HTTP_REFERER'];
} else {
$tpl['BACK'] = 'index.php?module=hms&action=ShowAssignStudent';
}
Layout::addPageTitle("Assignment Move Confirmation");
return PHPWS_Template::process($tpl, 'hms', 'admin/assign_student_move_confirm.tpl');
}
示例12: show
public function show()
{
PHPWS_Core::initModClass('hms', 'HMS_Lottery.php');
$tpl = array();
$form = new PHPWS_Form();
$submitCmd = CommandFactory::getCommand('LotterySettingsSubmit');
$submitCmd->initForm($form);
$form->addDropBox('lottery_term', Term::getTermsAssoc());
$form->setMatch('lottery_term', PHPWS_Settings::get('hms', 'lottery_term'));
$form->setLabel('lottery_term', 'Lottery Term');
$form->setClass('lottery_term', 'form-control');
$form->addText('hard_cap');
$form->setLabel('hard_cap', 'Max # Returning Students (hard cap):');
$form->setValue('hard_cap', PHPWS_Settings::get('hms', 'lottery_hard_cap'));
$form->setClass('hard_cap', 'form-control');
/*
$form->addText('soph_goal');
$form->setLabel('soph_goal', 'Sophomores:');
$form->setValue('soph_goal', PHPWS_Settings::get('hms', 'lottery_soph_goal'));
*/
$form->addText('jr_goal');
$form->setLabel('jr_goal', 'Juniors:');
$form->setValue('jr_goal', PHPWS_Settings::get('hms', 'lottery_jr_goal'));
$form->setClass('jr_goal', 'form-control');
$form->addText('sr_goal');
$form->setLabel('sr_goal', 'Senior:');
$form->setValue('sr_goal', PHPWS_Settings::get('hms', 'lottery_sr_goal'));
$form->setClass('sr_goal', 'form-control');
$form->addSubmit('submit', 'Save');
$form->mergeTemplate($tpl);
Layout::addPageTitle("Lottery Settings");
return PHPWS_Template::process($form->getTemplate(), 'hms', 'admin/lottery_settings.tpl');
}
示例13: show
public function show()
{
PHPWS_Core::initModClass('hms', 'HMS_Learning_Community.php');
PHPWS_Core::initModClass('hms', 'HMS_RLC_Application.php');
PHPWS_Core::initModClass('hms', 'HMS_RLC_Assignment.php');
Layout::addPageTitle("RLC Application Review");
$tags = array();
if (UserStatus::isAdmin()) {
$menuCmd = CommandFactory::getCommand('ShowAssignRlcApplicants');
$tags['MENU_LINK'] = $menuCmd->getURI();
} else {
$menuCmd = CommandFactory::getCommand('ShowStudentMenu');
$tags['MENU_LINK'] = $menuCmd->getURI();
}
$tags['FULL_NAME'] = $this->student->getFullName();
$tags['STUDENT_TYPE'] = $this->student->getPrintableType();
$tags['TERM'] = Term::toString($this->application->getTerm());
$appType = $this->application->getApplicationType();
if ($appType == RLC_APP_FRESHMEN) {
$tags['APPLICATION_TYPE'] = 'Freshmen';
} else {
if ($appType == RLC_APP_RETURNING) {
$tags['APPLICATION_TYPE'] = 'Re-application';
}
}
$rlcs = HMS_Learning_Community::getRlcList();
$tags['FIRST_CHOICE'] = $rlcs[$this->application->rlc_first_choice_id];
if (isset($this->application->rlc_second_choice_id)) {
$tags['SECOND_CHOICE'] = $rlcs[$this->application->rlc_second_choice_id];
}
if (isset($this->application->rlc_third_choice_id)) {
$tags['THIRD_CHOICE'] = $rlcs[$this->application->rlc_third_choice_id];
}
$tags['WHY_SPECIFIC'] = $this->application->why_specific_communities;
$tags['STRENGTHS_AND_WEAKNESSES'] = $this->application->strengths_weaknesses;
$tags['WHY_FIRST_CHOICE'] = $this->application->rlc_question_0;
if (isset($this->application->rlc_second_choice_id)) {
$tags['WHY_SECOND_CHOICE'] = $this->application->rlc_question_1;
}
if (isset($this->application->rlc_second_choice_id)) {
$tags['WHY_THIRD_CHOICE'] = $this->application->rlc_question_2;
}
// If this application is denied and the person logged in is an admin, show a warning
if ($this->application->isDenied() && UserStatus::isAdmin()) {
NQ::simple('hms', hms\NotificationView::WARNING, 'This application has been denied.');
}
// Show options depending of status of application.
if (UserStatus::isAdmin() && Current_User::allow('hms', 'approve_rlc_applications')) {
if (!$this->application->denied && !HMS_RLC_Assignment::checkForAssignment($this->student->getUsername(), Term::getSelectedTerm())) {
// Approve application for the community selected from dropdown
$approvalForm = $this->getApprovalForm();
$approvalForm->mergeTemplate($tags);
$tags = $approvalForm->getTemplate();
// Deny application
$tags['DENY_APP'] = $this->getDenialLink();
}
}
return PHPWS_Template::process($tags, 'hms', 'student/rlc_application.tpl');
}
示例14: show
public function show()
{
$tpl = array();
$contactCmd = CommandFactory::getCommand('ShowContactForm');
$tpl['CONTACT_LINK'] = $contactCmd->getLink('click here to contact us.');
Layout::addPageTitle("Contact");
return PHPWS_Template::process($tpl, 'hms', 'student/badBannerDataView.tpl');
}
示例15: show
public function show()
{
$tpl = array();
$tpl['MAIN'] = $this->getMain();
$tpl['MESSAGE'] = $this->getMessage();
$tpl['NOTIFICATIONS'] = $this->notifications;
\Layout::addPageTitle("Login");
$this->showHMS(\PHPWS_Template::process($tpl, 'hms', 'guest.tpl'));
}