Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
Merge pull request #413 from fierarufmihai/master
Browse files Browse the repository at this point in the history
Former Projects functionality added
  • Loading branch information
jukowski committed Aug 12, 2013
2 parents 713ebcf + 1a8024c commit 80f9b89
Show file tree
Hide file tree
Showing 6 changed files with 656 additions and 51 deletions.
16 changes: 15 additions & 1 deletion sites/all/modules/kwarc/kwarc.css
Expand Up @@ -17,7 +17,7 @@ font-size: 2.0em;

.project-desc-desc-full{
margin-top: 30px;
}
}i

.project-desc-small-full{
display:none;
Expand Down Expand Up @@ -78,4 +78,18 @@ font-size: 2.0em;

.project-desc-date-teaser{
display:none;
}


.item-list-project-view{
/*display:none;*/
}

.project-view-list-class{

}


.title-views-proj{

}
47 changes: 46 additions & 1 deletion sites/all/modules/project_generation/project_generation.module
Expand Up @@ -113,6 +113,30 @@ function project_generation_node_presave($node){




// Notify people of their group membership - only first responsibles


foreach($node->field_people_list['und'] as $user){

$account = user_load($user['uid']);
$to = $account->mail;

$email_from = "admin@test.kwarc.info";

$params['name'] = $account->field_full_name["und"]['0']['value'];
$params['project'] = $node->title;

$sent = drupal_mail("project_generation", "key", $to, language_default(), $params, $email_from, TRUE);


}






}


Expand Down Expand Up @@ -194,12 +218,33 @@ function project_generation_node_view($node, $view_mode, $langcode) {



function project_generation_mail($key, &$message, $params){
$language = $message["language"];
switch($key){

case "key":
$message["subject"] = t('KWARC Website - Projects');
$message['body'][] =
'Dear '.$params["name"].',

You have been added as an administrator in the new KWARC website for the following KWARC project:

- '. $params['project']. '

//margin-top: 30px

You can now go to http://test.kwarc.info/projects, find your project and edit/add the respective pages.


KWARC Admin
'


;
break;

}
}




Expand Down
Expand Up @@ -136,10 +136,9 @@ function project_generation_feature_field_default_fields() {
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'og_ui',
'label' => 'hidden',
'settings' => array(),
'type' => 'og_list_default',
'type' => 'hidden',
'weight' => '1',
),
'teaser' => array(
Expand Down Expand Up @@ -703,7 +702,7 @@ function project_generation_feature_field_default_fields() {
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 11,
'weight' => '9',
),
'teaser' => array(
'label' => 'above',
Expand Down Expand Up @@ -850,7 +849,7 @@ function project_generation_feature_field_default_fields() {
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 2,
'weight' => '2',
),
'teaser' => array(
'label' => 'above',
Expand Down Expand Up @@ -930,7 +929,7 @@ function project_generation_feature_field_default_fields() {
'multiple_to' => '',
),
'type' => 'date_default',
'weight' => 9,
'weight' => '8',
),
'teaser' => array(
'label' => 'above',
Expand Down Expand Up @@ -960,7 +959,7 @@ function project_generation_feature_field_default_fields() {
'input_format_custom' => '',
'label_position' => 'above',
'text_parts' => array(),
'year_range' => '2000:2030',
'year_range' => '1990:2030',
),
'type' => 'date_select',
'weight' => '10',
Expand Down Expand Up @@ -1006,10 +1005,9 @@ function project_generation_feature_field_default_fields() {
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 10,
'type' => 'hidden',
'weight' => '10',
),
'teaser' => array(
'label' => 'hidden',
Expand All @@ -1023,7 +1021,7 @@ function project_generation_feature_field_default_fields() {
),
'entity_type' => 'node',
'field_name' => 'field_project_small_description',
'label' => 'Project Small Description',
'label' => 'One-line project description',
'required' => 0,
'settings' => array(
'display_summary' => 0,
Expand Down Expand Up @@ -1092,7 +1090,7 @@ function project_generation_feature_field_default_fields() {
'multiple_to' => '',
),
'type' => 'date_default',
'weight' => 8,
'weight' => '7',
),
'teaser' => array(
'label' => 'above',
Expand All @@ -1106,7 +1104,7 @@ function project_generation_feature_field_default_fields() {
'label' => 'Project Start Date',
'required' => 0,
'settings' => array(
'default_value' => 'blank',
'default_value' => 'now',
'default_value2' => 'same',
'default_value_code' => '',
'default_value_code2' => '',
Expand All @@ -1122,7 +1120,7 @@ function project_generation_feature_field_default_fields() {
'input_format_custom' => '',
'label_position' => 'above',
'text_parts' => array(),
'year_range' => '2000:2030',
'year_range' => '1990:2030',
),
'type' => 'date_select',
'weight' => '9',
Expand Down Expand Up @@ -1178,7 +1176,7 @@ function project_generation_feature_field_default_fields() {
'module' => 'taxonomy',
'settings' => array(),
'type' => 'taxonomy_term_reference_link',
'weight' => 6,
'weight' => '5',
),
'teaser' => array(
'label' => 'above',
Expand Down Expand Up @@ -1252,7 +1250,7 @@ function project_generation_feature_field_default_fields() {
'module' => 'taxonomy',
'settings' => array(),
'type' => 'taxonomy_term_reference_link',
'weight' => 5,
'weight' => '4',
),
'teaser' => array(
'label' => 'above',
Expand Down Expand Up @@ -1326,7 +1324,7 @@ function project_generation_feature_field_default_fields() {
'module' => 'taxonomy',
'settings' => array(),
'type' => 'taxonomy_term_reference_link',
'weight' => 7,
'weight' => '6',
),
'teaser' => array(
'label' => 'above',
Expand Down Expand Up @@ -1391,7 +1389,7 @@ function project_generation_feature_field_default_fields() {
'thousand_separator' => ' ',
),
'type' => 'number_integer',
'weight' => 4,
'weight' => '3',
),
'teaser' => array(
'label' => 'above',
Expand Down Expand Up @@ -1759,10 +1757,10 @@ function project_generation_feature_field_default_fields() {
t('Group Project ID');
t('Groups audience');
t('Image');
t('One-line project description');
t('People List');
t('Project Description');
t('Project End Date');
t('Project Small Description');
t('Project Start Date');
t('Text Near Image');
t('This will be shown in the teasers');
Expand Down
Expand Up @@ -10,11 +10,11 @@
function project_generation_feature_menu_default_menu_links() {
$menu_links = array();

// Exported menu link: main-menu:project-list
$menu_links['main-menu:project-list'] = array(
// Exported menu link: main-menu:projects
$menu_links['main-menu:projects'] = array(
'menu_name' => 'main-menu',
'link_path' => 'project-list',
'router_path' => 'project-list',
'link_path' => 'projects',
'router_path' => 'projects',
'link_title' => 'Projects',
'options' => array(
'attributes' => array(
Expand All @@ -26,7 +26,7 @@ function project_generation_feature_menu_default_menu_links() {
'external' => '0',
'has_children' => '0',
'expanded' => '0',
'weight' => '0',
'weight' => '-47',
);
// Translatables
// Included for use with string extractors like potx.
Expand Down
Expand Up @@ -7,6 +7,7 @@ dependencies[] = ctools
dependencies[] = date
dependencies[] = drutexml
dependencies[] = entityreference
dependencies[] = fe_block
dependencies[] = features
dependencies[] = hidden_field
dependencies[] = image
Expand All @@ -22,6 +23,8 @@ dependencies[] = user_reference
dependencies[] = views
dependencies[] = wysiwyg
features[ctools][] = views:views_default:3.0
features[fe_block_boxes][] = projects_old_new
features[fe_block_settings][] = block-projects_old_new
features[features_api][] = api:1
features[field][] = node-page-body
features[field][] = node-page-og_group_ref
Expand Down Expand Up @@ -50,6 +53,7 @@ features[filter][] = full_html
features[filter][] = latex
features[filter][] = plain_text
features[menu_custom][] = main-menu
features[menu_links][] = main-menu:projects
features[node][] = page
features[node][] = pageimagetextrightdown
features[node][] = project_creation_form
Expand Down Expand Up @@ -166,6 +170,7 @@ features[taxonomy][] = project_funding_agency
features[user_permission][] = administer blocks
features[user_role][] = KWARC Member
features[user_role][] = administrator
features[views_view][] = former_projects
features[views_view][] = project_groups
features[views_view][] = projects_list
features[wysiwyg][] = filtered_html
Expand Down

0 comments on commit 80f9b89

Please sign in to comment.