diff options
author | Sashi20 | 2020-02-11 10:44:10 +0530 |
---|---|---|
committer | Sashi20 | 2020-02-11 10:44:10 +0530 |
commit | 50b6cef3a5cc9a6aebbe73fd00a6086a8d4dae35 (patch) | |
tree | 5acdb9f3242dd2084317e9a4eec3af72f59e916d | |
parent | ec453ec7e823311098506ebdd29924a26ff47a20 (diff) | |
download | om_pssp-50b6cef3a5cc9a6aebbe73fd00a6086a8d4dae35.tar.gz om_pssp-50b6cef3a5cc9a6aebbe73fd00a6086a8d4dae35.tar.bz2 om_pssp-50b6cef3a5cc9a6aebbe73fd00a6086a8d4dae35.zip |
Move link to download abstract to download codes page
-rwxr-xr-x | download.inc | 1 | ||||
-rwxr-xr-x | pssp_details.inc | 12 | ||||
-rwxr-xr-x | run.inc | 8 |
3 files changed, 11 insertions, 10 deletions
diff --git a/download.inc b/download.inc index a59bd63..60774a1 100755 --- a/download.inc +++ b/download.inc @@ -34,6 +34,7 @@ function om_pssp_project_files() { $query = db_select('om_pssp_submitted_abstracts_file'); $query->fields('om_pssp_submitted_abstracts_file'); $query->condition('proposal_id', $proposal_id); + $query->condition('filetype', A); $result = $query->execute(); $om_pssp_project_files = $result->fetchObject(); //var_dump($om_pssp_project_files);die; diff --git a/pssp_details.inc b/pssp_details.inc index 44f1b35..5188c8d 100755 --- a/pssp_details.inc +++ b/pssp_details.inc @@ -5,7 +5,7 @@ function om_pssp_completed_proposals_all() $query = db_select('om_pssp_proposal'); $query->fields('om_pssp_proposal'); $query->condition('approval_status', 3); - $query->orderBy('actual_completion_date', 'ASC'); + $query->orderBy('actual_completion_date', 'DESC'); //$query->condition('is_completed', 1); $result = $query->execute(); @@ -28,24 +28,22 @@ function om_pssp_completed_proposals_all() $query1->condition('proposal_id', $proposal_id); $project_files = $query1->execute(); $project_abstract = $project_files->fetchObject(); - $approval_date = date("Y", $row->actual_completion_date); + $completion_date = date("Y", $row->actual_completion_date); $preference_rows[] = array( $i, l($row->project_title, "powersystems/pssp/om-pssp-run/" . $row->id), - l('Download', "powersystems/pssp/download/abstract-file/" . $row->id), $row->contributor_name, $row->university, - $approval_date + $completion_date ); $i++; } //$row = $result->fetchObject() $preference_header = array( 'No', 'Power System Simulation Project', - 'Abstract File', 'Contributor Name', - 'Institute', - 'Year' + 'University / Institute', + 'Year of Completion' ); $output .= theme('table', array( 'header' => $preference_header, @@ -19,7 +19,7 @@ function om_pssp_run_form($form, &$form_state) $form = array(); $form['om_pssp'] = array( '#type' => 'select', - '#title' => t('Title of the OM PSSP'), + '#title' => t('Title of the Power System Simulation'), '#options' => _list_of_om_pssp(), '#default_value' => $selected, '#ajax' => array( @@ -44,7 +44,8 @@ function om_pssp_run_form($form, &$form_state) ); $form['selected_om_pssp'] = array( '#type' => 'item', - '#markup' => '<div id="ajax_selected_om_pssp">' . l('Download Power System Simulation', 'powersystems/pssp/full-download/project/' . $om_pssp_default_value) . '</div>' + '#markup' => '<div id="ajax_selected_om_pssp">' . l('Download Abstract', "powersystems/pssp/download/abstract-file/" . $om_pssp_default_value) + . '<br>' . l('Download Power System Simulation', 'powersystems/pssp/full-download/project/' . $om_pssp_default_value) . '</div>' ); } return $form; @@ -58,7 +59,8 @@ function om_pssp_project_details_callback($form, $form_state) $om_pssp_details = _om_pssp_information($om_pssp_default_value); $provider = user_load($om_pssp_details->uid); if ($om_pssp_details->uid > 0) { - $commands[] = ajax_command_html('#ajax_selected_om_pssp', l('Download Power System Simulation', 'powersystems/pssp/full-download/project/' . $om_pssp_default_value)); + $commands[] = ajax_command_html('#ajax_selected_om_pssp', l('Download Abstract', "powersystems/pssp/download/abstract-file/" . $om_pssp_default_value) + . '<br>' . l('Download Power System Simulation', 'powersystems/pssp/full-download/project/' . $om_pssp_default_value)); } //$om_pssp_details->uid > 0 else { $commands[] = ajax_command_html('#ajax_selected_om_pssp', ''); |