コード例 #1
0
ファイル: config.php プロジェクト: aaryani/RD-Switchboard-Net
 public function form()
 {
     acl_enforce('REGISTRY_STAFF');
     $data['title'] = 'Configuration';
     $data['scripts'] = array('config_app');
     $data['js_lib'] = array('core', 'angular');
     $this->load->view("config_app", $data);
 }
コード例 #2
0
 function index()
 {
     acl_enforce('REGISTRY_USER');
     $this->load->model("registry/data_source/data_sources", "ds");
     $data['data_sources'] = $this->ds->getOwnedDataSources();
     $data['js_lib'] = array('core');
     $data['scripts'] = array();
     $data['title'] = 'TR DCI Preview Tool';
     $this->load->view('query_interface', $data);
 }
コード例 #3
0
 function getDataSources()
 {
     acl_enforce('REGISTRY_STAFF');
     $this->load->model("data_source/data_sources", "ds");
     $dataSources = $this->ds->getAll(0, 0);
     //get everything
     $items = array();
     foreach ($dataSources as $ds) {
         $item = array();
         $item['title'] = $ds->title;
         $item['id'] = $ds->id;
         $item['chart_html'] = '<h4>' . $ds->title . '</h4>';
         $item['chart_html'] .= "<div class='drawGraph' id='" . $ds->id . "'>\t\t\t\t\t<div id='overall_chart_div_" . $ds->id . "' style='width:80%; margin:auto; min-height:250px;''>\n\t\t\t\t\t\t<i>Loading data source quality information...</i>\n\t\t\t\t\t</div></div><hr />";
         array_push($items, $item);
     }
     return $items;
 }
コード例 #4
0
ファイル: mydois.php プロジェクト: aaryani/RD-Switchboard-Net
 function __construct()
 {
     acl_enforce('DOI_USER');
     $this->load->model('_mydois', 'mydois');
 }
コード例 #5
0
 /**
  * Get published record for this ds ; AJAX data for edit data_source settings primary links
  *
  * @author Liz Woods 
  * @param  [int] 	$data_source_id
  * @param  [string] $key
  * @return [json]   
  */
 public function get_datasource_object()
 {
     $data_source_id = $this->input->post('data_source_id');
     $key = $this->input->post('key');
     //administrative and loading stuffs
     acl_enforce('REGISTRY_USER');
     ds_acl_enforce($data_source_id);
     $jsonData['status'] = "OK";
     $jsonData['message'] = '';
     header('Cache-Control: no-cache, must-revalidate');
     header('Content-type: application/json');
     $this->load->model('data_source/data_sources', 'ds');
     $this->load->model('registry_object/registry_objects', 'ro');
     $data_source = $this->ds->getByID($data_source_id);
     $registry_object = $this->ro->getPublishedByKey($key);
     if ($registry_object == null || $data_source->id != $data_source_id) {
         $jsonData['message'] = "You must provide a published registry object key from within this data source for primary relationship.";
     }
     echo json_encode($jsonData);
 }
コード例 #6
0
 function __construct()
 {
     parent::__construct();
     $this->load->config('spotlight');
     acl_enforce('PORTAL_STAFF');
 }
コード例 #7
0
 public function __construct()
 {
     parent::__construct();
     acl_enforce('REGISTRY_SUPERUSER');
 }
コード例 #8
0
 function __construct()
 {
     parent::__construct();
     acl_enforce('REGISTRY_USER');
 }
