当前位置: 首页>>代码示例>>PHP>>正文


PHP EventAction::link方法代码示例

本文整理汇总了PHP中EventAction::link方法的典型用法代码示例。如果您正苦于以下问题:PHP EventAction::link方法的具体用法?PHP EventAction::link怎么用?PHP EventAction::link使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EventAction的用法示例。


在下文中一共展示了EventAction::link方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionCreate

 /**
  * Handle the selection of a booking for creating an op note.
  *
  * (non-phpdoc)
  *
  * @see parent::actionCreate()
  */
 public function actionCreate()
 {
     $errors = array();
     // if we are after the submit we need to check if any event is selected
     if (preg_match('/^biometry([0-9]+)$/', Yii::app()->request->getPost('SelectBiometry'), $m)) {
         $importedEvent = OphInBiometry_Imported_Events::model()->findByPk($m[1]);
         $this->updateImportedEvent(Event::model()->findByPk($importedEvent->event_id), $importedEvent);
         $this->redirect(array('/OphInBiometry/default/view/' . $importedEvent->event_id . '?autosaved=1'));
     }
     $criteria = new CDbCriteria();
     // we are looking for the unlinked imported events in the database
     $criteria->addCondition('patient_id = :patient_id');
     $criteria->addCondition('is_linked = 0');
     $criteria->addCondition('event.deleted = 0');
     $criteria->params = array(':patient_id' => $this->patient->id);
     $unlinkedEvents = OphInBiometry_Imported_Events::model()->with(array('patient', 'event'))->findAll($criteria);
     // if we have 0 unlinked event we follow the manual process
     if (sizeof($unlinkedEvents) == 0 || Yii::app()->request->getQuery('force_manual') == '1') {
         Yii::app()->user->setFlash('issue.formula', $this->flash_message);
         parent::actionCreate();
     } else {
         // if we have more than 1 event we render the selection screen
         $this->title = 'Please Select a Biometry Report';
         $this->event_tabs = array(array('label' => 'The following Biometry reports are available for this patient:', 'active' => true));
         $cancel_url = $this->episode ? '/patient/episode/' . $this->episode->id : '/patient/episodes/' . $this->patient->id;
         $this->event_actions = array(EventAction::link('Cancel', Yii::app()->createUrl($cancel_url), null, array('class' => 'button small warning')));
         $this->render('select_imported_event', array('errors' => $errors, 'imported_events' => $unlinkedEvents));
     }
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:36,代码来源:DefaultController.php

示例2: array

 * (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011
 * (C) OpenEyes Foundation, 2011-2013
 * This file is part of OpenEyes.
 * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <info@openeyes.org.uk>
 * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
 * @copyright Copyright (c) 2011-2013, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
// Event actions
$this->event_actions[] = EventAction::link('Cancel', Yii::app()->createUrl('/patient/episode/' . $episode->id), array('level' => 'cancel'));
$this->event_actions[] = EventAction::button('Save', 'save', array('id' => 'episode_save', 'level' => 'save'));
if ($episode->diagnosis) {
    $eye = $episode->eye ? $episode->eye->name : 'None';
    $diagnosis = $episode->diagnosis ? $episode->diagnosis->term : 'none';
} else {
    $eye = 'No diagnosis';
    $diagnosis = 'No diagnosis';
}
$episode->audit('episode summary', 'view');
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'update-episode', 'enableAjaxValidation' => false, 'action' => array('patient/updateepisode/' . $episode->id)));
?>

	<div class="element-data">
		<h2>Summary</h2>
		<h3><?php 
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:updateEpisode.php

示例3: array

 * @copyright Copyright (c) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<div class="admin box">
    <h2>Mapping Items for <?php 
echo $definition->name;
?>
</h2>
    <?php 
echo EventAction::link('Definitions List', '/worklistAdmin/definitions/', array('level' => 'secondary'), array('class' => 'button small'))->toHtml();
?>
    <?php 
if ($this->manager->canUpdateWorklistDefinition($definition)) {
    echo EventAction::link('Add Mapping', '/worklistAdmin/addDefinitionMapping/' . $definition->id, array('level' => 'primary'), array('class' => 'button small'))->toHtml();
}
?>
    <?php 
