Add configuration settings to set custom colors to agenda events - refs BT#12892

pull/2487/head
Angel Fernando Quiroz Campos 8 years ago
parent 9ca3cbe7d1
commit f72bdf3a92
  1. 22
      main/inc/lib/agenda.lib.php
  2. 13
      main/install/configuration.dist.php

@ -103,14 +103,22 @@ class Agenda
$this->setIsAllowedToEdit($isAllowToEdit);
$this->events = [];
$platformColor = api_get_configuration_value('agenda_platform_color') ?: 'red';
$courseColor = api_get_configuration_value('agenda_course_color') ?: '#458B00';
$groupColor = api_get_configuration_value('agenda_group_color') ?: '#A0522D';
$sessionColor = api_get_configuration_value('agenda_session_color') ?: '#00496D';
$otherSessionColor = api_get_configuration_value('agenda_other_session_color') ?: '#999';
$personalColor = api_get_configuration_value('agenda_personal_color') ?: 'steel blue';
$studentPublicationColor = api_get_configuration_value('agenda_student_publication_color') ?: '#FF8C00';
// Event colors
$this->event_platform_color = 'red'; //red
$this->event_course_color = '#458B00'; //green
$this->event_group_color = '#A0522D'; //siena
$this->event_session_color = '#00496D'; // kind of green
$this->eventOtherSessionColor = '#999';
$this->event_personal_color = 'steel blue'; //steel blue
$this->eventStudentPublicationColor = '#FF8C00'; //DarkOrange
$this->event_platform_color = $platformColor; //red
$this->event_course_color = $courseColor; //green
$this->event_group_color = $groupColor; //siena
$this->event_session_color = $sessionColor; // kind of green
$this->eventOtherSessionColor = $otherSessionColor;
$this->event_personal_color = $personalColor; //steel blue
$this->eventStudentPublicationColor = $studentPublicationColor; //DarkOrange
}
/**

@ -361,12 +361,25 @@ $_configuration['tracking_columns'] = [
*/
// Hide session link of course_block on index/userportal
//$_configuration['remove_session_url']= false ;
//
//
// AGENDA CONFIGURATION SETTINGS
// Shows a legend in the agenda tool
/*
$_configuration['agenda_legend'] = [
'red' => 'red caption',
'#f0f' => 'another caption'
];*/
// Set customs colors to agenda events
//$_configuration['agenda_platform_color'] = 'red';
//$_configuration['agenda_course_color'] = '#458B00';
//$_configuration['agenda_group_color'] = '#A0522D';
//$_configuration['agenda_session_color'] = '#00496D';
//$_configuration['agenda_other_session_color'] = '#999';
//$_configuration['agenda_personal_color'] = 'steel blue';
//$_configuration['agenda_student_publication_color'] = '#FF8C00';
//
//
// Save some tool titles with HTML editor
// $_configuration['save_titles_as_html'] = false;
// Show the full toolbar set to all CKEditor

Loading…
Cancel
Save