@@ -40,7 +40,8 @@ public function thematic($action) {
4040
4141 $ check = Security::check_token ('request ' );
4242 $ thematic_id = isset ($ _REQUEST ['thematic_id ' ]) ? intval ($ _REQUEST ['thematic_id ' ]) : null ;
43-
43+ $ displayHeader = (!empty ($ _REQUEST ['display ' ]) && $ _REQUEST ['display ' ] === 'no_header ' ) ? false : true ;
44+
4445 if ($ check ) {
4546 switch ($ action ) {
4647 case 'thematic_add ' :
@@ -248,9 +249,11 @@ public function thematic($action) {
248249 $ data ['default_thematic_plan_title ' ] = $ thematic ->get_default_thematic_plan_title ();
249250
250251 $ data ['action ' ] = $ action ;
252+ $ layoutName = $ displayHeader ? 'layout ' : 'layout_no_header ' ;
253+
251254 // render to the view
252255 $ this ->view ->set_data ($ data );
253- $ this ->view ->set_layout (' layout ' );
256+ $ this ->view ->set_layout ($ layoutName );
254257 $ this ->view ->set_template ('thematic ' );
255258 $ this ->view ->render ();
256259 }
@@ -357,15 +360,17 @@ public function thematic_advance($action) {
357360 $ thematic = new Thematic ();
358361 $ attendance = new Attendance ();
359362 $ data = array ();
360-
363+
364+ $ displayHeader = (!empty ($ _REQUEST ['display ' ]) && $ _REQUEST ['display ' ] === 'no_header ' ) ? false : true ;
365+
361366 // get data for attendance input select
362367 $ attendance_list = $ attendance ->get_attendances_list ();
363368 $ attendance_select = array ();
364369 $ attendance_select [0 ] = get_lang ('SelectAnAttendance ' );
365370 foreach ($ attendance_list as $ attendance_id => $ attendance_data ) {
366371 $ attendance_select [$ attendance_id ] = $ attendance_data ['name ' ];
367372 }
368-
373+
369374 $ thematic_id = intval ($ _REQUEST ['thematic_id ' ]);
370375 $ thematic_advance_id = intval ($ _REQUEST ['thematic_advance_id ' ]);
371376
@@ -459,10 +464,11 @@ public function thematic_advance($action) {
459464 $ data ['attendance_select ' ] = $ attendance_select ;
460465 $ data ['thematic_advance_data ' ] = $ thematic_advance_data ;
461466 $ data ['calendar_select ' ] = $ calendar_select ;
462-
467+ $ layoutName = $ displayHeader ? 'layout ' : 'layout_no_header ' ;
468+
463469 // render to the view
464470 $ this ->view ->set_data ($ data );
465- $ this ->view ->set_layout (' layout ' );
471+ $ this ->view ->set_layout ($ layoutName );
466472 $ this ->view ->set_template ('thematic_advance ' );
467473 $ this ->view ->render ();
468474 }
0 commit comments