From 8a12e27048b8b5be2240e4cfc5974655ded38f29 Mon Sep 17 00:00:00 2001 From: acanas Date: Fri, 5 May 2023 17:15:58 +0200 Subject: [PATCH] Version 22.107.1: May 05, 2023 Changes in list of users to follow. --- swad_MFU.c | 12 +++++------- swad_changelog.h | 3 ++- swad_follow.c | 32 +++++++++++--------------------- swad_follow.h | 4 ++-- swad_layout.c | 8 +++++++- swad_profile.c | 2 +- 6 files changed, 28 insertions(+), 33 deletions(-) diff --git a/swad_MFU.c b/swad_MFU.c index 8c1065c8..ae540cf7 100644 --- a/swad_MFU.c +++ b/swad_MFU.c @@ -263,7 +263,7 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions) The_GetSuffix ()); HTM_LEGEND (Txt_Frequent_ACTIONS); - /***** Begin list of frequently used actions *****/ + /***** List of frequently used actions *****/ HTM_UL_Begin (NULL); for (NumAct = 0; @@ -291,14 +291,12 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions) } } - /***** End list of frequently used actions *****/ HTM_UL_End (); - HTM_DIV_Begin ("class=\"CM\""); - Lay_PutContextualLinkOnlyIcon (ActMFUAct,NULL, - NULL,NULL, - "ellipsis-h.svg",Ico_BLACK); - HTM_DIV_End (); + /***** Link to view more frequently used actions *****/ + Lay_PutContextualLinkOnlyIcon (ActMFUAct,NULL, + NULL,NULL, + "ellipsis-h.svg",Ico_BLACK); /***** End fieldset *****/ HTM_FIELDSET_End (); diff --git a/swad_changelog.h b/swad_changelog.h index 1306a2f7..8281d581 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen. */ -#define Log_PLATFORM_VERSION "SWAD 22.107 (2023-05-05)" +#define Log_PLATFORM_VERSION "SWAD 22.107.1 (2023-05-05)" #define CSS_FILE "swad22.107.css" #define JS_FILE "swad22.49.js" /* + Version 22.107.1: May 05, 2023 Changes in list of users to follow. (338105 lines) Version 22.107: May 05, 2023 Changes in layout institutional links and connected users. (338108 lines) Version 22.106: May 05, 2023 Changes in layout of frequent actions. (338126 lines) Version 22.105: May 05, 2023 Changes in CSS. (338102 lines) diff --git a/swad_follow.c b/swad_follow.c index a50104b7..58c650b8 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -113,7 +113,7 @@ void Fol_PutLinkWhoToFollow (void) #define Fol_MAX_USRS_TO_FOLLOW_MAIN_ZONE (Fol_NUM_COLUMNS_FOLLOW * 3) -void Fol_SuggestUsrsToFollowMainZone (void) +void Fol_SuggestUsrsToFollowOnMainZone (void) { extern const char *Hlp_START_Profiles_who_to_follow; extern const char *Txt_Who_to_follow; @@ -185,9 +185,8 @@ void Fol_SuggestUsrsToFollowMainZone (void) #define Fol_MAX_USRS_TO_FOLLOW_RIGHT_COLUMN 3 -void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void) +void Fol_SuggestUsrsToFollowOnRightColumn (void) { - extern const char *Txt_Who_to_follow; extern const char *Txt_No_user_to_whom_you_can_follow_Try_again_later; MYSQL_RES *mysql_res; MYSQL_ROW row; @@ -200,23 +199,12 @@ void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void) Fol_SUGGEST_ONLY_USERS_WITH_PHOTO, &mysql_res))) { - /***** Begin container *****/ - HTM_DIV_Begin ("class=\"CON CON_%s\"", - The_GetSuffix ()); - - /***** Title with link to suggest more users to follow *****/ - Frm_BeginForm (ActSeeSocPrf); - HTM_BUTTON_Submit_Begin (Txt_Who_to_follow,"class=\"BT_LINK\""); - HTM_Txt (Txt_Who_to_follow); - HTM_BUTTON_End (); - Frm_EndForm (); + /***** Initialize structure with user's data *****/ + Usr_UsrDataConstructor (&UsrDat); /***** Begin table *****/ HTM_TABLE_Begin (NULL); - /***** Initialize structure with user's data *****/ - Usr_UsrDataConstructor (&UsrDat); - /***** List users *****/ for (NumUsr = 0; NumUsr < NumUsrs; @@ -235,14 +223,16 @@ void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void) Fol_WriteRowUsrToFollowOnRightColumn (&UsrDat); } - /***** Free memory used for user's data *****/ - Usr_UsrDataDestructor (&UsrDat); - /***** End table *****/ HTM_TABLE_End (); - /***** End container *****/ - HTM_DIV_End (); + /***** Free memory used for user's data *****/ + Usr_UsrDataDestructor (&UsrDat); + + /***** Link to suggest more users to follow *****/ + Lay_PutContextualLinkOnlyIcon (ActSeeSocPrf,NULL, + NULL,NULL, + "ellipsis-h.svg",Ico_BLACK); } /***** Free structure that stores the query result *****/ diff --git a/swad_follow.h b/swad_follow.h index ec591eaf..bce1d9ec 100644 --- a/swad_follow.h +++ b/swad_follow.h @@ -44,8 +44,8 @@ typedef enum /*****************************************************************************/ void Fol_PutLinkWhoToFollow (void); -void Fol_SuggestUsrsToFollowMainZone (void); -void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void); +void Fol_SuggestUsrsToFollowOnMainZone (void); +void Fol_SuggestUsrsToFollowOnRightColumn (void); void Fol_FlushCacheFollow (void); void Fol_GetNumFollow (long UsrCod, diff --git a/swad_layout.c b/swad_layout.c index 0b969ae4..042d2f74 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1132,6 +1132,7 @@ static void Lay_ShowRightColumn (void) { extern const char *Txt_Sessions; extern const char *Txt_Connected_PLURAL; + extern const char *Txt_Who_to_follow; extern const char *Txt_If_you_have_an_Android_device_try_SWADroid; /***** Banners *****/ @@ -1160,8 +1161,13 @@ static void Lay_ShowRightColumn (void) HTM_FIELDSET_End (); } else if (Gbl.Usrs.Me.Logged) // I am logged + { /***** Suggest one user to follow *****/ - Fol_SuggestUsrsToFollowMainZoneOnRightColumn (); + HTM_FIELDSET_Begin ("class=\"CON CON_%s\"",The_GetSuffix ()); + HTM_LEGEND (Txt_Who_to_follow); + Fol_SuggestUsrsToFollowOnRightColumn (); + HTM_FIELDSET_End (); + } if (!Gbl.Usrs.Me.Logged) { diff --git a/swad_profile.c b/swad_profile.c index 62aa37b1..72263a76 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -119,7 +119,7 @@ static void Prf_ShowUsrInRanking (struct Usr_Data *UsrDat,unsigned Rank, void Prf_SeeSocialProfiles (void) { if (Gbl.Usrs.Me.Logged) - Fol_SuggestUsrsToFollowMainZone (); + Fol_SuggestUsrsToFollowOnMainZone (); else Prf_ReqUserProfile (); }