Ejemplo n.º 1
0
	if ((isset($_GET['id']) && PAGE == "DataEntry/grid.php") 
		|| (isset($fetched) && PAGE == "DataEntry/index.php")
		|| !$longitudinal) 
	{
		// Show record name on left-hand menu (if a record is pulled up)
		$record_label = "";
		if ((isset($_GET['id']) && PAGE == "DataEntry/grid.php")
			|| (isset($fetched) && PAGE == "DataEntry/index.php" && isset($_GET['event_id']) && is_numeric($_GET['event_id'])))
		{
			require_once APP_PATH_DOCROOT . 'ProjectGeneral/form_renderer_functions.php';
			if (PAGE == "DataEntry/grid.php") {
				$fetched = $_GET['id'];
			}
			$record_display = RCView::b(RCView::escape($_GET['id']));
			// Get Custom Record Label and Secondary Unique Field values (if applicable)
			$this_custom_record_label_secondary_pk = Records::getCustomRecordLabelsSecondaryFieldAllRecords(addDDEending($fetched), false, getArm(), true);
			if ($this_custom_record_label_secondary_pk != '') {
				$record_display .= "  $this_custom_record_label_secondary_pk";
			}
			// DISPLAY RECORD NAME: Set full string for record name with prepended label (e.g., Study ID 202)
			if ($longitudinal) {
				// Longitudinal project: Display record name as link and "select other record" link
				$record_label = RCView::div(array('style'=>'padding:0 0 4px;color:#800000;font-size:12px;'), 
									RCView::div(array('style'=>'float:left;'),
										RCView::a(array('style'=>'color:#800000;','href'=>APP_PATH_WEBROOT."DataEntry/grid.php?pid=$project_id&id=$fetched&arm=".getArm()), 
											RCView::img(array('src'=>'application_view_tile.png','class'=>'imgfix')) .
											strip_tags(label_decode($table_pk_label)) . " " . $record_display
										)
									) .
									RCView::div(array('style'=>'float:right;line-height:18px;'),
										RCView::a(array('id'=>'menuLnkChooseOtherRec','class'=>'opacity50','style'=>'color:#000066;vertical-align:middle;text-decoration:underline;font-size:10px;','href'=>APP_PATH_WEBROOT."DataEntry/grid.php?pid=$project_id"), 
Ejemplo n.º 2
0
                $grid_form_status[$this_event_id][$this_form] = $instance_count[$this_event_id];
                // Add form instance
                foreach ($these_instances as $this_instance => $this_form_status) {
                    $grid_form_status[$this_event_id][$this_form][$this_instance] = $this_form_status;
                }
            }
        }
    }
    // Determine if this record also exists as a survey response for some instruments
    $surveyResponses = array();
    if ($surveys_enabled) {
        $surveyResponses = Survey::getResponseStatus($project_id, $id);
    }
    // Get Custom Record Label and Secondary Unique Field values (if applicable)
    if ($existing_record) {
        $this_custom_record_label_secondary_pk = "<span style='color:#800000;margin-left:3px;'>" . Records::getCustomRecordLabelsSecondaryFieldAllRecords(addDDEending($_GET['id']), false, $arm, true, '') . "</span>";
    } else {
        $this_custom_record_label_secondary_pk = "";
    }
    // JavaScript for setting floating table headers
    ?>
	<script type="text/javascript">
	$(function(){
		// Center the record ID name with the table
		var eg = $('#event_grid_table');
		if (eg.width() < 700) {
			$('#record_display_name').width( eg.width() );
		}
		// Enable fixed table headers for event grid
		enableFixedTableHdrs('event_grid_table');
		// Also set it to run again if the page is resized