summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSashi202019-09-11 15:12:24 +0530
committerSashi202019-09-11 15:12:24 +0530
commit6aab8b83745440e23c92b13aa0e3d02e88952d6d (patch)
treece4147db860504f50f59214c91a271a2b8c1fa29
parenta7dbb1721bb47ba21f9cdd5fe2962516a45caa42 (diff)
downloadom_pssp-6aab8b83745440e23c92b13aa0e3d02e88952d6d.tar.gz
om_pssp-6aab8b83745440e23c92b13aa0e3d02e88952d6d.tar.bz2
om_pssp-6aab8b83745440e23c92b13aa0e3d02e88952d6d.zip
Modify code to display abstract file in status interface
-rwxr-xr-xmanage_proposal.inc19
1 files changed, 19 insertions, 0 deletions
diff --git a/manage_proposal.inc b/manage_proposal.inc
index 231ead3..952c787 100755
--- a/manage_proposal.inc
+++ b/manage_proposal.inc
@@ -500,6 +500,25 @@ function om_pssp_proposal_status_form($form, &$form_state)
'#markup' => $proposal_data->project_title,
'#title' => t('Title of the Power systems simulation Project')
);
+ if (($proposal_data->samplefilepath != "") && ($proposal_data->samplefilepath != 'NULL'))
+ {
+ $str = substr($proposal_data->samplefilepath,strrpos($proposal_data->samplefilepath, '/'));
+ $resource_file =ltrim($str, '/');
+
+ $form['samplefilepath'] = array(
+ '#type' => 'item',
+ '#title' => t('Abstract file '),
+ '#markup' => l($resource_file, 'powersystems/pssp/download/resource-file/' . $proposal_id) . ""
+ );
+ } //$proposal_data->user_defined_compound_filepath != ""
+ else
+ {
+ $form['samplefilepath'] = array(
+ '#type' => 'item',
+ '#title' => t('Abstract file '),
+ '#markup' => "Not uploaded<br><br>"
+ );
+ }
/************************** reference link filter *******************/
$url = '~(?:(https?)://([^\s<]+)|(www\.[^\s<]+?\.[^\s<]+))(?<![\.,:])~i';
$reference = preg_replace($url, '<a href="$0" target="_blank" title="$0">$0</a>', $proposal_data->reference);