public function load_resourses()
 {
     // wp_enqueue_style( 'momentum-css', SiteHelper::getResoursesPath() . '/js/moment/min/moment.min.css');
     // wp_enqueue_style( 'bsalted-css', SiteHelper::getResoursesPath() . '/css/main.css' );
     wp_enqueue_style('fullcalendar-css', SiteHelper::getResoursesPath() . '/js/fullcalendar/dist/fullcalendar.min.css');
     wp_enqueue_style('qtip-css', SiteHelper::getResoursesPath() . '/js/qtip/jquery.qtip.min.css');
     wp_enqueue_style('chosen-css', SiteHelper::getResoursesPath() . '/js/chosen/chosen.min.css');
     wp_enqueue_script('momentum-js', SiteHelper::getResoursesPath() . '/js/moment/min/moment.min.js', array('jquery'), '1.1', false);
     wp_enqueue_script('fullcalendar-js', SiteHelper::getResoursesPath() . '/js/fullcalendar/dist/fullcalendar.min.js', array('jquery'), '1.1', false);
     wp_enqueue_script('qtip-js', SiteHelper::getResoursesPath() . '/js/qtip/jquery.qtip.js', array('jquery'), '1.1', false);
     wp_enqueue_script('chosen-js', SiteHelper::getResoursesPath() . '/js/chosen/chosen.jquery.min.js', array('jquery'), '1.1', false);
     wp_enqueue_script('bsalted-js', SiteHelper::getResoursesPath() . '/js/main/main.js', array('jquery'), '1.1', false);
     $db = new DatabaseAccessWrapper();
     $role = User::getRole();
     $stage = new Event();
     wp_localize_script('fullcalendar-js', 'bsaltedEventsData', $stage->getData());
     wp_localize_script('fullcalendar-js', 'bsaltedOptions', $db::get_option('bsalted_adventures_days'));
     if (in_array($role, UserRole::restricted())) {
         SiteHelper::hideCustomMenuItem();
         if (!$role === 'director_of_logistics') {
             wp_localize_script('bsalted-js', 'userRole', 'limited');
         }
     }
 }
示例#2
0
<?php

use Nerds\Bsalted\Entity\CourseEntity\Course;
use Nerds\Bsalted\Entity\EventEntity\Event;
use Nerds\Bsalted\Entity\UserEntity\User;
use Nerds\Base\Util\Helpers\DatabaseAccessWrapper as db;
use Nerds\Base\Util\Helpers\SiteHelper;
$stage = new Event();
$stage_fields = $stage->addition_fields_list();
$user_fields = User::addition_fields_list();
$db = new db();
$savans = User::getByRole('adventure_savant');
$capitans = User::getByRole('adventure_capitan');
$stage_id = get_the_ID();
$raw_stage_name = $stage->getNameByID($stage_id);
$stored_data = $stage->getData()[$stage_id];
$course_data = $db->getCourseData()[$stored_data['course']];
$human_resourses = explode(',', $course_data['resourses']);
$stage_name = $stage_fields['name'] . $raw_stage_name;
$types_fields = $stage->types_fields_list();
$args = array('post_type' => Course::POST_TYPE, 'selected' => $stored_data['course'], 'name' => $stage_fields['course'], 'show_option_none' => 'Courses...', 'option_none_value' => '0');
?>

<?php 
if (!$amount) {
    ?>
	
<div class="bsalted-field">

	<?php 
    echo '<label for="courses">Select a Course:</label> ';