diff --git a/swad_action.c b/swad_action.c index 718fa622..f7859d3d 100644 --- a/swad_action.c +++ b/swad_action.c @@ -1131,7 +1131,7 @@ Social: 939. ActReqRemSocComGbl Request the removal of a comment in a social note (global) 940. ActRemSocComGbl Remove of a comment in a social note (global) - 941. ActReqPubPrf Request @nickname to show a public user's profile + 941. ActReqOthPubPrf Request @nickname to show a public user's profile 942. ActRcvSocPstUsr Receive a public social post to be displayed in the timeline (user) 943. ActRcvSocComUsr Comment a social note in the timeline (user) @@ -2606,7 +2606,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActReqRemSocComGbl*/{1505,-1,TabUnk,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,Soc_MarkMyNotifAsSeen ,Soc_RequestRemSocialComGbl ,NULL}, /* ActRemSocComGbl */{1507,-1,TabUnk,ActSeeSocTmlGbl ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,Soc_MarkMyNotifAsSeen ,Soc_RemoveSocialComGbl ,NULL}, - /* ActReqPubPrf */{1401,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_RequestUserProfile ,NULL}, + /* ActReqOthPubPrf */{1401,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_RequestUserProfile ,NULL}, /* ActRcvSocPstUsr */{1498,-1,TabUnk,ActSeeSocPrf ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_DATA,Act_THIS_WINDOW,NULL ,Soc_ReceiveSocialPostUsr ,NULL}, /* ActRcvSocComUsr */{1504,-1,TabUnk,ActSeeSocPrf ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_DATA,Act_THIS_WINDOW,NULL ,Soc_ReceiveCommentUsr ,NULL}, @@ -2621,7 +2621,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActReqRemSocComGbl*/{1506,-1,TabUnk,ActSeeSocPrf ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Soc_RequestRemSocialComUsr ,NULL}, /* ActRemSocComGbl */{1508,-1,TabUnk,ActSeeSocPrf ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Soc_RemoveSocialComUsr ,NULL}, - /* ActSeePubPrf */{1402,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_GetUsrDatAndShowUserProfile,NULL}, + /* ActSeeMyPubPrf */{1637,-1,TabUnk,ActSeeSocPrf ,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_ShowMyProfile ,NULL}, + /* ActSeeOthPubPrf */{1402,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_GetUsrDatAndShowUserProfile,NULL}, /* ActCal1stClkTim */{1405,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_CalculateFigures ,NULL}, /* ActCalNumClk */{1406,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_CalculateFigures ,NULL}, /* ActCalNumFilVie */{1409,-1,TabUnk,ActSeeSocPrf ,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Prf_CalculateFigures ,NULL}, @@ -4386,8 +4387,8 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un ActReqDatShaIns, // #1398 ActChgDatShaIns, // #1399 ActDowShaIns, // #1400 - ActReqPubPrf, // #1401 - ActSeePubPrf, // #1402 + ActReqOthPubPrf, // #1401 + ActSeeOthPubPrf, // #1402 ActEdiPri, // #1403 ActChgPriPrf, // #1404 ActCal1stClkTim, // #1405 @@ -4622,6 +4623,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un ActSeeCalDeg, // #1634 ActPrnCalDeg, // #1635 ActChgCalDeg1stDay, // #1636 + ActSeeMyPubPrf, // #1637 }; /*****************************************************************************/ diff --git a/swad_action.h b/swad_action.h index 3c6c42a6..d168e251 100644 --- a/swad_action.h +++ b/swad_action.h @@ -55,9 +55,9 @@ typedef enum typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action -#define Act_NUM_ACTIONS (1 + 9 + 54 + 17 + 47 + 27 + 24 + 115 + 54 + 416 + 159 + 172 + 36 + 31 + 97) +#define Act_NUM_ACTIONS (1 + 9 + 54 + 17 + 47 + 27 + 24 + 115 + 54 + 416 + 159 + 173 + 36 + 31 + 97) -#define Act_MAX_ACTION_COD 1636 +#define Act_MAX_ACTION_COD 1637 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 12 @@ -1150,7 +1150,7 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to #define ActReqRemSocComGbl (ActLstClk + 15) #define ActRemSocComGbl (ActLstClk + 16) -#define ActReqPubPrf (ActLstClk + 17) +#define ActReqOthPubPrf (ActLstClk + 17) #define ActRcvSocPstUsr (ActLstClk + 18) #define ActRcvSocComUsr (ActLstClk + 19) @@ -1165,152 +1165,153 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to #define ActReqRemSocComUsr (ActLstClk + 28) #define ActRemSocComUsr (ActLstClk + 29) -#define ActSeePubPrf (ActLstClk + 30) -#define ActCal1stClkTim (ActLstClk + 31) -#define ActCalNumClk (ActLstClk + 32) -#define ActCalNumFilVie (ActLstClk + 33) -#define ActCalNumForPst (ActLstClk + 34) -#define ActCalNumMsgSnt (ActLstClk + 35) +#define ActSeeMyPubPrf (ActLstClk + 30) +#define ActSeeOthPubPrf (ActLstClk + 31) +#define ActCal1stClkTim (ActLstClk + 32) +#define ActCalNumClk (ActLstClk + 33) +#define ActCalNumFilVie (ActLstClk + 34) +#define ActCalNumForPst (ActLstClk + 35) +#define ActCalNumMsgSnt (ActLstClk + 36) -#define ActFolUsr (ActLstClk + 36) -#define ActUnfUsr (ActLstClk + 37) -#define ActSeeFlg (ActLstClk + 38) -#define ActSeeFlr (ActLstClk + 39) +#define ActFolUsr (ActLstClk + 37) +#define ActUnfUsr (ActLstClk + 38) +#define ActSeeFlg (ActLstClk + 39) +#define ActSeeFlr (ActLstClk + 40) -#define ActSeeForCrsUsr (ActLstClk + 40) -#define ActSeeForCrsTch (ActLstClk + 41) -#define ActSeeForDegUsr (ActLstClk + 42) -#define ActSeeForDegTch (ActLstClk + 43) -#define ActSeeForCtrUsr (ActLstClk + 44) -#define ActSeeForCtrTch (ActLstClk + 45) -#define ActSeeForInsUsr (ActLstClk + 46) -#define ActSeeForInsTch (ActLstClk + 47) -#define ActSeeForGenUsr (ActLstClk + 48) -#define ActSeeForGenTch (ActLstClk + 49) -#define ActSeeForSWAUsr (ActLstClk + 50) -#define ActSeeForSWATch (ActLstClk + 51) -#define ActSeePstForCrsUsr (ActLstClk + 52) -#define ActSeePstForCrsTch (ActLstClk + 53) -#define ActSeePstForDegUsr (ActLstClk + 54) -#define ActSeePstForDegTch (ActLstClk + 55) -#define ActSeePstForCtrUsr (ActLstClk + 56) -#define ActSeePstForCtrTch (ActLstClk + 57) -#define ActSeePstForInsUsr (ActLstClk + 58) -#define ActSeePstForInsTch (ActLstClk + 59) -#define ActSeePstForGenUsr (ActLstClk + 60) -#define ActSeePstForGenTch (ActLstClk + 61) -#define ActSeePstForSWAUsr (ActLstClk + 62) -#define ActSeePstForSWATch (ActLstClk + 63) -#define ActRcvThrForCrsUsr (ActLstClk + 64) -#define ActRcvThrForCrsTch (ActLstClk + 65) -#define ActRcvThrForDegUsr (ActLstClk + 66) -#define ActRcvThrForDegTch (ActLstClk + 67) -#define ActRcvThrForCtrUsr (ActLstClk + 68) -#define ActRcvThrForCtrTch (ActLstClk + 69) -#define ActRcvThrForInsUsr (ActLstClk + 70) -#define ActRcvThrForInsTch (ActLstClk + 71) -#define ActRcvThrForGenUsr (ActLstClk + 72) -#define ActRcvThrForGenTch (ActLstClk + 73) -#define ActRcvThrForSWAUsr (ActLstClk + 74) -#define ActRcvThrForSWATch (ActLstClk + 75) -#define ActRcvRepForCrsUsr (ActLstClk + 76) -#define ActRcvRepForCrsTch (ActLstClk + 77) -#define ActRcvRepForDegUsr (ActLstClk + 78) -#define ActRcvRepForDegTch (ActLstClk + 79) -#define ActRcvRepForCtrUsr (ActLstClk + 80) -#define ActRcvRepForCtrTch (ActLstClk + 81) -#define ActRcvRepForInsUsr (ActLstClk + 82) -#define ActRcvRepForInsTch (ActLstClk + 83) -#define ActRcvRepForGenUsr (ActLstClk + 84) -#define ActRcvRepForGenTch (ActLstClk + 85) -#define ActRcvRepForSWAUsr (ActLstClk + 86) -#define ActRcvRepForSWATch (ActLstClk + 87) -#define ActReqDelThrCrsUsr (ActLstClk + 88) -#define ActReqDelThrCrsTch (ActLstClk + 89) -#define ActReqDelThrDegUsr (ActLstClk + 90) -#define ActReqDelThrDegTch (ActLstClk + 91) -#define ActReqDelThrCtrUsr (ActLstClk + 92) -#define ActReqDelThrCtrTch (ActLstClk + 93) -#define ActReqDelThrInsUsr (ActLstClk + 94) -#define ActReqDelThrInsTch (ActLstClk + 95) -#define ActReqDelThrGenUsr (ActLstClk + 96) -#define ActReqDelThrGenTch (ActLstClk + 97) -#define ActReqDelThrSWAUsr (ActLstClk + 98) -#define ActReqDelThrSWATch (ActLstClk + 99) -#define ActDelThrForCrsUsr (ActLstClk + 100) -#define ActDelThrForCrsTch (ActLstClk + 101) -#define ActDelThrForDegUsr (ActLstClk + 102) -#define ActDelThrForDegTch (ActLstClk + 103) -#define ActDelThrForCtrUsr (ActLstClk + 104) -#define ActDelThrForCtrTch (ActLstClk + 105) -#define ActDelThrForInsUsr (ActLstClk + 106) -#define ActDelThrForInsTch (ActLstClk + 107) -#define ActDelThrForGenUsr (ActLstClk + 108) -#define ActDelThrForGenTch (ActLstClk + 109) -#define ActDelThrForSWAUsr (ActLstClk + 110) -#define ActDelThrForSWATch (ActLstClk + 111) -#define ActCutThrForCrsUsr (ActLstClk + 112) -#define ActCutThrForCrsTch (ActLstClk + 113) -#define ActCutThrForDegUsr (ActLstClk + 114) -#define ActCutThrForDegTch (ActLstClk + 115) -#define ActCutThrForCtrUsr (ActLstClk + 116) -#define ActCutThrForCtrTch (ActLstClk + 117) -#define ActCutThrForInsUsr (ActLstClk + 118) -#define ActCutThrForInsTch (ActLstClk + 119) -#define ActCutThrForGenUsr (ActLstClk + 120) -#define ActCutThrForGenTch (ActLstClk + 121) -#define ActCutThrForSWAUsr (ActLstClk + 122) -#define ActCutThrForSWATch (ActLstClk + 123) -#define ActPasThrForCrsUsr (ActLstClk + 124) -#define ActPasThrForCrsTch (ActLstClk + 125) -#define ActPasThrForDegUsr (ActLstClk + 126) -#define ActPasThrForDegTch (ActLstClk + 127) -#define ActPasThrForCtrUsr (ActLstClk + 128) -#define ActPasThrForCtrTch (ActLstClk + 129) -#define ActPasThrForInsUsr (ActLstClk + 130) -#define ActPasThrForInsTch (ActLstClk + 131) -#define ActPasThrForGenUsr (ActLstClk + 132) -#define ActPasThrForGenTch (ActLstClk + 133) -#define ActPasThrForSWAUsr (ActLstClk + 134) -#define ActPasThrForSWATch (ActLstClk + 135) -#define ActDelPstForCrsUsr (ActLstClk + 136) -#define ActDelPstForCrsTch (ActLstClk + 137) -#define ActDelPstForDegUsr (ActLstClk + 138) -#define ActDelPstForDegTch (ActLstClk + 139) -#define ActDelPstForCtrUsr (ActLstClk + 140) -#define ActDelPstForCtrTch (ActLstClk + 141) -#define ActDelPstForInsUsr (ActLstClk + 142) -#define ActDelPstForInsTch (ActLstClk + 143) -#define ActDelPstForGenUsr (ActLstClk + 144) -#define ActDelPstForGenTch (ActLstClk + 145) -#define ActDelPstForSWAUsr (ActLstClk + 146) -#define ActDelPstForSWATch (ActLstClk + 147) -#define ActEnbPstForCrsUsr (ActLstClk + 148) -#define ActEnbPstForCrsTch (ActLstClk + 149) -#define ActEnbPstForDegUsr (ActLstClk + 150) -#define ActEnbPstForDegTch (ActLstClk + 151) -#define ActEnbPstForCtrUsr (ActLstClk + 152) -#define ActEnbPstForCtrTch (ActLstClk + 153) -#define ActEnbPstForInsUsr (ActLstClk + 154) -#define ActEnbPstForInsTch (ActLstClk + 155) -#define ActEnbPstForGenUsr (ActLstClk + 156) -#define ActEnbPstForGenTch (ActLstClk + 157) -#define ActEnbPstForSWAUsr (ActLstClk + 158) -#define ActEnbPstForSWATch (ActLstClk + 159) -#define ActDisPstForCrsUsr (ActLstClk + 160) -#define ActDisPstForCrsTch (ActLstClk + 161) -#define ActDisPstForDegUsr (ActLstClk + 162) -#define ActDisPstForDegTch (ActLstClk + 163) -#define ActDisPstForCtrUsr (ActLstClk + 164) -#define ActDisPstForCtrTch (ActLstClk + 165) -#define ActDisPstForInsUsr (ActLstClk + 166) -#define ActDisPstForInsTch (ActLstClk + 167) -#define ActDisPstForGenUsr (ActLstClk + 168) -#define ActDisPstForGenTch (ActLstClk + 169) -#define ActDisPstForSWAUsr (ActLstClk + 170) -#define ActDisPstForSWATch (ActLstClk + 171) +#define ActSeeForCrsUsr (ActLstClk + 41) +#define ActSeeForCrsTch (ActLstClk + 42) +#define ActSeeForDegUsr (ActLstClk + 43) +#define ActSeeForDegTch (ActLstClk + 44) +#define ActSeeForCtrUsr (ActLstClk + 45) +#define ActSeeForCtrTch (ActLstClk + 46) +#define ActSeeForInsUsr (ActLstClk + 47) +#define ActSeeForInsTch (ActLstClk + 48) +#define ActSeeForGenUsr (ActLstClk + 49) +#define ActSeeForGenTch (ActLstClk + 50) +#define ActSeeForSWAUsr (ActLstClk + 51) +#define ActSeeForSWATch (ActLstClk + 52) +#define ActSeePstForCrsUsr (ActLstClk + 53) +#define ActSeePstForCrsTch (ActLstClk + 54) +#define ActSeePstForDegUsr (ActLstClk + 55) +#define ActSeePstForDegTch (ActLstClk + 56) +#define ActSeePstForCtrUsr (ActLstClk + 57) +#define ActSeePstForCtrTch (ActLstClk + 58) +#define ActSeePstForInsUsr (ActLstClk + 59) +#define ActSeePstForInsTch (ActLstClk + 60) +#define ActSeePstForGenUsr (ActLstClk + 61) +#define ActSeePstForGenTch (ActLstClk + 62) +#define ActSeePstForSWAUsr (ActLstClk + 63) +#define ActSeePstForSWATch (ActLstClk + 64) +#define ActRcvThrForCrsUsr (ActLstClk + 65) +#define ActRcvThrForCrsTch (ActLstClk + 66) +#define ActRcvThrForDegUsr (ActLstClk + 67) +#define ActRcvThrForDegTch (ActLstClk + 68) +#define ActRcvThrForCtrUsr (ActLstClk + 69) +#define ActRcvThrForCtrTch (ActLstClk + 70) +#define ActRcvThrForInsUsr (ActLstClk + 71) +#define ActRcvThrForInsTch (ActLstClk + 72) +#define ActRcvThrForGenUsr (ActLstClk + 73) +#define ActRcvThrForGenTch (ActLstClk + 74) +#define ActRcvThrForSWAUsr (ActLstClk + 75) +#define ActRcvThrForSWATch (ActLstClk + 76) +#define ActRcvRepForCrsUsr (ActLstClk + 77) +#define ActRcvRepForCrsTch (ActLstClk + 78) +#define ActRcvRepForDegUsr (ActLstClk + 79) +#define ActRcvRepForDegTch (ActLstClk + 80) +#define ActRcvRepForCtrUsr (ActLstClk + 81) +#define ActRcvRepForCtrTch (ActLstClk + 82) +#define ActRcvRepForInsUsr (ActLstClk + 83) +#define ActRcvRepForInsTch (ActLstClk + 84) +#define ActRcvRepForGenUsr (ActLstClk + 85) +#define ActRcvRepForGenTch (ActLstClk + 86) +#define ActRcvRepForSWAUsr (ActLstClk + 87) +#define ActRcvRepForSWATch (ActLstClk + 88) +#define ActReqDelThrCrsUsr (ActLstClk + 89) +#define ActReqDelThrCrsTch (ActLstClk + 90) +#define ActReqDelThrDegUsr (ActLstClk + 91) +#define ActReqDelThrDegTch (ActLstClk + 92) +#define ActReqDelThrCtrUsr (ActLstClk + 93) +#define ActReqDelThrCtrTch (ActLstClk + 94) +#define ActReqDelThrInsUsr (ActLstClk + 95) +#define ActReqDelThrInsTch (ActLstClk + 96) +#define ActReqDelThrGenUsr (ActLstClk + 97) +#define ActReqDelThrGenTch (ActLstClk + 98) +#define ActReqDelThrSWAUsr (ActLstClk + 99) +#define ActReqDelThrSWATch (ActLstClk + 100) +#define ActDelThrForCrsUsr (ActLstClk + 101) +#define ActDelThrForCrsTch (ActLstClk + 102) +#define ActDelThrForDegUsr (ActLstClk + 103) +#define ActDelThrForDegTch (ActLstClk + 104) +#define ActDelThrForCtrUsr (ActLstClk + 105) +#define ActDelThrForCtrTch (ActLstClk + 106) +#define ActDelThrForInsUsr (ActLstClk + 107) +#define ActDelThrForInsTch (ActLstClk + 108) +#define ActDelThrForGenUsr (ActLstClk + 109) +#define ActDelThrForGenTch (ActLstClk + 110) +#define ActDelThrForSWAUsr (ActLstClk + 111) +#define ActDelThrForSWATch (ActLstClk + 112) +#define ActCutThrForCrsUsr (ActLstClk + 113) +#define ActCutThrForCrsTch (ActLstClk + 114) +#define ActCutThrForDegUsr (ActLstClk + 115) +#define ActCutThrForDegTch (ActLstClk + 116) +#define ActCutThrForCtrUsr (ActLstClk + 117) +#define ActCutThrForCtrTch (ActLstClk + 118) +#define ActCutThrForInsUsr (ActLstClk + 119) +#define ActCutThrForInsTch (ActLstClk + 120) +#define ActCutThrForGenUsr (ActLstClk + 121) +#define ActCutThrForGenTch (ActLstClk + 122) +#define ActCutThrForSWAUsr (ActLstClk + 123) +#define ActCutThrForSWATch (ActLstClk + 124) +#define ActPasThrForCrsUsr (ActLstClk + 125) +#define ActPasThrForCrsTch (ActLstClk + 126) +#define ActPasThrForDegUsr (ActLstClk + 127) +#define ActPasThrForDegTch (ActLstClk + 128) +#define ActPasThrForCtrUsr (ActLstClk + 129) +#define ActPasThrForCtrTch (ActLstClk + 130) +#define ActPasThrForInsUsr (ActLstClk + 131) +#define ActPasThrForInsTch (ActLstClk + 132) +#define ActPasThrForGenUsr (ActLstClk + 133) +#define ActPasThrForGenTch (ActLstClk + 134) +#define ActPasThrForSWAUsr (ActLstClk + 135) +#define ActPasThrForSWATch (ActLstClk + 136) +#define ActDelPstForCrsUsr (ActLstClk + 137) +#define ActDelPstForCrsTch (ActLstClk + 138) +#define ActDelPstForDegUsr (ActLstClk + 139) +#define ActDelPstForDegTch (ActLstClk + 140) +#define ActDelPstForCtrUsr (ActLstClk + 141) +#define ActDelPstForCtrTch (ActLstClk + 142) +#define ActDelPstForInsUsr (ActLstClk + 143) +#define ActDelPstForInsTch (ActLstClk + 144) +#define ActDelPstForGenUsr (ActLstClk + 145) +#define ActDelPstForGenTch (ActLstClk + 146) +#define ActDelPstForSWAUsr (ActLstClk + 147) +#define ActDelPstForSWATch (ActLstClk + 148) +#define ActEnbPstForCrsUsr (ActLstClk + 149) +#define ActEnbPstForCrsTch (ActLstClk + 150) +#define ActEnbPstForDegUsr (ActLstClk + 151) +#define ActEnbPstForDegTch (ActLstClk + 152) +#define ActEnbPstForCtrUsr (ActLstClk + 153) +#define ActEnbPstForCtrTch (ActLstClk + 154) +#define ActEnbPstForInsUsr (ActLstClk + 155) +#define ActEnbPstForInsTch (ActLstClk + 156) +#define ActEnbPstForGenUsr (ActLstClk + 157) +#define ActEnbPstForGenTch (ActLstClk + 158) +#define ActEnbPstForSWAUsr (ActLstClk + 159) +#define ActEnbPstForSWATch (ActLstClk + 160) +#define ActDisPstForCrsUsr (ActLstClk + 161) +#define ActDisPstForCrsTch (ActLstClk + 162) +#define ActDisPstForDegUsr (ActLstClk + 163) +#define ActDisPstForDegTch (ActLstClk + 164) +#define ActDisPstForCtrUsr (ActLstClk + 165) +#define ActDisPstForCtrTch (ActLstClk + 166) +#define ActDisPstForInsUsr (ActLstClk + 167) +#define ActDisPstForInsTch (ActLstClk + 168) +#define ActDisPstForGenUsr (ActLstClk + 169) +#define ActDisPstForGenTch (ActLstClk + 170) +#define ActDisPstForSWAUsr (ActLstClk + 171) +#define ActDisPstForSWATch (ActLstClk + 172) -#define ActCht (ActLstClk + 172) +#define ActCht (ActLstClk + 173) /*****************************************************************************/ /******************************* Messages tab ********************************/ diff --git a/swad_agenda.c b/swad_agenda.c index d456ed9a..5b40b9e7 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -518,17 +518,17 @@ static void Agd_PutIconToShowQR (void) static void Agd_PutIconsOtherPublicAgenda (void) { - extern const char *Txt_View_public_profile; + extern const char *Txt_Another_user_s_profile; extern const char *Txt_View_record_for_this_course; extern const char *Txt_View_record_and_office_hours; /***** Button to view user's public profile *****/ if (Pri_ShowingIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility, - &Gbl.Usrs.Other.UsrDat)) - Lay_PutContextualLink (ActSeePubPrf, + &Gbl.Usrs.Other.UsrDat)) + Lay_PutContextualLink (ActSeeOthPubPrf, Usr_PutParamOtherUsrCodEncrypted, "usr64x64.gif", - Txt_View_public_profile,NULL, + Txt_Another_user_s_profile,NULL, NULL); /***** Button to view user's record card *****/ diff --git a/swad_changelog.h b/swad_changelog.h index 0a970499..84cf1276 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -195,18 +195,24 @@ // TODO: Bajo la foto de cada usuario el país // TODO: Permitir elegir entre "Ver actividad de quienes sigo" o "Ver actividad de todos" +// TODO: On right column show only users to follow who have photo (pass a parameter to function) + /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.136 (2017-02-16)" +#define Log_PLATFORM_VERSION "SWAD 16.137 (2017-02-17)" #define CSS_FILE "swad16.136.css" #define JS_FILE "swad16.123.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 16.136: Feb 16, 2017 Sggested users to follow on right column. (212646 lines) + Version 16.137: Feb 17, 2017 Link to view my public profile. (212808 lines) + 1 change necessary in database: +INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1637','es','N','Ver mi perfil público'); + + Version 16.136: Feb 16, 2017 Suggested users to follow on right column. (212646 lines) Version 16.135.7: Feb 16, 2017 Code refactoring in users to follow. (212512 lines) Version 16.135.6: Feb 13, 2017 Changes in contextual help after changes in tabs. (212501 lines) Version 16.135.5: Feb 11, 2017 Change in button to register teacher when no teachers found. diff --git a/swad_connected.c b/swad_connected.c index 0db4fad1..8eb4c438 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -1035,31 +1035,39 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) char PhotoURL[PATH_MAX + 1]; const char *Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_CRS" : "CON"); - struct UsrData UsrDat; + long UsrCod; + struct UsrData OtherUsrDat; + struct UsrData *UsrDat; + bool ItsMe; - /***** Initialize structure with user's data *****/ - Usr_UsrDataConstructor (&UsrDat); + /***** Get user's code from list *****/ + UsrCod = Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].UsrCod; + ItsMe = (Gbl.Usrs.Me.Logged && + UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod); // It's me - /***** Get user's data *****/ - UsrDat.UsrCod = Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].UsrCod; - Usr_GetAllUsrDataFromUsrCod (&UsrDat); + if (ItsMe) + UsrDat = &Gbl.Usrs.Me.UsrDat; + else + { + /***** Initialize structure with user's data *****/ + OtherUsrDat.UsrCod = UsrCod; + Usr_UsrDataConstructor (&OtherUsrDat); + + /***** Get user's data *****/ + Usr_GetAllUsrDataFromUsrCod (&OtherUsrDat); + + UsrDat = &OtherUsrDat; + } /***** Show photo *****/ fprintf (Gbl.F.Out,"" "", Gbl.RowEvenOdd); - Act_FormStartUnique (ActSeePubPrf); // Must be unique because - // the list of connected users - // is dynamically updated via AJAX - Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); - Act_LinkFormSubmitUnique (UsrDat.FullName,NULL); - ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL); - Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : - NULL, - "PHOTO21x28",Pho_ZOOM,false); - fprintf (Gbl.F.Out,""); - Act_FormEnd (); + ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL); + Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : + NULL, + "PHOTO21x28",Pho_ZOOM,true); fprintf (Gbl.F.Out,""); /***** Write full name and link *****/ @@ -1070,9 +1078,9 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) ActSeeRecOneTch); // Must be unique because // the list of connected users // is dynamically updated via AJAX - Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); + Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Act_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font); - Usr_RestrictLengthAndWriteName (&UsrDat,8); + Usr_RestrictLengthAndWriteName (UsrDat,8); fprintf (Gbl.F.Out,""); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -1090,8 +1098,9 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) fprintf (Gbl.F.Out,"" ""); - /***** Free memory used for user's data *****/ - Usr_UsrDataDestructor (&UsrDat); + if (!ItsMe) + /***** Free memory used for user's data *****/ + Usr_UsrDataDestructor (&OtherUsrDat); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } diff --git a/swad_follow.c b/swad_follow.c index c9fca56c..104ab603 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -93,12 +93,10 @@ void Fol_PutLinkWhoToFollow (void) { extern const char *Txt_Who_to_follow; - fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActSeeSocPrf,NULL, "follow64x64.png", Txt_Who_to_follow,Txt_Who_to_follow, NULL); - fprintf (Gbl.F.Out,"
"); } /*****************************************************************************/ @@ -118,8 +116,11 @@ void Fol_SuggestUsrsToFollowMainZone (void) unsigned NumUsr; struct UsrData UsrDat; - /***** Put link to request user's profile *****/ - Prf_PutLinkRequestUserProfile (); + /***** Put links to request my public profile and another user's profile *****/ + fprintf (Gbl.F.Out,"
"); + Prf_PutLinkMyPublicProfile (); + Prf_PutLinkRequestAnotherUserProfile (); + fprintf (Gbl.F.Out,"
"); /***** Get users *****/ if ((NumUsrs = Fol_GetUsrsWhoToFollow (Fol_MAX_USRS_TO_FOLLOW_MAIN_ZONE, @@ -762,7 +763,7 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat) static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat) { - extern const char *Txt_View_public_profile; + extern const char *Txt_Another_user_s_profile; bool ShowPhoto; char PhotoURL[PATH_MAX + 1]; bool Visible = Pri_ShowingIsAllowed (UsrDat->ProfileVisibility,UsrDat); @@ -783,9 +784,9 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat) if (Visible) { /* Put form to go to public profile */ - Act_FormStart (ActSeePubPrf); + Act_FormStart (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); - Act_LinkFormSubmit (Txt_View_public_profile,"DAT",NULL); + Act_LinkFormSubmit (Txt_Another_user_s_profile,"DAT",NULL); Usr_RestrictLengthAndWriteName (UsrDat,10); fprintf (Gbl.F.Out,""); Act_FormEnd (); @@ -814,7 +815,7 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat) static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) { - extern const char *Txt_View_public_profile; + extern const char *Txt_Another_user_s_profile; bool ShowPhoto; char PhotoURL[PATH_MAX + 1]; bool Visible = Pri_ShowingIsAllowed (UsrDat->ProfileVisibility,UsrDat); @@ -840,9 +841,9 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) if (Visible) { /* Put form to go to public profile */ - Act_FormStart (ActSeePubPrf); + Act_FormStart (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); - Act_LinkFormSubmit (Txt_View_public_profile,"CON_CRS",NULL); + Act_LinkFormSubmit (Txt_Another_user_s_profile,"CON_CRS",NULL); Usr_RestrictLengthAndWriteName (UsrDat,10); fprintf (Gbl.F.Out,""); Act_FormEnd (); diff --git a/swad_layout.c b/swad_layout.c index 683eeb53..62fd98ff 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -723,7 +723,7 @@ static void Lay_WriteScriptParamsAJAX (void) "var RefreshParamUsr = \"\";\n", // No user specified Act_Actions[ActRefNewSocPubGbl].ActCod, Act_Actions[ActRefOldSocPubGbl].ActCod); - else if (Gbl.Action.Act == ActSeePubPrf || + else if (Gbl.Action.Act == ActSeeOthPubPrf || Gbl.Action.Act == ActRcvSocPstUsr || Gbl.Action.Act == ActRcvSocComUsr || Gbl.Action.Act == ActShaSocNotUsr || @@ -1017,7 +1017,7 @@ static void Lay_ShowRightColumn (void) Con_ShowConnectedUsrsBelongingToCurrentCrs (); fprintf (Gbl.F.Out,""); // Used for AJAX based refresh } - else + else if (Gbl.Usrs.Me.Logged) // I am logged { /***** Suggest one user to follow *****/ fprintf (Gbl.F.Out,"
"); diff --git a/swad_notification.c b/swad_notification.c index 160205df..8733584b 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -754,7 +754,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, if (UsrDat->EncryptedUsrCod[0]) // User's code found ==> // go to user's public profile { - Act_FormStart (ActSeePubPrf); + Act_FormStart (ActSeeOthPubPrf); /* Put param to go to follower's profile */ Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); } diff --git a/swad_parameter.c b/swad_parameter.c index 587fc4f2..e10061ec 100644 --- a/swad_parameter.c +++ b/swad_parameter.c @@ -692,7 +692,7 @@ void Par_GetMainParameters (void) // and to refresh old publishings in user's timeline // If user does not exist ==> UsrCod = -1 Gbl.Usrs.Other.UsrDat.UsrCod = Nck_GetUsrCodFromNickname (Gbl.Usrs.Other.UsrDat.Nickname); - Gbl.Action.Act = ActSeePubPrf; // Set default action if no other is specified + Gbl.Action.Act = ActSeeOthPubPrf; // Set default action if no other is specified } } else if (Par_GetParToText ("agd",Nickname,Nck_MAX_BYTES_NICKNAME_FROM_FORM)) diff --git a/swad_photo.c b/swad_photo.c index f56e6779..f36b9113 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -1121,20 +1121,34 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, Zoom == Pho_ZOOM && // Make zoom Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW; // Only in main window char IdCaption[Act_MAX_LENGTH_ID]; - + bool ItsMe = (Gbl.Usrs.Me.Logged && + UsrDat->UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod); /***** Start form to go to public profile *****/ if (PutLinkToPublicProfile) { if (FormUnique) - Act_FormStartUnique (ActSeePubPrf); - else - Act_FormStart (ActSeePubPrf); - Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); - if (FormUnique) - Act_LinkFormSubmitUnique (NULL,NULL); + { + if (ItsMe) + Act_FormStartUnique (ActSeeMyPubPrf); + else + { + Act_FormStartUnique (ActSeeOthPubPrf); + Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); + } + Act_LinkFormSubmitUnique (NULL,NULL); + } else + { + if (ItsMe) + Act_FormStart (ActSeeMyPubPrf); + else + { + Act_FormStart (ActSeeOthPubPrf); + Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); + } Act_LinkFormSubmit (NULL,NULL,NULL); + } } /***** Hidden div to pass user's name to Javascript *****/ diff --git a/swad_profile.c b/swad_profile.c index 2923b88a..cf10a885 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -124,19 +124,31 @@ char *Prf_GetURLPublicProfile (char *URL,const char *NicknameWithoutArroba) } /*****************************************************************************/ -/******************* Put link to request a user's profile ********************/ +/******************** Put link to view my public profile *********************/ /*****************************************************************************/ -void Prf_PutLinkRequestUserProfile (void) +void Prf_PutLinkMyPublicProfile (void) { - extern const char *Txt_View_public_profile; + extern const char *Txt_My_public_profile; - fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActReqPubPrf,NULL, + Lay_PutContextualLink (ActSeeMyPubPrf,NULL, "usr64x64.gif", - Txt_View_public_profile,Txt_View_public_profile, + Txt_My_public_profile,Txt_My_public_profile, + NULL); + } + +/*****************************************************************************/ +/***************** Put link to request another user's profile ****************/ +/*****************************************************************************/ + +void Prf_PutLinkRequestAnotherUserProfile (void) + { + extern const char *Txt_Another_user_s_profile; + + Lay_PutContextualLink (ActReqOthPubPrf,NULL, + "usr64x64.gif", + Txt_Another_user_s_profile,Txt_Another_user_s_profile, NULL); - fprintf (Gbl.F.Out,"
"); } /*****************************************************************************/ @@ -145,9 +157,14 @@ void Prf_PutLinkRequestUserProfile (void) void Prf_RequestUserProfile (void) { - /***** Put link to show users to follow *****/ if (Gbl.Usrs.Me.Logged) + { + /***** Put link to show my public profile and users to follow *****/ + fprintf (Gbl.F.Out,"
"); + Prf_PutLinkMyPublicProfile (); Fol_PutLinkWhoToFollow (); + fprintf (Gbl.F.Out,"
"); + } /* By default, the nickname is filled with my nickname If no user logged ==> the nickname is empty */ @@ -161,16 +178,16 @@ void Prf_RequestUserProfile (void) static void Prf_RequestUserProfileWithDefaultNickname (const char *DefaultNickname) { extern const char *Hlp_SOCIAL_Profiles_view_public_profile; - extern const char *Txt_View_public_profile; + extern const char *Txt_Another_user_s_profile; extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *Txt_Nickname; extern const char *Txt_Continue; /***** Start form *****/ - Act_FormStart (ActSeePubPrf); + Act_FormStart (ActSeeOthPubPrf); /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_View_public_profile,NULL,Hlp_SOCIAL_Profiles_view_public_profile); + Lay_StartRoundFrame (NULL,Txt_Another_user_s_profile,NULL,Hlp_SOCIAL_Profiles_view_public_profile); /***** Form to request user's @nickname *****/ fprintf (Gbl.F.Out,"