Version 23.52.5: Dec 13, 2023 Responsive design in follow.

This commit is contained in:
acanas 2023-12-13 18:35:00 +01:00
parent 1b3d7edc3a
commit 4609ebaabf
4 changed files with 80 additions and 88 deletions

View File

@ -5145,32 +5145,38 @@ button.PAG_DARK:hover, .PAG_CUR_DARK {background-color:#707070;}
font-size:30pt;
font-weight:bold;
}
.FOLLOW_USR
{
display:inline-block;
}
.FOLLOW_PHOTO
{
display:inline-block;
box-sizing:border-box;
width:72px;
height:90px;
text-align:left;
vertical-align:bottom;
vertical-align:middle;
}
.FOLLOW_USR
.FOLLOW_TXT
{
display:inline-block;
box-sizing:border-box;
width:100px;
height:90px;
height:80px;
text-align:left;
vertical-align:middle;
}
.FOLLOW_USR_NAME
.FOLLOW_TXT_NAME
{
box-sizing:border-box;
max-width:100px;
max-width:90px;
text-align:left;
vertical-align:bottom;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.FOLLOW_USR_ICO
.FOLLOW_TXT_ICO
{
text-align:left;
padding:4px;

View File

@ -633,10 +633,11 @@ Me sale este error, no s
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
*/
#define Log_PLATFORM_VERSION "SWAD 23.52.4 (2023-12-13)"
#define CSS_FILE "swad23.52.4.css"
#define Log_PLATFORM_VERSION "SWAD 23.52.5 (2023-12-13)"
#define CSS_FILE "swad23.52.5.css"
#define JS_FILE "swad23.52.js"
/*
Version 23.52.5: Dec 13, 2023 Responsive design in follow. (335814 lines)
Version 23.52.4: Dec 13, 2023 Responsive design in hierarchy configuration and connected users. (335821 lines)
Version 23.52.3: Dec 08, 2023 Responsive design in figures. (335825 lines)
Version 23.52.2: Dec 07, 2023 Responsive design in account. (335811 lines)

View File

@ -135,10 +135,10 @@ void Fol_SuggestUsrsToFollowOnMainZone (void)
Fol_SUGGEST_ANY_USER,
&mysql_res)))
{
/***** Begin box and table *****/
Box_BoxTableBegin ("560px",Txt_Who_to_follow,
Fol_PutIconsWhoToFollow,NULL,
Hlp_START_Profiles_who_to_follow,Box_NOT_CLOSABLE,2);
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_Who_to_follow,
Fol_PutIconsWhoToFollow,NULL,
Hlp_START_Profiles_who_to_follow,Box_NOT_CLOSABLE);
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&UsrDat);
@ -150,27 +150,20 @@ void Fol_SuggestUsrsToFollowOnMainZone (void)
{
/***** Get user *****/
row = mysql_fetch_row (mysql_res);
/* Get user's code (row[0]) */
UsrDat.UsrCod = Str_ConvertStrCodToLongCod (row[0]);
/***** Show user *****/
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == 0)
HTM_TR_Begin (NULL);
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,
Usr_DONT_GET_PREFS,
Usr_DONT_GET_ROLE_IN_CRS))
Fol_ShowFollowedOrFollower (&UsrDat);
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) ||
NumUsr == NumUsrs - 1)
HTM_TR_End ();
}
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat);
/***** End table and box *****/
Box_BoxTableEnd ();
/***** End box *****/
Box_BoxEnd ();
}
else
Ale_ShowAlert (Ale_INFO,Txt_No_user_to_whom_you_can_follow_Try_again_later);
@ -461,10 +454,10 @@ static void Fol_ListFollowingUsr (struct Usr_Data *UsrDat)
/***** Initialize structure with user's data *****/
Usr_UsrDataConstructor (&FollowingUsrDat);
/***** Begin box and table *****/
Box_BoxTableBegin ("560px",Txt_Following,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);
/***** Begin box *****/
Box_BoxBegin (NULL,Txt_Following,
NULL,NULL,
NULL,Box_NOT_CLOSABLE);
for (NumUsr = 0;
NumUsr < NumUsrs;
@ -474,19 +467,14 @@ static void Fol_ListFollowingUsr (struct Usr_Data *UsrDat)
FollowingUsrDat.UsrCod = DB_GetNextCode (mysql_res);
/***** Show user *****/
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == 0)
HTM_TR_Begin (NULL);
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&FollowingUsrDat,
Usr_DONT_GET_PREFS,
Usr_DONT_GET_ROLE_IN_CRS))
Fol_ShowFollowedOrFollower (&FollowingUsrDat);
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) ||
NumUsr == NumUsrs - 1)
HTM_TR_End ();
}
/***** End table and box *****/
Box_BoxTableEnd ();
/***** End box *****/
Box_BoxEnd ();
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&FollowingUsrDat);
@ -539,9 +527,9 @@ static void Fol_ListFollowersUsr (struct Usr_Data *UsrDat)
Usr_UsrDataConstructor (&FollowerUsrDat);
/***** Begin box and table *****/
Box_BoxTableBegin ("560px",Txt_Followers,
NULL,NULL,
NULL,Box_NOT_CLOSABLE,2);
Box_BoxBegin (NULL,Txt_Followers,
NULL,NULL,
NULL,Box_NOT_CLOSABLE);
for (NumUsr = 0;
NumUsr < NumUsrs;
@ -551,21 +539,14 @@ static void Fol_ListFollowersUsr (struct Usr_Data *UsrDat)
FollowerUsrDat.UsrCod = DB_GetNextCode (mysql_res);
/***** Show user *****/
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == 0)
HTM_TR_Begin (NULL);
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&FollowerUsrDat,
Usr_DONT_GET_PREFS,
Usr_DONT_GET_ROLE_IN_CRS))
Fol_ShowFollowedOrFollower (&FollowerUsrDat);
if ((NumUsr % Fol_NUM_COLUMNS_FOLLOW) == (Fol_NUM_COLUMNS_FOLLOW-1) ||
NumUsr == NumUsrs - 1)
HTM_TR_End ();
}
/***** End table and box *****/
Box_BoxTableEnd ();
/***** End box *****/
Box_BoxEnd ();
/***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&FollowerUsrDat);
@ -598,48 +579,52 @@ static void Fol_ShowFollowedOrFollower (struct Usr_Data *UsrDat)
};
bool Visible = Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat);
/***** Show user's photo *****/
HTM_TD_Begin ("class=\"FOLLOW_PHOTO\"");
if (Visible)
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_TD_End ();
HTM_DIV_Begin ("class=\"FOLLOW_USR\"");
/***** Show user's name and icon to follow/unfollow *****/
HTM_TD_Begin ("class=\"FOLLOW_USR\"");
/***** Show user's photo *****/
HTM_DIV_Begin ("class=\"FOLLOW_PHOTO\"");
if (Visible)
Pho_ShowUsrPhotoIfAllowed (UsrDat,
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
HTM_DIV_End ();
if (Visible)
{
/* Put form to go to public profile */
Frm_BeginForm (ActSeeOthPubPrf);
Usr_PutParUsrCodEncrypted (UsrDat->EnUsrCod);
HTM_DIV_Begin ("class=\"LT FOLLOW_USR_NAME DAT_%s\"", // Limited width
The_GetSuffix ());
HTM_BUTTON_Submit_Begin (Txt_Another_user_s_profile,
"class=\"BT_LINK LT\"");
Usr_WriteFirstNameBRSurnames (UsrDat);
HTM_BUTTON_End ();
HTM_DIV_End ();
Frm_EndForm ();
}
/***** Show user's name and icon to follow/unfollow *****/
HTM_DIV_Begin ("class=\"FOLLOW_TXT\"");
if (!Gbl.Usrs.Me.Logged || // Not logged
Usr_ItsMe (UsrDat->UsrCod) == Usr_ME) // It's me
/* Inactive icon to follow/unfollow */
Fol_PutInactiveIconToFollowUnfollow ();
else // It's not me
{
/* Put form to follow / unfollow */
if (Fol_DB_CheckUsrIsFollowerOf (Gbl.Usrs.Me.UsrDat.UsrCod,
UsrDat->UsrCod)) // I follow user
/* Form to unfollow */
Fol_PutIconToUnfollow (UsrDat->EnUsrCod);
else if (Visible) // I do not follow this user and I can follow
/* Form to follow */
Fol_PutIconToFollow (UsrDat->EnUsrCod);
}
if (Visible)
{
/* Put form to go to public profile */
Frm_BeginForm (ActSeeOthPubPrf);
Usr_PutParUsrCodEncrypted (UsrDat->EnUsrCod);
HTM_DIV_Begin ("class=\"LT FOLLOW_TXT_NAME DAT_%s\"", // Limited width
The_GetSuffix ());
HTM_BUTTON_Submit_Begin (Txt_Another_user_s_profile,
"class=\"BT_LINK LT\"");
Usr_WriteFirstNameBRSurnames (UsrDat);
HTM_BUTTON_End ();
HTM_DIV_End ();
Frm_EndForm ();
}
HTM_TD_End ();
if (!Gbl.Usrs.Me.Logged || // Not logged
Usr_ItsMe (UsrDat->UsrCod) == Usr_ME) // It's me
/* Inactive icon to follow/unfollow */
Fol_PutInactiveIconToFollowUnfollow ();
else // It's not me
{
/* Put form to follow / unfollow */
if (Fol_DB_CheckUsrIsFollowerOf (Gbl.Usrs.Me.UsrDat.UsrCod,
UsrDat->UsrCod)) // I follow user
/* Form to unfollow */
Fol_PutIconToUnfollow (UsrDat->EnUsrCod);
else if (Visible) // I do not follow this user and I can follow
/* Form to follow */
Fol_PutIconToFollow (UsrDat->EnUsrCod);
}
HTM_DIV_End ();
HTM_DIV_End ();
}
/*****************************************************************************/
@ -717,7 +702,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct Usr_Data *UsrDat)
static void Fol_PutInactiveIconToFollowUnfollow (void)
{
/***** Inactive icon to follow/unfollow *****/
HTM_DIV_Begin ("class=\"FOLLOW_USR_ICO ICO_HIDDEN\"");
HTM_DIV_Begin ("class=\"FOLLOW_TXT_ICO ICO_HIDDEN\"");
Ico_PutIcon ("user.svg",Ico_BLACK,"","ICO16x16");
HTM_DIV_End ();
}
@ -732,7 +717,7 @@ static void Fol_PutIconToFollow (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_
Usr_PutParUsrCodEncrypted (EncryptedUsrCod);
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-plus.svg",
Act_GetActionText (ActFolUsr),
"class=\"FOLLOW_USR_ICO ICO16x16 ICO_%s_%s ICO_HIGHLIGHT\"",
"class=\"FOLLOW_TXT_ICO ICO16x16 ICO_%s_%s ICO_HIGHLIGHT\"",
Ico_GetPreffix (Ico_BLACK),The_GetSuffix ());
Frm_EndForm ();
}
@ -747,7 +732,7 @@ static void Fol_PutIconToUnfollow (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTE
Usr_PutParUsrCodEncrypted (EncryptedUsrCod);
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-check.svg",
Act_GetActionText (ActUnfUsr),
"class=\"FOLLOW_USR_ICO ICO_HIGHLIGHT ICO16x16\"");
"class=\"FOLLOW_TXT_ICO ICO_HIGHLIGHT ICO16x16\"");
Frm_EndForm ();
}

View File

@ -57463,7 +57463,7 @@ const char *Txt_Who_to_follow =
#elif L==5 // fr
"Qui &agrave; suivre";
#elif L==6 // gn
"A qui&eacute;n seguir"; // Okoteve traducción
"M&aacute;vapepa oseg&iacute;ta";
#elif L==7 // it
"Chi da seguire";
#elif L==8 // pl
@ -57471,7 +57471,7 @@ const char *Txt_Who_to_follow =
#elif L==9 // pt
"Quem seguir";
#elif L==10 // tr
"Who to follow"; // Çeviri lazim!
"Kimi takip etmeli";
#endif
const char *Txt_With_ = // Example: "With students"