コード例 #1
1
ファイル: Project.php プロジェクト: jcshep/FrontRunner
 public function generateRoleDropdown($person_id, $project_id)
 {
     $role_array = array();
     $roles = $this->roles;
     // Get person project id
     $person_project = PersonProject::find()->where(['user_id' => $person_id, 'project_id' => $project_id])->one();
     // Get project roles
     if ($roles) {
         foreach ($roles as $id => $role) {
             $role_array[$role->id] = $role->title;
         }
     }
     // Generate dropdown list
     if (count($role_array)) {
         return Html::DropDownList('role', $person_project->role, $role_array, ['class' => 'form-control input-sm role-select', 'data-id' => $person_project->id, 'prompt' => '']);
     }
     return '';
 }
コード例 #2
0
ファイル: pickCourse.php プロジェクト: janwillemm/sa-matcher
 * Time: 21:41
 */
$this->params['breadcrumbs'][] = ['label' => 'Employee', 'url' => ['employee/index']];
$this->params['breadcrumbs'][] = "Create Vacancy";
?>

<h2> Choose your course</h2>

<?php 
$form = RoleBasedActiveForm::begin();
?>

<div class="form-group">
<?php 
if ($mycourses) {
    echo Html::DropDownList('course_id', 1, ArrayHelper::map($mycourses, 'id', 'name'));
    echo "<br /> <br />";
    echo Html::submitButton('Create a Vacancy for above course', ['class' => 'btn btn-primary']);
} else {
    echo "You have no courses available.";
    echo Html::hiddenInput("course_id", "none");
}
?>
</div>


<div class="form-group">
    <?php 
echo Html::submitButton('Create a Vacancy without a course', ['class' => 'btn btn-default']);
?>
</div>
コード例 #3
0
ファイル: pickSA.php プロジェクト: janwillemm/sa-matcher
 * Created by PhpStorm.
 * User: jw
 * Date: 04/02/16
 * Time: 21:41
 */
$this->title = "Write review";
$this->params['breadcrumbs'][] = ['label' => 'Student', 'url' => ['student/index']];
$this->params['breadcrumbs'][] = "Write review";
$wizard_config = ['id' => 'stepwizard', 'steps' => [1 => ['title' => 'Pick a course', 'icon' => 'glyphicon glyphicon-education', 'content' => '<h2>Pick a TA</h2>', 'buttons' => ['next' => ['html' => ""], 'previous' => ['html' => ""], 'save' => ['html' => ""]]], 2 => ['title' => 'Pick a TA', 'icon' => 'glyphicon glyphicon-user', 'content' => '<h2>Pick a TA</h2>', 'buttons' => ['next' => ['html' => ""], 'previous' => ['html' => ""], 'save' => ['html' => ""]]], 3 => ['title' => 'Write your review', 'icon' => 'glyphicon glyphicon-pencil', 'content' => '<h2>Write a review</h2>', 'buttons' => ['next' => ['html' => ""], 'previous' => ['html' => ""], 'save' => ['html' => ""]]]], 'start_step' => 2];
echo \drsdre\wizardwidget\WizardWidget::widget($wizard_config);
?>

<?php 
$form = RoleBasedActiveForm::begin();
?>

<div class="form-group">
<?php 
echo Html::DropDownList('receiver_id', 1, ArrayHelper::map($sas, 'id', 'name'));
?>

</div>

<div class="form-group">
    <?php 
echo Html::submitButton('Continue', ['class' => 'btn btn-primary']);
?>
</div>

<?php 
RoleBasedActiveForm::end();
コード例 #4
0
ファイル: searchresults.php プロジェクト: jcshep/FrontRunner
}], ['class' => 'yii\\grid\\ActionColumn', 'headerOptions' => ['width' => '100'], 'template' => '{view}', 'buttons' => ['view' => function ($url, $model) {
    return '<a target="_blank" class="btn btn-primary btn-xs" href="/person/' . $model->id . '">View User</a>';
}]]]]);
?>
            
            <div class="row">
                <?php 
if ($model->roles) {
    ?>
                <div class="col-sm-3">
                    <?php 
    $roles = $model->roles;
    foreach ($roles as $id => $role) {
        $role_array[$role->id] = $role->title;
    }
    echo Html::DropDownList('role', NULL, $role_array, ['class' => 'form-control', 'prompt' => 'Select Role (Optional)']);
    ?>
                </div> <!--col-->
                <?php 
}
?>
                <div class="col-sm-4">
                    <?php 
echo Html::submitButton('Add Selected to ' . $list_type . ' List', ['class' => 'btn btn-primary']);
?>
   
                </div> <!--col-->
            </div> <!--row-->
            
            <?php 
echo Html::endForm();