コード例 #9
0
 /**
  * Sync a single registry object by key or by id
  * @return json
  */
 function sync()
 {
     acl_enforce('REGISTRY_STAFF');
     header('Cache-Control: no-cache, must-revalidate');
     header('Content-type: application/json');
     set_exception_handler('json_exception_handler');
     $this->load->model('registry_object/registry_objects', 'ro');
     $this->load->library('solr');
     $use = 'id';
     $idkey = $this->input->post('idkey');
     if (!$idkey) {
         $data = file_get_contents("php://input");
         $array = json_decode($data, true);
         $idkey = $array['idkey'];
     }
     $ro = $this->ro->getByID($idkey);
     if (!$ro) {
         $ro = $this->ro->getAllByKey($idkey);
         $use = 'keys';
     }
     if (!$ro) {
         $ro = $this->ro->getBySlug($idkey);
         $use = 'slug';
     }
     $data = array();
     if (!$ro) {
         $data['status'] = 'error';
         $data['message'] = '<i class="icon icon-remove"></i> No Registry Object Found!';
     } else {
         if ($use == 'id') {
             if ($msg = $ro->sync(true, 99999999) != true) {
                 $data['status'] = 'error';
                 $data['message'] = $msg;
             }
         } else {
             if ($use == 'keys') {
                 foreach ($ro as $r) {
                     if ($msg = $ro->sync() != true) {
                         $data['status'] = 'error';
                         $data['message'] = $msg;
                     }
                 }
             } else {
                 if ($use == 'slug') {
                     if ($msg = $ro->sync() != true) {
                         $data['status'] = 'error';
                         $data['message'] = $msg;
                     }
                 }
             }
         }
         $data['status'] = 'success';
         $data['message'] = '<i class="icon icon-ok"></i> Done!';
     }
     echo json_encode($data);
 }
コード例 #10
0
 function __construct()
 {
     parent::__construct();
     acl_enforce('PORTAL_STAFF');
     $this->load->helper('file');
     $this->load->model('theme_pages');
 }
コード例 #11
0
ファイル: pids.php プロジェクト: aaryani/RD-Switchboard-Net
 function __construct()
 {
     acl_enforce('PIDS_USER');
     $this->load->model('_pids', 'pids');
 }
コード例 #12
0
 function __construct()
 {
     parent::__construct();
     acl_enforce('PORTAL_STAFF');
     $this->load->helper(array('form', 'url'));
 }
コード例 #13
0
 public function manage_table($data_source_id = false)
 {
     acl_enforce('REGISTRY_USER');
     ds_acl_enforce($data_source_id);
     $data['title'] = 'Manage My Records';
     $this->load->model('data_source/data_sources', 'ds');
     if ($data_source_id) {
         $data_source = $this->ds->getByID($data_source_id);
         if (!$data_source) {
             show_error("Unable to retrieve data source id = " . $data_source_id, 404);
         }
         $data_source->updateStats();
         //TODO: XXX
         //$data['data_source'] = $data_source;
         $data['data_source'] = array('title' => $data_source->title, 'id' => $data_source->id, 'count_total' => $data_source->count_total, 'count_APPROVED' => $data_source->count_APPROVED, 'count_SUBMITTED_FOR_ASSESSMENT' => $data_source->count_SUBMITTED_FOR_ASSESSMENT, 'count_PUBLISHED' => $data_source->count_PUBLISHED);
         //MMR
         //$this->load->model('registry_object/registry_objects', 'ro');
         //$ros = $this->ro->getByDataSourceID($data_source_id);
     } else {
         //showing all registry objects for all datasource
         //TODO: check for privileges
         $this->load->model('maintenance/maintenance_stat', 'mm');
         $total = $this->mm->getTotalRegistryObjectsCount('db');
         $data['data_source'] = array('title' => 'Viewing All Registry Object', 'id' => '0', 'count_total' => $total, 'count_APPROVED' => 0, 'count_SUBMITTED_FOR_ASSESSMENT' => 0, 'count_PUBLISHED' => 0);
         //show_error('No Data Source ID provided. use all data source view for relevant roles');
     }
     $data['scripts'] = array('manage_my_record');
     $data['js_lib'] = array('core', 'tinymce', 'datepicker', 'dataTables');
     $this->load->view("manage_my_record", $data);
 }
コード例 #14
0
ファイル: role.php プロジェクト: aaryani/RD-Switchboard-Net
 /**
  * Construct the controller
  * Default to REGISTRY_SUPERUSER access
  */
 public function __construct()
 {
     parent::__construct();
     acl_enforce('REGISTRY_SUPERUSER');
     $this->load->model('core/roles');
 }
コード例 #15
0
ファイル: group.php プロジェクト: aaryani/RD-Switchboard-Net
 function cms()
 {
     acl_enforce('REGISTRY_USER', '', true);
     $this->blade->set('scripts', array('contributor_app', 'contributor_factory'))->set('lib', array('textAngular', 'ngupload'))->render('group/group_cms');
 }