diff --git a/swad_changelog.h b/swad_changelog.h index 1d8439e5c..048ce110a 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -134,13 +134,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.159.3 (2016-03-21)" +#define Log_PLATFORM_VERSION "SWAD 15.159.4 (2016-03-21)" #define CSS_FILE "swad15.157.css" #define JS_FILE "swad15.131.3.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* + Version 15.159.4: Mar 21, 2016 Icon to print stats on degrees integrated in frame. (196426 lines) Version 15.159.3: Mar 21, 2016 Icon to add new announcement integrated in frame. Button to add new announcement. (196427 lines) Version 15.159.2: Mar 21, 2016 Button to add new notice. (196410 lines) diff --git a/swad_photo.c b/swad_photo.c index c2638d698..97d46f6bb 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -105,7 +105,7 @@ static Pho_HowComputePhotoSize_t Pho_GetHowComputePhotoSizeFromForm (void); static void Pho_PutSelectorForHowOrderDegrees (void); static Pho_HowOrderDegrees_t Pho_GetHowOrderDegreesFromForm (void); -static void Pho_PutLinkToPrintViewOfDegreeStats (void); +static void Pho_PutIconToPrintDegreeStats (void); static void Pho_PutLinkToPrintViewOfDegreeStatsParams (void); static void Pho_PutLinkToCalculateDegreeStats (void); @@ -1526,9 +1526,6 @@ void Pho_ShowOrPrintPhotoDegree (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) fprintf (Gbl.F.Out,""); - /***** Link to print view *****/ - Pho_PutLinkToPrintViewOfDegreeStats (); - /***** Link to computation of average photos *****/ Pho_PutLinkToCalculateDegreeStats (); } @@ -1756,18 +1753,15 @@ static Pho_HowOrderDegrees_t Pho_GetHowOrderDegreesFromForm (void) } /*****************************************************************************/ -/*************** Put a link to print view the stats of degrees ***************/ +/*************** Put icon to print view the stats of degrees ***************/ /*****************************************************************************/ -static void Pho_PutLinkToPrintViewOfDegreeStats (void) +static void Pho_PutIconToPrintDegreeStats (void) { extern const char *Txt_Print; - fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActPrnPhoDeg,Pho_PutLinkToPrintViewOfDegreeStatsParams, - "print64x64.png", - Txt_Print,Txt_Print); - fprintf (Gbl.F.Out,"
"); + "print64x64.png",Txt_Print,NULL); } static void Pho_PutLinkToPrintViewOfDegreeStatsParams (void) @@ -1921,11 +1915,13 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin Pho_BuildQueryOfDegrees (Query); NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get degrees"); + /***** Start frame *****/ + Lay_StartRoundFrame (NULL,Txt_Degrees, + SeeOrPrint == Pho_DEGREES_SEE ? Pho_PutIconToPrintDegreeStats : + NULL); + if (NumRows) // Degrees with students found { - /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_Degrees,NULL); - /***** Form to select type of list used to display degree photos *****/ if (SeeOrPrint == Pho_DEGREES_SEE) Usr_ShowFormsToSelectUsrListType (ActSeePhoDeg); @@ -1973,13 +1969,13 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - - /***** End frame *****/ - Lay_EndRoundFrame (); } else // No degrees with students found Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_STUDENT]); + /***** End frame *****/ + Lay_EndRoundFrame (); + /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); @@ -2011,16 +2007,17 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) Pho_BuildQueryOfDegrees (Query); NumRows = DB_QuerySELECT (Query,&mysql_res,"can not get degrees"); + /***** Start frame *****/ + Lay_StartRoundFrame (NULL,Txt_Degrees, + SeeOrPrint == Pho_DEGREES_SEE ? Pho_PutIconToPrintDegreeStats : + NULL); + if (NumRows) // Degrees with students found { /***** Class photo start *****/ if (SeeOrPrint == Pho_DEGREES_SEE) - { - Lay_StartRoundFrame (NULL,Txt_Degrees,NULL); - /***** Form to select type of list used to display degree photos *****/ Usr_ShowFormsToSelectUsrListType (ActSeePhoDeg); - } /***** Write heading *****/ fprintf (Gbl.F.Out,""); - if (SeeOrPrint == Pho_DEGREES_SEE) - Lay_EndRoundFrame (); } else // No degrees with students found! Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_STUDENT]); + /***** End frame *****/ + Lay_EndRoundFrame (); + /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); }