if ($definition->mappings) {
    ?>
    <form id="mapping-list" method="POST">
        <input type="hidden" name="YII_CSRF_TOKEN" value="<?php 
    echo Yii::app()->request->csrfToken;
    ?>
"/>
        <?php 
    if ($definition->displayed_mappings) {
        ?>
        <h3>Displayed Mapping Items</h3>
        <table class="generic-admin grid">
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:definition_mappings.php

示例4: array

/**
 * OpenEyes.
 *
 * (C) OpenEyes Foundation, 2016
 * This file is part of OpenEyes.
 * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <info@openeyes.org.uk>
 * @copyright Copyright (c) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<div class="admin box">
    <h2>Generated Instances for <?php 
echo $definition->name;
?>
</h2>
    <?php 
echo EventAction::link('Definitions List', '/worklistAdmin/definitions/', array('level' => 'secondary'), array('class' => 'button small'))->toHtml();
?>
    <?php 
$this->renderPartial('//admin/worklists/definition_worklists_table', array('definition' => $definition));
?>
</div>
开发者ID:openeyes,项目名称:openeyes,代码行数:29,代码来源:definition_worklists.php

示例5: array

 *
 * @author OpenEyes <info@openeyes.org.uk>
 * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
 * @copyright Copyright (c) 2011-2013, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
$this->beginContent('//patient/event_container');
?>

<?php 
// Event actions
if ($this->checkPrintAccess()) {
    $this->event_actions[] = EventAction::button('Print', 'print', null, array('class' => 'button small'));
}
if ($this->editable && ($next_step = $this->getNextStep())) {
    $this->event_actions[] = EventAction::link($next_step->name, Yii::app()->createUrl($this->event->eventType->class_name . '/default/step/' . $this->event->id), null, array('class' => 'button small'));
}
?>

<?php 
if ($this->event->delete_pending) {
    ?>
	<div class="alert-box alert with-icon">
		This event is pending deletion and has been locked.
	</div>
<?php 
}
?>

<?php 
$this->renderOpenElements($this->action->id);
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:view.php

示例6: array

 *
 * (C) OpenEyes Foundation, 2016
 * This file is part of OpenEyes.
 * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <info@openeyes.org.uk>
 * @copyright Copyright (c) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<div class="admin box">
    <h2>Worklist Patients: <?php 
echo $worklist->name;
?>
 (<?php 
echo $worklist->worklist_definition->name;
?>
)</h2>
<?php 
echo EventAction::link('All Instances', '/worklistAdmin/definitionWorklists/' . $worklist->worklist_definition_id, array('level' => 'secondary'), array('class' => 'button small'))->toHtml();
?>
&nbsp;<?php 
echo EventAction::link('Definition Mappings', '/worklistAdmin/definitionMappings/' . $worklist->worklist_definition_id, array('level' => 'secondary'), array('class' => 'button small'))->toHtml();
echo $this->manager->renderWorklistForDashboard($worklist);
?>
</div>
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:worklist_patients.php

示例7: array

 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <info@openeyes.org.uk>
 * @copyright Copyright (c) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
$this->beginContent('//patient/event_container');
?>

<?php 
// Event actions
if ($this->canMarkRead()) {
    $this->event_actions[] = EventAction::link('Mark Read', Yii::app()->createUrl($this->getModule()->name . '/Default/markRead/' . $this->event->id), null, array('class' => 'warning button small'));
} elseif ($this->canMarkUnread()) {
    $this->event_actions[] = EventAction::link('Mark Unread', Yii::app()->createUrl($this->getModule()->name . '/Default/markUnread/' . $this->event->id), null, array('class' => 'secondary button small'));
}
if ($this->checkPrintAccess()) {
    $this->event_actions[] = EventAction::button('Print', 'print', null, array('class' => 'button small'));
}
?>

<?php 
if ($this->event->delete_pending) {
    ?>
    <div class="alert-box alert with-icon">
        This event is pending deletion and has been locked.
    </div>
<?php 
}
?>
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:view.php

示例8: array

 * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <info@openeyes.org.uk>
 * @copyright Copyright (c) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<div class="box admin">
    <div class="row">
        <div class="large-10 column">
            <h2>Manage Manual Worklists</h2>
            <?php 
echo EventAction::link('Add Worklist', '/worklist/manualAdd/', array(), array('class' => 'button primary small'))->toHtml();
?>

            <?php 
if ($current_worklists || $available_worklists) {
    ?>
            <div id="draggablelist">
                <?php 
    echo CHtml::beginForm(array('/worklist/manualUpdateDisplayOrder'), 'post');
    ?>
                <?php 
    echo CHtml::hiddenField('item_ids');
    ?>
                <div id="draggablelist-items" class="row">
                    <div class="large-6 column">
                        <h2>Current Worklists</h2>
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:index.php

示例9: array

            $preview_button = EventAction::button('Preview Application', null, array('disabled' => true), array('title' => 'Preview unavailable for NICE compliant applications', 'class' => 'button small'));
            $submit_button_text = 'Submit Notification';
        }
        if ($this->checkPrintAccess()) {
            $this->event_actions[] = $preview_button;
        }
        if ($this->checkEditAccess()) {
            $url = '#';
            if ($service->hasEmailRecipients()) {
                $submitButtonStyles = array('class' => 'button small');
                $url = $this->createUrl('processApplication', array('event_id' => $this->event->id));
            } else {
                $submitButtonStyles = array('class' => 'button small noEmailRecipient disabled');
                $warnings[] = 'No application recipient configured for ' . $status . ' application at ' . $service->getSiteName() . ', please contact support to resolve this.';
            }
            $this->event_actions[] = EventAction::link($submit_button_text, $url, null, $submitButtonStyles);
        }
    }
    if ($this->checkPrintAccess()) {
        $this->event_actions[] = EventAction::button('Print', 'print', null, array('class' => 'button small'));
    }
}
$this->beginContent('//patient/event_container');
?>

	<?php 
$this->renderPartial('//base/_messages');
?>

	<?php 
if ($this->event->delete_pending) {
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:view.php

示例10: Context

 * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <info@openeyes.org.uk>
 * @copyright Copyright (c) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<div class="admin box">
    <h2>Display Context(s) for <?php 
echo $definition->name;
?>
</h2>
    <?php 
echo EventAction::link('Definitions List', '/worklistAdmin/definitions/', array('level' => 'secondary'), array('class' => 'button small'))->toHtml();
?>
    <?php 
echo EventAction::link('View Definition', '/worklistAdmin/definition/' . $definition->id, array('level' => 'secondary'), array('class' => 'button small'))->toHtml();
?>
    <?php 
echo EventAction::link('Add Context', '/worklistAdmin/definitionDisplayContextAdd/' . $definition->id, array('level' => 'primary'), array('class' => 'button small'))->toHtml();
?>
    <?php 
$this->renderPartial('//admin/worklists/definition_display_contexts_table', array('definition' => $definition));
?>
</div>
开发者ID:openeyes,项目名称:openeyes,代码行数:30,代码来源:definition_display_contexts.php

示例11: array

 * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <info@openeyes.org.uk>
 * @copyright Copyright (c) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<div class="admin box">
    <h2>Automatic Worklist Definitions</h2>
    <?php 
echo EventAction::link('Add Definition', '/worklistAdmin/definitionUpdate/', array(), array('class' => 'button primary small'))->toHtml();
?>
    <?php 
if ($definitions) {
    ?>
    <form id="definition-list" method="POST">
        <input type="hidden" name="YII_CSRF_TOKEN" value="<?php 
    echo Yii::app()->request->csrfToken;
    ?>
"/>
        <table class="generic-admin grid">
            <thead>
            <tr>
                <th>Order</th>
                <th>Name</th>
                <th>Actions</th>
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:definitions.php

示例12: array

}
?>
/> 5th
			</label>
		</div>
	</fieldset>
	<?php 
echo $form->errorSummary($sequence);
?>
	<div class="field-row row">
		<div class="large-10 large-offset-2 column">
			<?php 
echo EventAction::button('Save', 'save', array('level' => 'save'))->toHtml();
?>
			<?php 
echo EventAction::link('Cancel', Yii::app()->createUrl('OphTrOperationbooking/admin/viewSequences'), array('level' => 'cancel'))->toHtml();
?>
			<?php 
if ($sequence->id) {
    ?>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<?php 
    echo EventAction::button('View sessions', 'view_sessions', array(), array('class' => 'button small'))->toHtml();
    ?>
				<?php 
    echo EventAction::button('Add session', 'add_session_to_sequence', array(), array('class' => 'button small'))->toHtml();
    ?>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<?php 
    echo EventAction::button('Delete sequence', 'delete_sequence', array('level' => 'warning'), array('class' => 'button small'))->toHtml();
    ?>
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:editsequence.php

示例13: actionCreate

 /**
  * Handle the selection of a booking for creating an op note.
  *
  * (non-phpdoc)
  *
  * @see parent::actionCreate()
  */
 public function actionCreate()
 {
     $errors = array();
     if (!empty($_POST)) {
         if (preg_match('/^booking([0-9]+)$/', @$_POST['SelectBooking'], $m)) {
             $this->redirect(array('/OphTrOperationnote/Default/create?patient_id=' . $this->patient->id . '&booking_event_id=' . $m[1]));
         } elseif (@$_POST['SelectBooking'] == 'emergency') {
             $this->redirect(array('/OphTrOperationnote/Default/create?patient_id=' . $this->patient->id . '&unbooked=1'));
         }
         $errors = array('Operation' => array('Please select a booked operation'));
     }
     if ($this->booking_operation || $this->unbooked) {
         parent::actionCreate();
     } else {
         // set up form for selecting a booking for the Op note
         $bookings = array();
         if ($api = Yii::app()->moduleAPI->get('OphTrOperationbooking')) {
             $bookings = $api->getOpenBookingsForEpisode($this->episode->id);
         }
         $this->title = 'Please select booking';
         $this->event_tabs = array(array('label' => 'Select a booking', 'active' => true));
         $cancel_url = $this->episode ? '/patient/episode/' . $this->episode->id : '/patient/episodes/' . $this->patient->id;
         $this->event_actions = array(EventAction::link('Cancel', Yii::app()->createUrl($cancel_url), null, array('class' => 'button small warning')));
         $this->render('select_event', array('errors' => $errors, 'bookings' => $bookings));
     }
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:33,代码来源:DefaultController.php

示例14: array

 * @link http://www.openeyes.org.uk
 * @author OpenEyes <info@openeyes.org.uk>
 * @copyright Copyright (c) 2016, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>

<?php 
if ($this->checkPrintAccess()) {
    $this->event_actions[] = EventAction::button('Print', 'print', null, array('class' => 'small button'));
}
if ($this->checkLabelPrintAccess()) {
    $this->event_actions[] = EventAction::button('Print Labels', 'print_labels', null, array('class' => 'small button'));
}
if ($this->canIssue()) {
    $this->event_actions[] = EventAction::link('Issue', '/OphCoCvi/default/issue/' . $this->event->id, null, array('class' => 'small button secondary'));
}
$this->beginContent('//patient/event_container');
?>

<?php 
if ($this->event->delete_pending) {
    ?>
    <div class="alert-box alert with-icon">
        This event is pending deletion and has been locked.
    </div>
<?php 
}
?>

<?php 
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:view.php

示例15: actionUpdate

 /**
  * The update action for the given event id
  *
  * @param $id
  * @throws CHttpException
  * @throws SystemException
  * @throws Exception
  */
 public function actionUpdate($id)
 {
     if (!empty($_POST)) {
         // somethings been submitted
         if (isset($_POST['cancel'])) {
             // Cancel button pressed, so just bounce to view
             $this->redirect(array('default/view/' . $this->event->id));
         }
         $errors = $this->setAndValidateElementsFromData($_POST);
         // update the event
         if (empty($errors)) {
             $transaction = Yii::app()->db->beginTransaction();
             try {
                 //TODO: should all the auditing be moved into the saving of the event
                 $success = $this->saveEvent($_POST);
                 if ($success) {
                     //TODO: should not be pasing event?
                     $this->afterUpdateElements($this->event);
                     $this->logActivity('updated event');
                     $this->event->audit('event', 'update');
                     $this->event->user = Yii::app()->user->id;
                     if (!$this->event->save()) {
                         throw new SystemException('Unable to update event: ' . print_r($this->event->getErrors(), true));
                     }
                     OELog::log("Updated event {$this->event->id}");
                     $transaction->commit();
                     $this->redirect(array('default/view/' . $this->event->id));
                 } else {
                     throw new Exception("Unable to save edits to event");
                 }
             } catch (Exception $e) {
                 $transaction->rollback();
                 throw $e;
             }
         }
     } else {
         // get the elements
         $this->setOpenElementsFromCurrentEvent('update');
     }
     $this->editing = true;
     $this->event_tabs = array(array('label' => 'View', 'href' => Yii::app()->createUrl($this->event->eventType->class_name . '/default/view/' . $this->event->id)), array('label' => 'Edit', 'active' => true));
     $this->event_actions = array(EventAction::link('Cancel', Yii::app()->createUrl($this->event->eventType->class_name . '/default/view/' . $this->event->id), array('level' => 'cancel')));
     $this->render($this->action->id, array('errors' => @$errors));
 }
开发者ID:openeyeswales,项目名称:OpenEyes,代码行数:52,代码来源:BaseEventTypeController.php


注:本文中的EventAction::link方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。