summaryrefslogtreecommitdiff
path: root/custom_model.module
diff options
context:
space:
mode:
authorSashi202020-02-03 14:50:20 +0530
committerSashi202020-02-03 14:50:20 +0530
commitea8664a466b084a09e286aa4200c447b458e6510 (patch)
tree97cef0c9e7fcfa6dac67639b4598483b7270985d /custom_model.module
parent1eff5287eb5edfb72c61049879ed99ffa925119b (diff)
downloaddwsim_custom_model-ea8664a466b084a09e286aa4200c447b458e6510.tar.gz
dwsim_custom_model-ea8664a466b084a09e286aa4200c447b458e6510.tar.bz2
dwsim_custom_model-ea8664a466b084a09e286aa4200c447b458e6510.zip
Add form to submit ideas for custom model
Diffstat (limited to 'custom_model.module')
-rwxr-xr-xcustom_model.module60
1 files changed, 60 insertions, 0 deletions
diff --git a/custom_model.module b/custom_model.module
index 5530670..99291ff 100755
--- a/custom_model.module
+++ b/custom_model.module
@@ -25,6 +25,19 @@ function custom_model_menu()
'type' => MENU_NORMAL_ITEM,
'file' => 'proposal.inc'
);
+ $items['custom-model/idea-proposal'] = array(
+ 'title' => 'Custom Model Idea Proposal Form',
+ 'description' => 'Custom Model Idea Proposal Form',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array(
+ 'custom_model_idea_proposal_form'
+ ),
+ 'access arguments' => array(
+ 'custom model create idea proposal'
+ ),
+ 'type' => MENU_NORMAL_ITEM,
+ 'file' => 'idea_proposal.inc'
+ );
$items['custom-model/manage-proposal'] = array(
'title' => 'Manage Custom Model Proposals',
'description' => 'Manage Custom Model Proposals',
@@ -59,6 +72,18 @@ function custom_model_menu()
'weight' => 4,
'file' => 'manage_proposal.inc'
);
+ $items['custom-model/manage-proposal/idea-proposals'] = array(
+ 'title' => 'Idea Proposals',
+ 'description' => 'Idea Proposals',
+ 'page callback' => 'custom_model_idea_proposal_all',
+ 'access callback' => 'user_access',
+ 'access arguments' => array(
+ 'custom model manage proposal'
+ ),
+ 'type' => MENU_LOCAL_TASK,
+ 'weight' => 5,
+ 'file' => 'manage_proposal.inc'
+ );
$items['custom-model/manage-proposal/approve'] = array(
'title' => 'Approve Proposal',
'description' => 'Approve Proposal',
@@ -111,6 +136,19 @@ function custom_model_menu()
'type' => MENU_CALLBACK,
'file' => 'manage_proposal.inc'
);
+ $items['custom-model/manage-proposal/view-ideas'] = array(
+ 'title' => 'View the Idea Proposal',
+ 'description' => 'View the Idea Proposal',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array(
+ 'custom_model_view_idea_proposal_form'
+ ),
+ 'access arguments' => array(
+ 'custom model view idea proposal'
+ ),
+ 'type' => MENU_CALLBACK,
+ 'file' => 'manage_proposal.inc'
+ );
$items['custom-model/show-proposal'] = array(
'title' => 'custom model Solution Proposal',
'page callback' => 'drupal_get_form',
@@ -313,6 +351,16 @@ function custom_model_menu()
'type' => MENU_CALLBACK,
'file' => 'download.inc'
);
+ $items['custom-model/download/idea-reference-file'] = array(
+ 'title' => 'Download the idea reference file',
+ 'description' => 'Download the idea reference file',
+ 'page callback' => 'custom_model_download_idea_reference_file',
+ 'access arguments' => array(
+ 'download code'
+ ),
+ 'type' => MENU_CALLBACK,
+ 'file' => 'download.inc'
+ );
$items['custom-model/download/project-file'] = array(
'title' => 'Download Project file',
'description' => 'Download project file',
@@ -436,6 +484,10 @@ function custom_model_permission()
'title' => t('custom model create proposal'),
'restrict access' => TRUE
),
+ 'custom model create idea proposal' => array(
+ 'title' => t('custom model create idea proposal'),
+ 'restrict access' => TRUE
+ ),
'custom model manage proposal' => array(
'title' => t('custom model manage proposal'),
'restrict access' => TRUE
@@ -448,6 +500,10 @@ function custom_model_permission()
'title' => t('custom model approve proposal'),
'restrict access' => TRUE
),
+ 'custom model view idea proposal' => array(
+ 'title' => t('custom model view idea proposal'),
+ 'restrict access' => TRUE
+ ),
'custom model propose solution' => array(
'title' => t('custom model propose solution'),
'restrict access' => TRUE
@@ -590,6 +646,10 @@ function custom_model_path()
{
return $_SERVER['DOCUMENT_ROOT'] . base_path() . 'dwsim_uploads/custom_model_uploads/';
}
+function custom_model_ideas_files_path()
+{
+ return $_SERVER['DOCUMENT_ROOT'] . base_path() . 'dwsim_uploads/custom_model_uploads/ideas_files/';
+}
function _cm_list_of_departments()
{
$department = array();