summaryrefslogtreecommitdiff
path: root/proposals_review_tab.inc
diff options
context:
space:
mode:
authorSaketh14992021-10-18 15:46:34 +0530
committerSaketh14992021-10-18 16:01:27 +0530
commit599fadcc804c30709569b02bb42aca7b55a83e60 (patch)
tree4b5b02ff2648fbc5086ee9847f20a6e2181afde9 /proposals_review_tab.inc
parent4648e0b828e47b0b0f533be0a332fbbdd0787ce1 (diff)
downloaddwsim_flowsheet-599fadcc804c30709569b02bb42aca7b55a83e60.tar.gz
dwsim_flowsheet-599fadcc804c30709569b02bb42aca7b55a83e60.tar.bz2
dwsim_flowsheet-599fadcc804c30709569b02bb42aca7b55a83e60.zip
Adding a option to download proposals in csv format
Diffstat (limited to 'proposals_review_tab.inc')
-rw-r--r--proposals_review_tab.inc30
1 files changed, 8 insertions, 22 deletions
diff --git a/proposals_review_tab.inc b/proposals_review_tab.inc
index 4294607..bccb440 100644
--- a/proposals_review_tab.inc
+++ b/proposals_review_tab.inc
@@ -100,8 +100,9 @@ function dwsim_flowsheet_completed_tab_form($form, $form_state)
{
$options_first = _flowsheet_details_year_wise();
$selected = isset($form_state['values']['howmany_select']) ? $form_state['values']['howmany_select'] : key($options_first);
+ $form = array();
$form['howmany_select'] = array(
- '#title' => t('Sorting projects according to year:'),
+ '#title' => t('Sorting projects according to year:'),
'#type' => 'select',
'#options' => _flowsheet_details_year_wise(),
/*'#options' => array(
@@ -144,12 +145,13 @@ function ajax_example_autocheckboxes_callback($form, $form_state)
);
}
+
function _flowsheet_details_year_wise()
{
$flowsheet_years = array(
'0' => 'Please select...'
);
- $result = db_query("SELECT from_unixtime(actual_completion_date, '%Y ') from dwsim_flowsheet_proposal WHERE approval_status = 3");
+ $result = db_query("SELECT from_unixtime(actual_completion_date, '%Y ') as Year from dwsim_flowsheet_proposal WHERE approval_status = 3");
/*$query = db_select('dwsim_flowsheet_proposal');
$query->fields('dwsim_flowsheet_proposal');
@@ -159,7 +161,7 @@ function _flowsheet_details_year_wise()
//$year_wise_list = $query->execute();
while ($year_wise_list_data = $result->fetchObject())
{
- $flowsheet_years[$year_wise_list_data->id] = $year_wise_list_data->actual_completion_date;
+ $flowsheet_years[$year_wise_list_data->Year] = $year_wise_list_data->Year;
}
return $flowsheet_years;
}
@@ -168,22 +170,20 @@ function _flowsheet_details_year_wise()
function _flowsheet_details($flowsheet_proposal_id)
{
$output = "";
- $output = "Click <a href='/flowsheeting-project/download-proposals'>here</a> to download the Proposals of the participants <br>";
+ //$output = "Click <a href='/flowsheeting-project/download-proposals'>here</a> to download the Proposals of the participants <br>";
$result = db_query("SELECT * from {dwsim_flowsheet_proposal} WHERE approval_status = 3 and from_unixtime(actual_completion_date, '%Y') = :year",
array(
':year' => $flowsheet_proposal_id)
);
if ($result->rowCount() == 0)
- {
- // $output = "Click <a href='/flowsheeting-project/download-proposals/'>here</a> to download the Proposals of the participants";
+ {
$output .= "Work has been completed for the following flow sheets.";
}
else
{
-
- $output .= "Work has been completed for the following flow sheets: " . $result->rowCount() ;
+ $output .= "Work has been completed for the following flow sheets: " . $result->rowCount() . "<hr>";
$preference_rows = array();
$i = 1;
while ($row = $result->fetchObject())
@@ -211,18 +211,4 @@ function _flowsheet_details($flowsheet_proposal_id)
));
}
return $output;
-}
-
-
-///////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////
-
-//Proposal tab for Downloading proposals
-
-function dwsim_flowsheet_download_proposals_tab()
-{
- $output= "";
-
-
} \ No newline at end of file